More than you ever wanted to know about font loading on the web (2021)
industrialempathy.com
industrialempathy.com
All the time I try to click on something, the layout shifts, and I wind up clicking on an ad. Maybe that's how Google can get $50B a year in ad revenue but you can't find anybody who admits they've clicked on an ad.
I am looking at you, Taboola.
Googles entire business model depends on building enough "Cool Shit", and hiring the "Best and Brightest" to reputation wash the fact that most of their GDN / AdX / GAM revenue is click-tricking navigation/actions and misclicks.
Wait is this true? Definitely warrants some kind of citation. If no one's heard one way or another I might test it later because I'm pretty skeptical of this claim.
Edit: mind blown
[1] https://developer.mozilla.org/en-US/docs/Web/API/Resource_Ti...
gfx.downloadable_fonts.enabled
Some sites rely on icon fonts for buttons, and they appear as Unicode placeholders instead. I don't mind, and consider it a time-saving benefit which reduces my effort spent on low-quality websites.
In Firefox, you also just have the “Allow pages to choose their own fonts, instead of your selections above” checkbox in Settings → Fonts → Advanced that you can untick, which will stop most web fonts from loading, though Private Use Area code points (used in icon fonts) will still work from web fonts (so that Google’s Material Icons with its stupid ligation technique is just about the only thing that will be mangled).
That is not at all my experience while browsing without JS enabled.
letter-spacing: this has been giving me grief recently. It’s mostly a tool for people second-guessing the font designer because they chose a font that they liked but didn’t actually like because it was too wide, and now they’re tightening the letter-spacing, but poor people like me who have told their browser not to let pages override their font choices¹, or those for whom the web font just fails to load for whatever reason, now have to suffer for it, surprisingly often to the point where letters collide (not often in the scheme of things, but surprisingly often to me). My opinion is that you should absolutely never adjust letter-spacing at body text sizes, with the sole exception of all-caps text where it is generally desirable to add up to about 0.05em. If you feel the need to set letter-spacing on body text in any other situation, you’re using the wrong font.
font-feature-settings: some OpenType features are generic, like tnum for tabular numbers, but others like stylistic sets are explicitly linked to a particular font, so that if you set this globally in this way, you might actually trigger something in another font that ruins things. For example, my monospace is Triplicate, and ss01 makes it not monospaced (called the Poly variant), so if you activate ss01 and were doing box drawing or similar, it just got ruined. Or if you’re using a version of panr’s Terminal theme² for Hugo from more than a few months ago (when it got fixed for the wrong reasons, but it got fixed), it has the case feature set improperly, which is supposed to just adjust vertical positioning of some punctuation to fit all-caps text, but in practice a number of font foundries (including at least one of the biggest) have decided to work around inferior desktop publishing software (leastways, that’s why Matthew Butterick decided to do it) by making that feature also substitute uppercase glyphs—so now the entire page is all caps.
The particularly galling part to me is that there actually is a defined way of doing this properly for font-feature-settings, scoping by font, but Firefox implemented it in 2014 and no one else has touched it. Sigh.
/* The current and inferior way: */
code {
font-family: triplicate, monospace;
font-feature-settings: "ss01";
}
/* The new and improved way that Google and Apple haven’t implemented: */
@font-feature-values triplicate {
@styleset {
poly: 1;
}
}
code {
font-face: triplicate, monospace;
font-variant-alternates: styleset(poly);
}
I’d really like something better for letter-spacing, too. Maybe a letter-spacing-adjust @font-face property or something. I dunno.—⁂—
¹ I started doing this a few months back in Firefox as an experiment, and I’ve never gone back—it significantly improves the web, with Google’s Material Icons web font with its stupid ligation technique being practically the only meaningful casualty.
² Which I hate, by the way—monospaced fonts are generally quite bad for long-form reading, and are still more so when presented light-on-dark and with excessively wide columns. Do you know just how much more readable those sorts of pages become when you swap in a serif or sans-serif font? Try reading half an article, then swap it and go away for a few minutes so that it doesn’t feel weird, then come back and read the rest. The effect is quite remarkable.
thanks for pointing out that css font settings can be scoped to fonts, even if it's firefox only for now.
It's not that hard to get right (seriously, it should take maybe an hour?) and won't need to be touched ever again once you have it in good shape :)
If the choice is between style vs performance, we should always default toward performance. Besides many OS's have added more system fonts throughout the last two decades. If anything we need to encourage OS's to have more interfont operability (if that's a word), I don't know the legal ramifications (there's gotta be one) but there's no reason why the most popular google fonts couldn't be included in various OS's.
Obviously I'm not an OS dev, so I'm curious if the limitations are purely legal or implementation.
This is to prevent fingerprinting of users (adding new browser-accessible fonts would sadly mean more accurate fingerprinting)