You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
That solution works like a charm... if the url has the defaults weights. I'm trying without success apply the same logic when working with a subset of fonts like these: https://fonts.googleapis.com/css?family=Lato:700,900|Bitter:400italic.
With this script:
var ffol = global.FontFaceOnload;
var html = document.documentElement;
function watch (family) {
function loaded () {
html.className += ' ok-' + family.toLowerCase();
}
function notLoaded() {
console.error("Error loading " + family + " font.");
}
ffol(family, {
timeout: 10000,
success: loaded,
error: notLoaded
});
}
watch('Lato');
watch('Bitter');
the fail callback is always thrown. Am I missing something?
The text was updated successfully, but these errors were encountered:
@nobuti, try specifying a weight and style in the options, if you're not loading the 400/normal version of the font. I ran into this issue today, and specifying a weight of 700 was necessary for one where I didn't need the 400 weight.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to apply these scenario from @bevacqua performance workshop:
https://github.com/bevacqua/perfschool/tree/master/exercises/using_a_font_loader
That solution works like a charm... if the url has the defaults weights. I'm trying without success apply the same logic when working with a subset of fonts like these:
https://fonts.googleapis.com/css?family=Lato:700,900|Bitter:400italic
.With this script:
the fail callback is always thrown. Am I missing something?
The text was updated successfully, but these errors were encountered: