javascript - When using WebFont loader, how to hardcode the css? -


to load font webfont, suggest here: https://developers.google.com/fonts/docs/webfont_loader

webfontconfig = {     custom: { families: ['font1', 'font2', 'font3'],     urls: [ 'stylesheets/fonts.css' ] },     loading: function(){         console.log('loaded');     },     inactive: function(){         console.log('not loaded');     } }; webfont.load(webfontconfig); 

but mean broswer wait download of css file before starts loading fonts.the css few lines of code , don't see why not paste directly in js.

anyone knowes how achieve ?

this not possible ; detection starts when download of css done.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -