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
commit918729edc787e5566f1e2aa1e41346084ec2b164 (patch)
treed9e25cdf296b1e7d48fdbd369bfab8c73a6d4b0f
parentf9e7c41d1d18300fac79b2bfaa47d7db0687ad04 (diff)
downloademacs-918729edc787e5566f1e2aa1e41346084ec2b164.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 44237ab8238..14d87e5ff21 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));