Web fonts, boy, I don't know (2016)
meowni.ca
meowni.ca
1. Wait very briefly (100ms) for the font to load, don't render anything yet.
2. If the font hasn't loaded then use a system font and render the page visibly, keep loading the font for another 3 seconds.
3. Substitute the font once it's loaded, or just continue with the system font if it's not.
If the webfont is small enough (~16k on my site, times three for italics and bold, ~50k in total) then this works quite well even on slower 2G connections.
One thing I also do is remove unused codepoints, which can reduce the size quite a bit. In my case, it reduced the size from ~150k to ~50k. I have a little script that just scans all text files in a directory and removes and codepoints that don't exist: https://github.com/arp242/ttftrim
if you consider swapping a font and potentially the layout after the viewer has already started reading the intial load as working quite well, then we definitely have different definitions. the only thing more annoying would be if the layout changed because you threw an ad at me after intial layout
But these days font-display: optional works just about everywhere too.
Also on firefox you can configure the 3 seconds to be something else.
You can also configure this timeouts in your browser (hidden settings, but that's how it is these days) if you really don't like it.
Usually all weights have the equivalent nodes and curves in their bezier paths, so that intermediate weights can be interpolated between masters. The only delta in size you would get is if the joining/flattening of these paths resulted in different nodes in the exported fonts. As different weights typically include the same open type feature code and glyph set, I’m not sure anything else would cause much variation in size.
It's even an option in Firefox. And not something that's hidden in about:config. one of the benefits of Firefox over Chrome.
Only thing that breaks is when developers abuse fonts to display random icons in non-standard ways (other than unicode symbols/emoji/...).
Overriding everything to font-display: optional also forcefully solves the problem but with much less collateral damage.
In many cases, I just want to read it.
Discussions like this sometimes make me wonder what the value really is. Of course, it is hard to know. For everyone like me, there are others who lose value when presentation is too coarse.
And don't get me wrong. I love well presented material, type, layout all done well. These things do matter. Same with visuals, graphs, animations...
I am not sure damage is the right word.
Pain seems apt. Just wanted to share perspective.
You're making me wonder if having an option to load pages in "readability mode" by default might be a way to go, going forward. That should work great for the majority of content linked from HN at any rate.
The advantage is that you get one consistent view of the web tailored to your preferences. (putting the user back in control, like in early browsers in the 90s).
I am inclined to give that a try myself. Maybe simulate it with a quick hack, or just enter the mode on some new links as I encounter them to see how it feels.
Here's a similar discussion:
The move to standardize one space after period at end of sentence.
I hate it. Many others love it, and I sometimes wonder at just how differently we appear to value things.
Input on mobile is a mess because there is no longer any way to differentiate between a period marking an abbreviation and one at end of sentence.
The autocorrect function, intended to help with touch input is a mess now too.
And when I use Voice input, I get a lot of randomly capitalized Words because of how this has played out. When I reset my mobile dictionary, that goes away, but so does all the benefit of the "learned words" function.
To me, that seems more like real damage.
Yet when I go to discuss this with people, I get a similar response to what we saw here. Your Overton Window point resonates!
And I'm only making this one to just kind of illustrate the minor struggle in these kinds of things, and that there are a lot of these little Struggles kind of just dragging us down on many fronts, and I don't think we notice all of them.
It looks like Safari for Mac can make readability mode the default for all sites, if you go into Preferences > Websites > Reader and set "When visiting other websites" to On.
https://addons.mozilla.org/en-US/firefox/addon/auto-reader-v...
While you're at it, do you have any tips for disabling all font-weights < 400 and force them to 400? :)
Something like:
min-font-weight: 400 !important;
And I'll be one very happy web user.I'm forced to do it with a userscript currently, which is less than optimal.
And to the author, if I was traveling and on low bandwith networks I'd probably just block all fonts, not sure how effective or what might break but its gotta be better than nothing.
At least in the website I adjusted the fonts of, I set it to use the font locally if you had it, otherwise distributing it selfhosted style so not to send data to another service.
Also Firefox has an option to ignore CSS specified fonts.
I say "should do" because I don't think it comes with fonts. Just CSS and JS files. It should make a real difference on slow connections.
I wish more devs/designers/managers/whatever realized how many people access the internet either on a slow connection or a slow device or both. even in the first world, most areas outside of city limits is spotty 3G territory.
also, nobody gives a fuck about all the fancy bullshit. how many top websites look like something from awwwards?
Here's the discussion from then: https://news.ycombinator.com/item?id=12865998
Web fonts, boy, I don't know - https://news.ycombinator.com/item?id=12865998 - Nov 2016 (323 comments)