From 2cf4d521ac33da1905b549374eb6c3b3b0e86867 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 3 Dec 2008 05:16:38 +0000 Subject: [PATCH] Handle fonts with corrupted size specs, i.e. non-int and non-float. --- src/font.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/font.c b/src/font.c index b933007f40c..41dc9e61626 100644 --- a/src/font.c +++ b/src/font.c @@ -3084,10 +3084,13 @@ font_update_lface (f, attrs) 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); + } } } -- 2.39.2