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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -