aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c18
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f60b400b930..67a547a8058 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-02-27 Chong Yidong <cyd@stupidchicken.com>
2
3 * font.c (font_parse_fcname): Recognize "Book", "Condensed", and
4 "Semi-Condensed" keywords in GTK names (Bug#5646).
5
12010-02-26 Kenichi Handa <handa@m17n.org> 62010-02-26 Kenichi Handa <handa@m17n.org>
2 7
3 * ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec. 8 * ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec.
diff --git a/src/font.c b/src/font.c
index 5f1d59afe22..de84dc43d53 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1576,6 +1576,12 @@ font_parse_fcname (name, font)
1576 prop = font_intern_prop ("light", 5, 1); 1576 prop = font_intern_prop ("light", 5, 1);
1577 FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); 1577 FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop);
1578 } 1578 }
1579 else if (PROP_MATCH ("Book", 4))
1580 {
1581 prop_found = 1;
1582 prop = font_intern_prop ("book", 4, 1);
1583 FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop);
1584 }
1579 else if (PROP_MATCH ("Semi-Bold", 9)) 1585 else if (PROP_MATCH ("Semi-Bold", 9))
1580 { 1586 {
1581 prop_found = 1; 1587 prop_found = 1;
@@ -1600,6 +1606,18 @@ font_parse_fcname (name, font)
1600 prop = font_intern_prop ("oblique", 7, 1); 1606 prop = font_intern_prop ("oblique", 7, 1);
1601 FONT_SET_STYLE (font, FONT_SLANT_INDEX, prop); 1607 FONT_SET_STYLE (font, FONT_SLANT_INDEX, prop);
1602 } 1608 }
1609 else if (PROP_MATCH ("Semi-Condensed", 14))
1610 {
1611 prop_found = 1;
1612 prop = font_intern_prop ("semi-condensed", 14, 1);
1613 FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop);
1614 }
1615 else if (PROP_MATCH ("Condensed", 9))
1616 {
1617 prop_found = 1;
1618 prop = font_intern_prop ("condensed", 9, 1);
1619 FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop);
1620 }
1603 else { 1621 else {
1604 if (prop_found) 1622 if (prop_found)
1605 return -1; /* Unknown property in GTK-style font name. */ 1623 return -1; /* Unknown property in GTK-style font name. */