summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-05-24 21:33:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-05-24 21:33:29 -0400
commit8f7d44b499a1ff6165fa1386e4dd1fbd5a7c726f (patch)
treede1cc2bd7073f61889272ebbafe2bd8655a15db7 /pango
parentef54df4895e1dfebbaa95c92114e8258dc18eda2 (diff)
downloadpango-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.c4
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)