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).
This commit is contained in:
Chong Yidong 2011-01-26 19:45:30 -05:00
parent ca9c274ae7
commit 37d1c45d60
2 changed files with 7 additions and 1 deletions

View file

@ -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.

View file

@ -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));