简体   繁体   English

Typekit字体在Facebook页面中不起作用

[英]Typekit font not working in facebook page

I am creating a facebook page that has to load typekit fonts in it. 我正在创建一个必须在其中加载Typekit字体的Facebook页面。

In the kit editor of typekit, I had entered the url for the facebook app (url that appears when the app tab is open). 在typekit的工具包编辑器中,我输入了facebook应用程序的URL(打开“应用程序”选项卡时出现的URL)。

I then included the javascript from typekit on the facebook page. 然后,我在Facebook页面上包含了来自typekit的javascript。

But the fonts don't load. 但是不会加载字体。 What am I missing here? 我在这里想念什么?

I recently ran into a similar problem. 我最近遇到了类似的问题。 The trick is to make sure that the fonts are allowed everywhere they could be loaded. 诀窍是确保在可以加载字体的任何地方都允许使用字体。 There's a setting on Typekit for each typekit that you own where you can specify allowed domains. 每个拥有的Typekit的Typekit上都有一个设置,您可以在其中指定允许的域。 It might look something like this: 它可能看起来像这样:

facebook.com,localhost,*.facebook.com,myapp.herokuapp.com,*.myapp.herokuapp.com

I'm not sure if you'll need all of those, but that setup works for me. 我不确定是否需要所有这些功能,但是该设置对我有用。 "localhost" is for my local dev environment, and myapp.herokuapp.com is where my application is hosted. “ localhost”用于我的本地开发环境,而myapp.herokuapp.com是托管我的应用程序的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM