From: Chong Yidong Date: Wed, 3 Dec 2008 05:16:38 +0000 (+0000) Subject: Handle fonts with corrupted size specs, i.e. non-int and non-float. X-Git-Tag: emacs-pretest-23.0.90~1321 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2cf4d521ac33da1905b549374eb6c3b3b0e86867;p=emacs.git Handle fonts with corrupted size specs, i.e. non-int and non-float. --- 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); + } } }