diff options
author | Chong Yidong <[email protected]> | 2010-02-26 21:06:13 -0500 |
---|---|---|
committer | Chong Yidong <[email protected]> | 2010-02-26 21:06:13 -0500 |
commit | fe69a72236d483ea3ce08084d0a6a315a82b5cab (patch) | |
tree | 392d36bca754a74104a5fd3581aa7967da07f668 /src | |
parent | b8280f393023247c6cb21e7546fc9edd891fb711 (diff) |
Recognize more keywords in GTK font names (Bug#5646).
* font.c (font_parse_fcname): Recognize "Book", "Condensed", and
"Semi-Condensed" keywords in GTK names (Bug#5646).
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/font.c | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f60b400b93..67a547a805 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-02-27 Chong Yidong <[email protected]> + + * font.c (font_parse_fcname): Recognize "Book", "Condensed", and + "Semi-Condensed" keywords in GTK names (Bug#5646). + 2010-02-26 Kenichi Handa <[email protected]> * ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec. diff --git a/src/font.c b/src/font.c index 5f1d59afe2..de84dc43d5 100644 --- a/src/font.c +++ b/src/font.c @@ -1576,6 +1576,12 @@ font_parse_fcname (name, font) prop = font_intern_prop ("light", 5, 1); FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); } + else if (PROP_MATCH ("Book", 4)) + { + prop_found = 1; + prop = font_intern_prop ("book", 4, 1); + FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); + } else if (PROP_MATCH ("Semi-Bold", 9)) { prop_found = 1; @@ -1600,6 +1606,18 @@ font_parse_fcname (name, font) prop = font_intern_prop ("oblique", 7, 1); FONT_SET_STYLE (font, FONT_SLANT_INDEX, prop); } + else if (PROP_MATCH ("Semi-Condensed", 14)) + { + prop_found = 1; + prop = font_intern_prop ("semi-condensed", 14, 1); + FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop); + } + else if (PROP_MATCH ("Condensed", 9)) + { + prop_found = 1; + prop = font_intern_prop ("condensed", 9, 1); + FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop); + } else { if (prop_found) return -1; /* Unknown property in GTK-style font name. */ |