3 ms·
Your example is instructive, but I fail to see what the problem is. This is working as intended, no?
by leephillips 1y ago
Your example is instructive, but I fail to see what the problem is. This is working as intended, no?
- andix 1y agoIt's exactly what the manual specifies: https://github.com/system-fonts/modern-font-stacks?tab=readme-ov-file#monospace-code https://github.com/system-fonts/modern-font-stacks?tab=readm... Windows 11+ -> Cascadia Code Windows 7+ -> Consolas
- tracker1 1y agoI 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.
- krono 1y agoIt already works as intended. If the intent is to render a default system font, then let the system handle that by simply applying 'monospace'.
- leephillips 1y agoThat 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.
- krono 1y agoYes, 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.
- leephillips 1y agoAbsolutely true. In fact (and thank you for getting me to think about this), font stacks without metric adjustments don’t really make much sense, do they? (Unless confined to a list of fonts that are very close metrically, which they never are.)