After setting
Deferred JavaScript Execution: Add The defer Tag To All Script Tags
to Disabled, for the purposes of Masonry JS & Masonry Views module, (breaks with this setting enabled) the Async Font Loader seems to have a bug.
After changing, on page first load, the fallback fonts are loaded and shown, and then on refresh the correct fonts are shown.
No Console errors.
No CSS errors.
We are using settings almost exactly from : https://groups.drupal.org/node/517292, except for the Defer setting above.
Can provide a HAR by email if required or further information.
Thanks for you help in advance!
Comment | File | Size | Author |
---|---|---|---|
#6 | advagg-2939889-4-run-font-js-first.patch | 1.8 KB | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedTry setting the AdvAgg cache to normal. Odds are it's this issue
#2934796: Aggressive render cache & relocate submodule; render cache/Aggressive render cache & loadcss inline javascript
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedIf the fix in the above issue doesn't do it I'd like to see a HAR file so this can be further debugged. I can't reproduce this reported bug locally; I will say that if the "Prevent the Flash of Unstyled Text." checkbox is checked this is how it works; fallback used on first load, new font used on next pageload.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedThis puts the loader code above any css; looks like browsers that are not single threaded (firefox & chrome) might parse the css before the js adds the class to the top html tag. Not a lot that can be done here, seems like the use of font-display is the way forward eventually.
This has been committed; reopen if you have more ideas on how to solve this.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedCircling back to this; do all your fonts have a defined fallback? Go to admin/config/development/performance/advagg/font and under NOT Async Loaded in CSS are there any fonts listed?
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedComment #9
mikeytown2 CreditAttribution: mikeytown2 commentedBest that can be done for now