about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-03 06:24:13 +0100
committerGitHub <noreply@github.com>2021-12-03 06:24:13 +0100
commit0ccd56682578790abc045cfd0d0555f47e92f6b0 (patch)
tree761ff4115e4daf779e3bf6c6fa8aee3d8ef07f96 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent570dc70a2b518924384b9d2bbe6736b42b6b4d63 (diff)
parent4198fac7390509128c42757fcfb89a0effde4a8e (diff)
downloadrust-0ccd56682578790abc045cfd0d0555f47e92f6b0.tar.gz
rust-0ccd56682578790abc045cfd0d0555f47e92f6b0.zip
Rollup merge of #91170 - jsha:preload-fonts, r=GuillaumeGomez
rustdoc: preload fonts

Follow-up from #82315.

I noticed that font loading was so slow that even when loading from local disk, we get a flash of unstyled text (FOUT) followed by a reflow when the fonts load. With this change, we reliably get the appropriate fonts in the first render pass when loading locally, and we get it some of the time when loading from a website.

This only preloads woff2 versions. According to https://caniuse.com/?search=preload and https://caniuse.com/?search=woff2, all browsers that support preload also support woff2, so this is fine; we will never load two copies of a font.

Don't preload italic font faces because they aren't used on all pages.

Demo: https://rustdoc.crud.net/jsha/preload-fonts/std/string/struct.String.html
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions