mozilla / Fira

Mozilla's new typeface, used in Firefox OS
mozilla.github.io/Fira
Other
5.06k stars 308 forks source link

"Book" and "Ultra" weights dropping out in Chrome/Windows when installed locally #242

Open colinmford opened 4 years ago

colinmford commented 4 years ago

Hey all,

While investigating a bug in a web app, I found an issue in Chromium that the Book and Ultra weights of Fira Sans exposes. It's not a problem with the fonts (I'm fairly certain), but I wanted to link to the ticket here since it affects Fira (among other fonts with "non-standard" style names such as "Text", "Book", etc), in the hopes that someone else here can confirm the issue and/or can help get it resolved. Thanks!

https://bugs.chromium.org/p/chromium/issues/detail?id=1130792

The issue can be reproduced as follows:

  1. Install Fira Sans on your system by dragging the ttfs to the fonts folder (~/Library/Fonts on Mac, C:/Windows/Fonts on Windows)
  2. Open this page (zip) in Chrome on Windows 10 (or Edge, a Chromium-based browser), and observe that only the "Text" weight falls back to the monospace font.
Fira Sans - Chrome-Win

Open the same page in Chrome/Mac, Firefox/Win or Firefox/Mac, and observe the "Text" weight comes through correctly.

Fira Sans - Chrome-Mac Fira Sans - Firefox-Mac Fira Sans - Firefox-Win

The test page declares each style of IBM Plex Sans in the following manner:

The font's "font family" field (Windows Name ID 1) is reproduced in the font-family CSS property. The font-weight and font-style CSS attributes reflect the font's "font style" field (Windows Name ID 2).

i.e.

font-family: "Fira Sans Book";
font-weight: normal;
font-style: italic;

or

font-family: "Fira Sans";
font-weight: bold;
font-style: normal;

etc.

This is how the fonts are referenced if a user makes an HTML document from a Word document, for example.

Thanks again!