changeset 107065:efefb2cc6775

font.c (font_parse_xlfd): If FONT is a font-entity and pixel size in NAME is invalid, return -1. (Bug#5396)
author Kenichi Handa <handa@m17n.org>
date Sun, 31 Jan 2010 16:08:07 +0900
parents bb5cb7ece094 (current diff) 5e5fc9c53be3 (diff)
children 3b5ef09ea743 2fe02d61c7cb
files
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Jan 31 00:23:09 2010 -0500
+++ b/src/ChangeLog	Sun Jan 31 16:08:07 2010 +0900
@@ -1,3 +1,8 @@
+2010-01-31  Kenichi Handa  <handa@m17n.org>
+
+	* font.c (font_parse_xlfd): If FONT is a font-entity and pixel
+	size in NAME is invalid, return -1 (Bug#5396).
+
 2010-01-31  Chong Yidong  <cyd@stupidchicken.com>
 
 	* nsterm.m (ns_defined_color): Block input.  Suggested by Mike
--- a/src/font.c	Sun Jan 31 00:23:09 2010 -0500
+++ b/src/font.c	Sun Jan 31 16:08:07 2010 +0900
@@ -1122,6 +1122,8 @@
 	  val = INTERN_FIELD (XLFD_PIXEL_INDEX);
 	  if (INTEGERP (val))
 	    ASET (font, FONT_SIZE_INDEX, val);
+	  else if (FONT_ENTITY_P (font))
+	    return -1;
 	  else
 	    {
 	      double point_size = -1;