tachyons icon indicating copy to clipboard operation
tachyons copied to clipboard

sans-serif on windows displays Arial instead of Segoe UI

Open koriolis opened this issue 8 years ago • 4 comments

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): image

koriolis avatar Feb 27 '17 12:02 koriolis

@koriolis Thanks so much for the detailed description of what is going on. I'll take a stab at a fix.

mrmrs avatar Mar 01 '17 15:03 mrmrs

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/

luizbills avatar Mar 01 '17 17:03 luizbills

@mrmrs Any progress on this? I'm a noob at OSS collaboration, but I'll be happy to open a PR with this change.

koriolis avatar Jun 14 '17 13:06 koriolis

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 men­tioned in sys­tem fonts, Ar­ial was de­signed as a clone of Hel­vetica. Hel­vetica has earned its place in ty­po­graphic his­tory hon­estly. But Ar­ial, only by Mi­crosoft im­pos­ing it upon us for 20+ years as the main user-in­ter­face font in Win­dows. That’s the only rea­son you’ve heard of it. That’s the only rea­son you might con­sider us­ing it. That’s a ter­ri­ble rea­son. I try to keep the lit­mus tests to a min­i­mum, but this must be one: you can­not cre­ate good ty­pog­ra­phy with Arial.

Practical Typography by Matthew But­t­er­ick - Helvetica and Arial alternatives

AeonFr avatar Jul 13 '17 23:07 AeonFr