summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-01-26 19:45:30 -0500
committerChong Yidong <cyd@stupidchicken.com>2011-01-26 19:45:30 -0500
commit37d1c45d60c946768ff107bc68141e063dbe80be (patch)
treec1b2c94b8fae00aab2e00e64b47a0d3d86fec354
parentca9c274ae72514a3b06b805456e656ff5ea7d58d (diff)
downloademacs-37d1c45d60c946768ff107bc68141e063dbe80be.tar.gz
Fix GTK font name parsing to allow numbers in names (Bug#7853).
A better fix is already in the trunk. * src/font.c (font_parse_fcname): Require GTK-style font sizes to occur at the end of the font string (Bug#7853).
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index bbfd9592cf1..c74732b4210 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-27 Chong Yidong <cyd@stupidchicken.com>
+
+ * font.c (font_parse_fcname): Require GTK-style font sizes to
+ occur at the end of the font string (Bug#7853).
+
2011-01-26 Chong Yidong <cyd@stupidchicken.com>
* font.c (font_parse_fcname): Fix typo in string length.
diff --git a/src/font.c b/src/font.c
index 96c043626f2..ebf0b547b9f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1549,7 +1549,8 @@ font_parse_fcname (name, font)
size_found = 0;
break;
}
- if (size_found)
+ /* GTK font sizes must occur at the end. */
+ if (size_found && *q == '\0')
{
double point_size = strtod (p, &q);
ASET (font, FONT_SIZE_INDEX, make_float (point_size));