tachyons
tachyons copied to clipboard
sans-serif on windows displays Arial instead of Segoe UI
Due to a less known Windows ~~bug~~ feature, Arial is always matched for Helvetica when Helvetica is not installed on the system.
The current sans-serif
class on _font-family.scss
.sans-serif {
font-family: -apple-system, BlinkMacSystemFont,
'avenir next', avenir,
'helvetica neue', helvetica,
ubuntu,
roboto, noto,
'segoe ui', arial,
sans-serif;
}
will display arial
and not segoe ui
on Windows.
Solution is to move segoe ui
above helvetica
, but because I'm not sure of the font stack strategy it might not be as simple as that :-).
If we move segoe
between helvetica neue
and helvetica
it will never load Ubuntu, Roboto and Noto even if the user has those fonts installed.
Codepen demo: http://codepen.io/koriolis/pen/BWNwMV/
Screenshot (for those not on Windows):
@koriolis Thanks so much for the detailed description of what is going on. I'll take a stab at a fix.
for some reference:
- github uses the following stack:
-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"
- and System Font Stack https://css-tricks.com/snippets/css/system-font-stack/
@mrmrs Any progress on this? I'm a noob at OSS collaboration, but I'll be happy to open a PR with this change.
This will definitely be an improvement. Arial does not deserve to make it to any other website and we can prevent it. Is Butterick words:
As I mentioned in system fonts, Arial was designed as a clone of Helvetica. Helvetica has earned its place in typographic history honestly. But Arial, only by Microsoft imposing it upon us for 20+ years as the main user-interface font in Windows. That’s the only reason you’ve heard of it. That’s the only reason you might consider using it. That’s a terrible reason. I try to keep the litmus tests to a minimum, but this must be one: you cannot create good typography with Arial.
Practical Typography by Matthew Butterick - Helvetica and Arial alternatives