我想在我自己的服务器上使用谷歌的网络字体加载器和我自己的自定义字体。
我对 how to configure 有点困惑我自己的网络字体提供商,如 google 自己的文档中所述:
In addition to the google, typekit, ascender and monotype options,
there is also a custom module that can load a stylesheet
from any web-font provider.
WebFontConfig = {
custom: { families: ['OneFont', 'AnotherFont'],
urls: [ 'http://myotherwebfontprovider.com/stylesheet1.css',
'http://yetanotherwebfontprovider.com/stylesheet2.css' ] }
};
为了使用这个库,我的外部 CSS 应该包含什么?
最佳答案
看看@font-face 工具包,像 font squirrel 这样的地方是一个很好的起点。您可以将各种文件格式(如 woff、svg 等)保存到字体文件夹中,将 @font face 工具包提供的 css 添加到您自己的样式表中,然后在您的脑海中将其与其余 CSS 一起调用,尽快当您阅读网站上的文档时,它会很有意义,任何进一步的帮助都可以随时询问
关于javascript - 自定义网络字体提供商,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14792258/