Tag: google webfonts

Googlenetworking字体在Express中不起作用

我无法让Google网页字体在Express 3.0中运行。 以标准方式加载字体似乎不起作用: link(href='http://fonts.googleapis.com/css?family=Crete+Round') 然而加载字体在这些方式之一工作正常: script(type="text/javascript") WebFontConfig = {google: { families: [ 'Crete+Round::latin' ] }}; (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); })(); 要么 style @import url(http://fonts.googleapis.com/css?family=Crete+Round);

phantomjs +网页字体+字体加载器

我在node.js环境中运行phantomjs ,并且进展顺利。 目前,我只是使用本地字体,但希望获得谷歌网页字体与phantomjs工作。 关于networking字体是否以及如何与phantomjs一起工作,有各种相互矛盾和混淆的报道。 有这样的文章包含过时的信息与死链接。 而像这样的post表明, phantomjs 2.0将会或可以支持网页字体,其他人则认为它不会但2.0.1会。 在这篇文章中有一个build议,webfonts在2.0工作。 我已经尝试了很多select,包括与phantomjs 2.0和2.0.1二进制文件,但不能得到它的工作。 这可能是因为我正在使用Web字体加载器使用以下内容来加载我的js中的Web字体 : WebFont.load({ google: { families: ['Droid Sans', 'Droid Serif'] }, loading: function() { console.log('loading'); }, active: function() { console.log('active'); // hooray! can do stuff… }, inactive: function() { console.log('inactive'); }, fontloading: function(familyName, fvd) { console.log('fontloading', familyName, fvd); }, fontactive: function(familyName, fvd) { console.log('fontactive', […]