diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-05-24 21:33:29 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-05-24 21:33:29 -0400 |
commit | 8f7d44b499a1ff6165fa1386e4dd1fbd5a7c726f (patch) | |
tree | de1cc2bd7073f61889272ebbafe2bd8655a15db7 /pango | |
parent | ef54df4895e1dfebbaa95c92114e8258dc18eda2 (diff) | |
download | pango-8f7d44b499a1ff6165fa1386e4dd1fbd5a7c726f.tar.gz |
Fix an error in font weight conversion
The fallback code for conversion from fontconfig font weights
to PangoWeight was mixing up PANGO_WEIGHT_SEMILIGHT and
PANGO_WEIGHT_LIGHT.
https://bugzilla.gnome.org/show_bug.cgi?id=749635
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangofc-fontmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 11ba54f6..b73818b2 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -2143,9 +2143,9 @@ pango_fc_convert_weight_to_pango (int fc_weight) else if (fc_weight <= (FC_WEIGHT_EXTRALIGHT + FC_WEIGHT_LIGHT) / 2) return PANGO_WEIGHT_ULTRALIGHT; else if (fc_weight <= (FC_WEIGHT_LIGHT + FC_WEIGHT_DEMILIGHT) / 2) - return PANGO_WEIGHT_SEMILIGHT; - else if (fc_weight <= (FC_WEIGHT_DEMILIGHT + FC_WEIGHT_BOOK) / 2) return PANGO_WEIGHT_LIGHT; + else if (fc_weight <= (FC_WEIGHT_DEMILIGHT + FC_WEIGHT_BOOK) / 2) + return PANGO_WEIGHT_SEMILIGHT; else if (fc_weight <= (FC_WEIGHT_BOOK + FC_WEIGHT_REGULAR) / 2) return PANGO_WEIGHT_BOOK; else if (fc_weight <= (FC_WEIGHT_REGULAR + FC_WEIGHT_MEDIUM) / 2) |