logoalt Hacker News

Font-Family Recommendations

38 pointsby birdculturelast Friday at 9:37 PM12 commentsview on HN

Comments

sometimeztoday at 8:07 PM

So basically just use monospace, serif, or sans-serif because you can't 100% be sure it'll render correctly?

porphyratoday at 8:12 PM

> If not inlined, subresources can fail to load for all kinds of network reasons.

Also, it's commonly recommended to load fonts asynchronously/deferred without blocking the main page render. But I HATE it when the page jumps around as it cycles through different fonts before the real one loads. I'd rather get dinged on PageSpeed insights with "Requests are blocking the page's initial render, which may delay LCP. Deferring or inlining can move these network requests out of the critical path." rather than have everything popping about for the first second. Is it just me?

show 1 reply
Grom_PEtoday at 10:09 PM

What the hell.

Just now I learned of "font-family: monospace, monospace" hack. Indeed, browsers will render the font smaller with just one "monospace".

I've never run into it before because setting explicit font-size in pt or px avoids that weirdness.

Terrettayesterday at 10:39 PM

These days you can have an LLM code you up python to custom match visual metrics from your preferred web fonts to the likely user fonts across your statistical user base.