typekit / webfontloader

Web Font Loader gives you added control when using linked fonts via @font-face.
Apache License 2.0
9.24k stars 646 forks source link

Not all fonts are loading from google when set 'text' param #357

Open Nikita-S-Doroshenko opened 7 years ago

Nikita-S-Doroshenko commented 7 years ago
WebFontConfig = {
    google: {
        families: ['Lora:400&text=LOGOTEXT','Fira Sans:300,500','Cousine:latin,cyrillic']
    }
};

(function(d) {
    var wf = d.createElement('script'), s = d.scripts[0];
    wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
    wf.async = true;
    s.parentNode.insertBefore(wf, s);
})(document);

With this code, only Lora font will be loaded. 'Fira Sans' and 'Cousine' fonts won't be loaded. I'm not sure if it's bug, but I spend a few hours playing with different configuration markup, and didn't found any solution how to load all fonts with 'Lora' text param.

Nikita-S-Doroshenko commented 7 years ago

Example with WebFontLoader - http://codepen.io/Nikita-S-Doroshenko/pen/dNBrjY Working example with classic Google Fonts - http://codepen.io/Nikita-S-Doroshenko/pen/egwXjx