Answer the question
In order to leave comments, you need to log in
How to prevent script execution before fonts are loaded?
There is a script that works with fonts on the site.
When the page is first loaded, they are executed even before the font is fully loaded via @font-face and there are many jambs.
You need to run the script only after downloading the font files. How?
Answer the question
In order to leave comments, you need to log in
document.fonts.load("bold 16px Lato", "b").then(function() {
//
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question