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…
Modern Font Stacks
61–70 of 80 posts
Re: Modern Font Stacks
#62Earlier quoted context omitted.
I think at least a small version of a font stack like these isn't a bad idea even if you're using web fonts. Folks who insist on disabling web fonts are likely a small percentage of any given site's readers, but they're out there. (And for certain sites, like this very one, there's a much higher percentage of them, usually ready to hop right out and proclaim how arrogant it is for web developers to choose typefaces f…
My font stack looks something like this: font-family: "Roboto Serif", Verdana, sans-serif; (Because of the OFL, “Roboto Serif” is replaced by another name since I modified the font when I subsetted it) Large font stacks made sense in the days of IE6 for the following reasons: • Dial up users did not have enough bandwidth to download webfonts. • Only IE supported webfonts, in a weird proprietary “eot” format • 99% of…
Such as the US?
Even in first-world countries, there are places with terrible coverage, where only 2G/3G service is available. The modern Web is pretty much unusable in those conditions, because Web designers think that “everyone has a fast network now”.
Re: Modern Font Stacks
#63Earlier quoted context omitted.
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.…
> it's not like the author's intent should always simply be dismissed. Yes it is. The designer should always understand that the user is ultimately in control of a web page, and that their (the designer's) vision is not what matters at the end of the day.
Re: Modern Font Stacks
#64Earlier 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…
Sure if you want to set browser prefs for fonts, go for it. It'll make the OG sites with almost no stylesheet a little more readable (looking at you, wiki.c2.com). But you should not expect or ask web page authors to not use their preferred fonts. If you want to override web page fonts, use a more invasive or pervasive tool.
Font/page size preferences, on the other hand, web page authors should respect and do a better job with.
Re: Modern Font Stacks
#65An example of something to keep in mind with this technique is that you might actually end up causing the browser to render a different font than either you or the user intended. For a practical example: Environment - Latest Firefox on Windows 10. - Manually installed fonts 'Cascadia Code' and 'JetBrains Mono NL'. - Firefox default 'monospace' font set to 'JetBrains Mono NL'. Setting `font-family: monospace;` would e…
Interesting. "privacy features prevent pages from querying non-standard system fonts" Do you know if and where it is documented which fonts various browsers consider "standard" on which platform? I am afraid I know the answer but one can hope.
https://learn.microsoft.com/en-us/typography/fonts/windows_1...
Re: Modern Font Stacks
#66Re: Modern Font Stacks
#67Here’s the less modern predecessor from way back:
CSS Font Stack: A complete collection of web safe CSS font stacks - https://news.ycombinator.com/item?id=4415661 - Aug 2012 (22 comments)
Re: Modern Font Stacks
#68- reading, - just looking at, - efficiency in printing
Re: Modern Font Stacks
#69I use this quite a bit! At the very least, if you're going to insist on using a custom font, having the rest of one of these stacks behind it can help guarantee that users with third-party resource blockers or other weird browsers get an experience closer to what you intend. For example, I always take Google Font's suggestion for Inter[1]: font-family: "Inter", sans-serif; and change it to: font-family: "Inter", syst…
But there's no guarantee that system-ui is even a sans serif font. Why make that change?
Re: Modern Font Stacks
#70Earlier quoted context omitted.
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."…
> Great! Then the user gets his preferred font, as requested, instead of the one the page specified. No. You've misread the main point. The user would have gotten his preferred font if the font stack was either just plain font-family: monospace; or font-family: , monospace; . But the case is that the suggested font stack contains some "unwanted" font that their system both supports and allows to be used, that precede…