Live data from Hacker News

Modern Font Stacks

modernfontstacks.com

41–50 of 80 posts

Re: Modern Font Stacks

#41

Similarly: https://www.cssfontstack.com/

This one surprised me: Helvetica Win: 7.34% Mac: 100% I know Microsoft prefers Arial over Helvetica, so I guess I shouldn't be surprised. But I didn't expect macOS to adopt it so widely. Arial Win: 99.84% Mac: 98.74% Then again, the Mac was designed from day one for this sort of thing.

It just means it's installed by default on all Macs, but not Windows

Re: Modern Font Stacks

#42
post #23
post #16

Earlier quoted context omitted.

I don't think web pages should stay away from font stacks just to handle people with changed esoteric browser prefs. If you as a user want to see different fonts everywhere, you'll need invasive tools that block font face etc. Or Firefox (where this message comes from) has a setting to "Allow pages to choose their own fonts, instead of your selections above"

> esoteric browser prefs That hurts. I see where you are standing, and can confirm you expressed opinion of the contemporary majority of browser users, but man, how sad it that. The attitude diverged by a light years, when "Setting preferred fonts for generic font families" is now "esoteric". (Web) browsers ("user agents") came to existence with these capabilities in mind, and even now are build around the principle…

Browsers have ceded way too much control to web designers. The user should be in control. When it comes to what fonts the computer uses, the text size, the color scheme, the user preference should be able to easily override the web site's code. Who's computer is it, anyway?

Re: Modern Font Stacks

#43
post #15
post #12

I don't really get it, maybe my phone is just old but I saw exactly 3 fonts on this page: serif, sans, and mono. None of the other fonts are available on my phone so each category looked identical. Is this experience better on other devices? To me this was not a useful demo because it reinforced the fact that you need to ship fonts if you want users to see that specific font.

I assume you're on Android? That's the weak link when it comes to system fonts, it only ships with a handful so many of these stacks end up looking identical in practice. If you go through to the GitHub page there's screenshots of how each stack gets rendered on each platform. If you're not happy with what Android offers then a possible compromise would be to make a hybrid stack which tries Windows and Apple system f…

Yeah I'm on android. I guess the hybrid approach offers a couple benefits, thanks for the reply.

Re: Modern Font Stacks

#44
post #23
post #16

Earlier quoted context omitted.

I don't think web pages should stay away from font stacks just to handle people with changed esoteric browser prefs. If you as a user want to see different fonts everywhere, you'll need invasive tools that block font face etc. Or Firefox (where this message comes from) has a setting to "Allow pages to choose their own fonts, instead of your selections above"

> esoteric browser prefs That hurts. I see where you are standing, and can confirm you expressed opinion of the contemporary majority of browser users, but man, how sad it that. The attitude diverged by a light years, when "Setting preferred fonts for generic font families" is now "esoteric". (Web) browsers ("user agents") came to existence with these capabilities in mind, and even now are build around the principle…

It's mixed bag... the designer of a given website has an intended look/feel and style... if you override that you can do as you like, but it's not like the author's intent should always simply be dismissed.

Beyond this, not every web developer expressly wants to burden a browser to a specific web font payload when they have a close/suitable match where this modern font stack is good enough in terms of design intent.

Third, if all else fails, the user sees their own selected default... I'm not sure that I understand the objection here... As long as appropriate semantic markup and the font is one that actually scales to appropriate px/pt then it should be fine. If the selected font/typeface doesn't, then it's on the user to select a better default/fallback.

Re: Modern Font Stacks

#45
post #36
post #19

Earlier quoted context omitted.

This is excellent analysis, but I think you've forgot to mention one particular detail in your environment description: - Firefox Browser Privacy Enhanced Tracking Protection setting changed to "Strict". It is not default, and explicitly indicates this kind of outcome can potentially happen. But truly agree that the situation here is suboptimal in all aspects. Also maybe worth noting that we can always force our (thr…

> Allow pages to choose their own fonts" in settings. Yes, this is nuclear option, but I can attest that I use it time to time, and it is quite usable. Does this nuke icon fonts? I presume yes.

