GNOME Bugzilla – Bug 384362
pango can't select some font styles
Last modified: 2009-01-04 02:26:02 UTC
Pango seems not to be able to select certain font styles. It can only handle those hardcoded in it. For example, with fontconfig 2.4.2 installed, one cannot select DejaVu Sans ExtraLight, because Pango doesn't know that ExtraLight is a font weight descriptor. This may be a design fault, but can be temporarily fixed by being able to handle more common strings in pango_font_description_from_string. Will attach a sample file showing the problem.
Created attachment 78077 [details] Sample python script that shows the problem
Created attachment 78078 [details] ExtraLight being displayed as Book Here's a screenshot of ExtraLight being displayed as Book when selected.
This is from the OpenType spec, specifying some weights: http://www.microsoft.com/typography/otspec/os2.htm#wtc
Apparently the bug is in fontconfig. The only thing to see here is possible addition of more aliases or font styles which may be good or bad.
The bug is not in fontconfig.
2009-01-03 Behdad Esfahbod <behdad@gnome.org> Bug 384362 – pango can't select some font styles * pango/pango-font.h: Add enum values PANGO_WEIGHT_THIN and PANGO_WEIGHT_MEDIUM to PangoWeight. * pango/fonts.c: Parse "Thin", "Extra-Light", "Regular", "Demi-Bold", "Extra-Bold", and "Black" as weight descriptors (from the OpenType spec).