4 ms·
I wouldn't credit the CSS spec folks with the 100 to 900 thing for the font weight. I believe that comes from the usWeightClass field [1] of the OS/2 table in
by a_e_k 5y ago
I wouldn't credit the CSS spec folks with the 100 to 900 thing for the font weight. I believe that comes from the usWeightClass field [1] of the OS/2 table in the TrueType (1991) and OpenType (1996) formats. The Win32 API also uses the same value range for selecting a weight when instantiating a font [2].
Furthermore, the CSS spec that the post linked to [3] even mentioned OpenType!:
> If the font family already uses a numerical scale with nine values (like e.g. OpenType does), the font weights should be mapped directly.
[1] https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass https://docs.microsoft.com/en-us/typography/opentype/spec/os...
[2] https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfonta https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf...
[3] https://www.w3.org/TR/CSS1/#font-weight https://www.w3.org/TR/CSS1/#font-weight