ThemeZ
ThemeZ

Reputation: 493

How is text thickness calculated according to css property "font-weight"?

Font weight in Firefox:

font-weight in firefox

Font weight in Chrome:

font-weight in chrome

The font-weight value is in the order of 100,500,600,700,900, which is set according to the W3C standard.

You can clearly see that the text thickness is not changed linearly, and in different browser not exactly the same (it's almost the same from 100 to 500.). So I wonder, is there a standard on how the text is calculated according to font-weight?

Upvotes: 8

Views: 2991

Answers (1)

yas
yas

Reputation: 3620

The algorithm, at least in theory, is: http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight

The CSS3 specification is similar - http://www.w3.org/TR/css3-fonts/#font-weight-prop

As it states, bold faces are often synthesized by user agents for faces that lack actual bold faces.

I've found its often better to avoid font-weights all together, and use a specific font face.

Upvotes: 1

Related Questions