Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Font weights and thickness classification (in Freetype)

$
0
0
What is the standardized way to quantify font weights in FreeType? FT seems to expose the style name via FT_Face, which provides a string-based descriptive name, but I'm encountering a number of styles that do not have a one-to-one match on the weight scale used by WinAPI (I'm not sure where the origin of the weight scale is from). For instance, "Narrow" does not seem to be a quantifiable descriptor. Nor does "Condensed". I presently have the following table, but it's incomplete (eg in addition to the two abovementioned styles it lacks things like "Semilight", etc): Extra Light = 100 Ultra Light = 100 Light = 200 Thin = 200 Book = 300 Demi = 300 Normal = 400 Regular = 400 Medium = 500 Semibold = 600 Demibold = 600 Bold = 700 Black = 800 Extra Bold = 800 Heavy = 800 ExtraBlack = 900 Fat = 900 Poster = 900 Ultra Black = 900 In addition to this, the PostScript descriptor seems to have a weight member (though I cannot tell whether it uses the same scale as above) and there seems to be no entirely consistent way in which the literal style tokens are written in the first place ("Semi Light" != "Semilight"). Am I missing something obvious or is there some voodoo involved here?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>