-
Notifications
You must be signed in to change notification settings - Fork 47
Reduce FOUT with font preloading #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce FOUT with font preloading #545
Conversation
c513116 to
bfea9f0
Compare
|
An automated preview of the documentation is available at https://545.site-docs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2025-12-18 21:38:08 UTC |
9d0c660 to
16043c5
Compare
|
@julioest this PR is adding "preload" on three NotoSans fonts. In the preview https://545.site-docs.prtest2.cppalliance.org/index.html -> View Source -> the "preload" is included in the source. So the modification is there, right? Nevertheless I still get FOUT in the browser. Do you? |
Are all these "notosans" fonts the primary main fonts? If they were 404ing before, does that mean they weren't displayed? In that case, are they needed? |
Add local font paths first in @font-face src to check for fonts in antora-bundled projects before remote fallbacks. Required before boostorg/website-v2-docs#545 can merge.
100% agreed! This PR in boostlook boostorg/boostlook#147 checks for the antora-bundled font path first.
It's failing because there's no |
Add local font paths first in @font-face src to check for fonts in antora-bundled projects before remote fallbacks. Required before boostorg/website-v2-docs#545 can merge.
af07875 to
70339ea
Compare
6ccf36a to
29e6f11
Compare
29e6f11 to
7cff046
Compare
Problem:
Fonts load late, causing a flash of unstyled text (FOUT) on initial page load.
Solution:
Add
head-fonts.hbspartial with Font Loading API, preload fonts, and 3-second timeout fallback to ensure fonts load before content is visible.Changes:
head-fonts.hbspartial with preload links, Font Loading API implementation, and timeout logicImpact:
Eliminates FOUT, fonts load earlier, graceful fallback for older browsers, better perceived performance.