I am trying to understand font weight, so that I may request specific fonts weights from Google fonts.
I have installed all Google Fonts (all TrueType) on Ubuntu 16, and if I do:
fc-list : family : weight
Then I get a result like this:
Nunito,Nunito Black:weight=210
Nunito,Nunito ExtraBold:weight=205
Nunito,Nunito ExtraLight:weight=48
Nunito,Nunito Light:weight=50
Nunito,Nunito SemiBold:weight=180
Nunito Sans,Nunito Sans Black:weight=210
Nunito Sans,Nunito Sans ExtraBold:weight=205
Nunito Sans,Nunito Sans ExtraLight:weight=48
Nunito Sans,Nunito Sans Light:weight=50
Nunito Sans,Nunito Sans SemiBold:weight=180
Nunito Sans:weight=200
Nunito Sans:weight=80
Nunito:weight=200
Nunito:weight=80
OdorMeanChey:weight=80
Offside:weight=80
OFL Sorts Mill Goudy TT:weight=100
Oldenburg:weight=80
Old Standard TT:weight=200
Old Standard TT:weight=80
Oleo Script Swash Caps:weight=200
Oleo Script Swash Caps:weight=80
Oleo Script:weight=200
Oleo Script:weight=80
Open Sans Condensed,Open Sans Condensed Light:weight=50
Open Sans Condensed:weight=200
Open Sans Hebrew Condensed,Open Sans Hebrew Condensed Extra Bold:weight=205
Open Sans Hebrew Condensed,Open Sans Hebrew Condensed Light:weight=50
Open Sans Hebrew Condensed:weight=200
Open Sans Hebrew Condensed:weight=80
Open Sans Hebrew,Open Sans Hebrew Extra Bold:weight=205
Open Sans Hebrew,Open Sans Hebrew Light:weight=50
Open Sans Hebrew:weight=200
Open Sans Hebrew:weight=80
Open Sans,Open Sans ExtraBold:weight=205
Open Sans,Open Sans Light:weight=50
Open Sans,Open Sans SemiBold:weight=180
Open Sans:weight=200
Open Sans:weight=80
Oranienbaum:weight=80
Orbitron,Orbitron Black:weight=210
Orbitron,Orbitron Medium:weight=100
Orbitron:weight=200
Orbitron:weight=80
Oregano:weight=80
Orienta:weight=80
Original Surfer:weight=80
Oswald,Oswald ExtraLight:weight=48
Oswald,Oswald Light:weight=50
Oswald,Oswald Medium:weight=100
Oswald,Oswald SemiBold:weight=180
It appears that the default weight in many cases seems to be 80 (I expected default to be 400 normal), and the other font weights are all over the place.
I had expected the font weights reported by fc-list to correspond to the "Common weight name mapping" found on this page: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight but clearly they do not.
Value Common weight name
100 Thin (Hairline)
200 Extra Light (Ultra Light)
300 Light
400 Normal
500 Medium
600 Semi Bold (Demi Bold)
700 Bold
800 Extra Bold (Ultra Bold)
900 Black (Heavy)
So my first question is why do the reported font weights not correspond to the map above?
Second question, given that they do not match, and yet my TrueType fonts came directly from Google Fonts, if I want to request fonts from Google Fonts, what weight do I specify - the weight from the mapping table above, or the weight as reported by fc-list?
FontConfig uses its own internal weight system, the values can be mapped according to the table below. The constants in the table were manually translated using the fontconfig header.
0 <-> (0) FC_WEIGHT_THIN
100 <-> (0) FC_WEIGHT_THIN
200 <-> (40) FC_WEIGHT_EXTRALIGHT, FC_WEIGHT_ULTRALIGHT
300 <-> (50) FC_WEIGHT_LIGHT
350 <-> (55) FC_WEIGHT_DEMILIGHT, FC_WEIGHT_SEMILIGHT
380 <-> (75) FC_WEIGHT_BOOK
400 <-> (80) FC_WEIGHT_REGULAR, FC_WEIGHT_NORMAL
500 <-> (100) FC_WEIGHT_MEDIUM
600 <-> (180) FC_WEIGHT_DEMIBOLD, FC_WEIGHT_SEMIBOLD
700 <-> (200) FC_WEIGHT_BOLD
800 <-> (205) FC_WEIGHT_EXTRABOLD, FC_WEIGHT_ULTRABOLD
900 <-> (210) FC_WEIGHT_BLACK, FC_WEIGHT_HEAVY
1000 <-> (215) FC_WEIGHT_EXTRABLACK, FC_WEIGHT_ULTRABLACK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With