11

The CSS specification (among several others) establish that, when selecting a font, the font-weight may be described using numerical descriptors ranging from 100 to 900 at 100 increments, where 400 is reserved for the "regular" weight and 700 for "bold" (this article contains an example of a mapping).

Are these numbers assigned merely conventionally or is there some sort of (at least theoretical) numerical relation between, say, stem thickness and advance width which controls the numerical descriptor that a font "ought" to receive (regardless of whether that relation is respected in any particular font)?

2 Answers 2

8

The CSS font-weight is influenced by Linotype numbering system. As you can learn from the wiki, every digit in the number describes different characteristic of the typeface and from this point CSS adopted Lynotype in part... The 100 to 900 system works for some fonts, but fails for other, thus you should always check this in advance before using particular values in the CSS code.

6

Linotype made it to CSS over Panose system partly because of licensing concerns. See http://en.wikipedia.org/wiki/PANOSE. The Panose number is used in TrueType, OpenType and SVG fonts and contains infromation about weight, proportion, contrast etc.

The Panose weight number is more or less the same system as the Linotype/CSS. From very light to extra black. See the quote below.

Fontforge can caluclate the Panose number. http://fontforge.org/fontinfo.html#Panose

So Fontforge uses some sort of (at least theoretical) numerical relation to calculate weight.

UPDATE

... the calculations for weight are among the easiest to compute.

There are specific letters used for measuring weight: CapH is the Height of the capital H. WStemE is width of the stem of the capital E.
WeightRatio = CapH / WStem(E)

2_0 = Any (Don't use.)
2_1 = No Fit (Don't Use)
2_2-Very Light....................WeightRat ≥ 35 (35 or greater)
2-3-Light....................18 ≤ WeightRat < 35 (18 or greater, less than 35)
2_4 Thin.....................10 ≤ WeightRat < 18
2_5-Book....................7.5 ≤ WeightRat < 10
2_6-Medium..................5.5 ≤ WeightRat < 7.5
2_7-Demi....................4.5 ≤ WeightRat < 5.5
2_8-Bold....................3.5 ≤ WeightRat < 4.5
2_9-Heavy...................2.5 ≤ WeightRat < 3.5
2_A-Black...................2.0 ≤ WeightRat < 2.5
2_B-Extra Black...................WeightRat < 2

See: http://forum.high-logic.com/viewtopic.php?f=4&t=941

3
  • If I could mark both this answer and Ilan's above as correct, I would; but while this is the classification which has a formal definition, it is not the 100-900 Linotype classification answered by Ilan. On the other hand, the fact that it is used inside TTF/OTF fonts is very interesting; it may be that I should actually use this classification for a yardstick, even if CSS and Windows don't use it.
    – Wtrmute
    Feb 27, 2014 at 15:10
  • Thanks. I also agree with @Ilan. My response just didn't fit in his comments and ended up as an answer ;). In practice these numbers are mostly used to identify a particular font and not that much for classification. Because a font designer can give a font 'wrong' values, numbers are omitted, etc. I like the idea of a measured font filter in multiple dimensions.
    – allcaps
    Feb 27, 2014 at 16:38
  • See also microsoft.com/typography/otspec/os2.htm
    – allcaps
    Mar 12, 2014 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.