Hacker News new | ask | show | jobs
by Gorgor 1965 days ago
I had not known about 'font-display: optional' before. Now I wish more sites used it because there has been so many times where I started reading something on my phone with slow internet when it had not fully loaded yet. It’s really annoying to see the page jump around a while later after font loading finished and you realize that you just wasted data on nothing.

In my opinion, 95 % of websites should just use system fonts. They’re good enough for almost every need really.

3 comments

> 95 % of websites should just use system fonts.

Although I do wish there are a few standard font that is shipped across all browser. Sometimes I want the website to appear exactly the same on all System.

The site should appear exactly the same in a fullscreen browser on a 27" desktop monitor, and on an original iPhone? That's rarely a useful goal.

For a page that really needs to look "exactly the same" everywhere it's viewed, maybe PDF is a better choice than HTML+CSS.

See my comment to the parent for an example of a site that needs to look the same (or rather - a portion of site - an HTML Canvas) that has to look the same on every device and which needs a specific font loaded to work properly. For my case, having a font that was guaranteed the same in every browser would have been very nice, and I would have gladly used that if it worked and fit the theme closely enough.
Are you a designer?

If you want your document to look the same on all systems create an image.

That's definitely the correct move given how browsers work, but I don't think it's wrong to wish for font consistency.
Even if there was consistency in the actual fonts their rendering depends on the platform/engine or even just the device settings. If you want precise display metrics you should use an image (SVG counts). If I've got large text enabled on my phone we could have the same exact device and my display metrics won't match yours.
Nice, but it's more important for my browser not to leak information about me via what fonts I needed to download.

Also, it gets really annoying when sites demand that my desktop look like my mobile phone but blown up really big. Twitter's already that way, and the Facebook redesign did the same thing.

There are a few metric compatible fonts used by stuff like pdf. and so on. I believe an alias for these fonts are needed. Obviously add an emoji and UI font. that will be the best
There are a few standard fonts, but no one wants to use them.
And with smartphones, they're no longer installed on every system. I really wish that Chrome and probably other browsers would install a set of fonts from Google Fonts. I don't see a reason why this shouldn't be possible. That's what most sites use, anyway. I guess it's related to Google being able to track usage of these fonts.
Is it possible to configure your browser to treat every site as if it used 'font-display: optional'? I'd love to be able to do that. Seems like it should be up to the user to decide, not the web developer.
Browsers typically let you define a user stylesheet somewhere in the settings. I tried it in Safari with a simple `body {@font-face {font-display: optional;}}` but I could't verify if it has any effects. I think it is difficult because @font-face will be evaluated differently than usual css, say `color: red`. Maybe someone who has a better understanding of css could try it...
uBlock Origin lets you block/allow web fonts globally or per site.