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
Post a Comment