After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 384362 - pango can't select some font styles
pango can't select some font styles
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-12-10 14:18 UTC by Roozbeh Pournader
Modified: 2009-01-04 02:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Sample python script that shows the problem (167 bytes, text/plain)
2006-12-10 14:19 UTC, Roozbeh Pournader
Details
ExtraLight being displayed as Book (38.25 KB, image/png)
2006-12-10 14:29 UTC, Denis Jacquerye
Details

Description Roozbeh Pournader 2006-12-10 14:18:28 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.
Comment 1 Roozbeh Pournader 2006-12-10 14:19:28 UTC
Created attachment 78077 [details]
Sample python script that shows the problem
Comment 2 Denis Jacquerye 2006-12-10 14:29:00 UTC
Created attachment 78078 [details]
ExtraLight being displayed as Book

Here's a screenshot of ExtraLight being displayed as Book when selected.
Comment 3 Roozbeh Pournader 2006-12-10 14:40:40 UTC
This is from the OpenType spec, specifying some weights:

http://www.microsoft.com/typography/otspec/os2.htm#wtc
Comment 4 Roozbeh Pournader 2006-12-10 19:20:43 UTC
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.
Comment 5 Behdad Esfahbod 2007-04-12 20:45:24 UTC
The bug is not in fontconfig.
Comment 6 Behdad Esfahbod 2009-01-04 02:26:02 UTC
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).