changeset 100167:b80052504b85

Handle fonts with corrupted size specs, i.e. non-int and non-float.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 03 Dec 2008 05:16:38 +0000
parents 03bc92681181
children acef56f002fc
files src/font.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Wed Dec 03 05:16:18 2008 +0000
+++ b/src/font.c	Wed Dec 03 05:16:38 2008 +0000
@@ -3084,10 +3084,13 @@
 	    dpi = XINT (val);
 	  point = PIXEL_TO_POINT (XINT (AREF (spec, FONT_SIZE_INDEX)) * 10,
 				  dpi);
+	  attrs[LFACE_HEIGHT_INDEX] = make_number (point);
 	}
       else if (FLOATP (AREF (spec, FONT_SIZE_INDEX)))
-	point = XFLOAT_DATA (AREF (spec, FONT_SIZE_INDEX)) * 10;
-      attrs[LFACE_HEIGHT_INDEX] = make_number (point);
+	{
+	  point = XFLOAT_DATA (AREF (spec, FONT_SIZE_INDEX)) * 10;
+	  attrs[LFACE_HEIGHT_INDEX] = make_number (point);
+	}
     }
 }