Icon fonts are bad for accessibility. Better to use SVG graphics and provide alt text for screen readers.

Re: Modern Font Stacks

#46
post #35

Earlier quoted context omitted.

This one surprised me: Helvetica Win: 7.34% Mac: 100% I know Microsoft prefers Arial over Helvetica, so I guess I shouldn't be surprised. But I didn't expect macOS to adopt it so widely. Arial Win: 99.84% Mac: 98.74% Then again, the Mac was designed from day one for this sort of thing.

I believe Helvetica has shipped with every Macintosh since the very first one.

Not quite. The original sans font on the Mac was Geneva. It was only with the advent of the Laserwriter that Helvetica became a standard font on the Mac.

Re: Modern Font Stacks

#47
post #23

Earlier quoted context omitted.

> esoteric browser prefs That hurts. I see where you are standing, and can confirm you expressed opinion of the contemporary majority of browser users, but man, how sad it that. The attitude diverged by a light years, when "Setting preferred fonts for generic font families" is now "esoteric". (Web) browsers ("user agents") came to existence with these capabilities in mind, and even now are build around the principle…

Browsers have ceded way too much control to web designers. The user should be in control. When it comes to what fonts the computer uses, the text size, the color scheme, the user preference should be able to easily override the web site's code. Who's computer is it, anyway?

I'd be pretty over the moon if the browser supported the following preferences... especially given the number of electron or otherwise browser embedded UI options..

    system.font.primary
    system.font.header
    system.font.monospace
    system.colors.foreground
    system.colors.background
    system.colors.header
    system.colors.highlight
    system.colors.accent
It might be reasonable to have more than this, and the accent and highlight color may or may not be the same color... but it would go a long way towards matching the system defaults, with appropriate css variables injected as well.

Re: Modern Font Stacks

#48
post #22

Earlier quoted context omitted.

Your example is instructive, but I fail to see what the problem is. This is working as intended, no?

It's exactly what the manual specifies: https://github.com/system-fonts/modern-font-stacks?tab=readm... Windows 11+ -> Cascadia Code Windows 7+ -> Consolas

I tend to add Inconsolata (open Consolas-like typeface) as well as a fallback... since it's closer to what I'm intending if going for the Cascadia Code as a default... in case it's installed in non-windows or otherwise those fonts aren't present.

Re: Modern Font Stacks

#49
post #18

Earlier quoted context omitted.

These font stacks don't handle anything at all, they just throw a bunch of common typeface names at the wall and they can't even tell what sticks because it's so random. All the while, the user might have a prefered fallback font set that they prefer over any of the ones in the font stack - and even if that isn't the case, simply using 'monospace' as the only fallback will render the default monospace font anyway. I…

they just throw a bunch of common typeface names at the wall and they can't even tell what sticks because it's so random. Anytime someone on HN doesn't understand CSS, they throw up their hands and call it random. Just because you don't understand what's happening doesn't mean it's random. I don't understand the SAM76 programming language, but I don't pretend that !%ii,*,1,1,!%mu,*,%F,%su,*,1//////////= is "random."…

Oh you flatterer!

My top level comment was not a complaint at all, but rather a heads-up regarding the potentially unexpected or often misunderstood effects of applying these font stacks, accompanied by a practical example, and a personal recommendation with my reasoning.

Now, please, don't be so hostile. It's nasty and makes you come across as a lot more stupid than I believe you really are.

Re: Modern Font Stacks

#50
post #24

Earlier quoted context omitted.

It already works as intended. If the intent is to render a default system font, then let the system handle that by simply applying 'monospace'.

That is clearly not the intention, else there would be no reason to bother with font stacks. The intention is to list a set of ranked preferences, implemented as fallbacks, that best express the designer’s vision for the site, while avoiding font downloading. In your example, presumably the designer thinks that Consolas works better than JetBrains Mono NL.

Yes, I see what you mean, but if that's really the intent, then having only this font-family rule isn't sufficient. For that argument/reasoning to hold up, it would have to be accompanied by metrics adjustments to compensate for the massive differences between some of the listed fonts in these stacks.
Post reply on HN