开发者

Can I have custom fonts with Google web fonts?

I want to us开发者_开发知识库e my own font. How can I use it with that Google's font loader?


You can use Google Font Loader with your own font files e.g.

<script type="text/javascript">
WebFontConfig = {
  custom: { families: ['Font Family Name', 'Another Font Family'],
  urls: [ 'http://f.fontdeck.com/s/css/xxxx/domain/nnnn.css' ] }
};

(function() {
  var wf = document.createElement('script');
  wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +   
  '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  wf.type = 'text/javascript';
  wf.async = 'true';
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(wf, s);
})();
</script>

The CSS file should contain links to all the compatible font files.


From their about page:

Where do the fonts come from?

We are working with many type designers to fill the directory with quality font faces that are optimized for usage on the web. If you want to contribute please get in touch. Popular Google web fonts can been seen on millions of web sites.

They need to process the fonts into several formats, and host them on their servers. I assume they don't let you specify any font file you want because they don't want the liability of hosting fonts without being sure of the licensing details first.


You might want to visit this page:

https://spreadsheets.google.com/viewform?formkey=dEtpRm5vbTg5dUtiT3JJMmFHU1ZBNlE6MQ

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