3

Web Font Loader を使用して Google Web フォントからフォントをロードしていますが、400 ウェイトしかロードしていないようです。300、400、700 を含めたいのですが、それを行う方法が見つかりません。

  WebFontConfig = {
    google: { 
      families: ['Open Sans'] 
    }
  };

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

2 に答える 2

14

このソリューションが機能することがわかりました。

  WebFontConfig = {
    google: { 
      families: ['Open Sans:300,400,700']
    },
于 2013-10-26T22:37:49.083 に答える