From: Kenichi Handa Date: Thu, 17 Feb 2011 07:47:29 +0000 (+0900) Subject: Fix font-size handling bug. X-Git-Tag: emacs-23.3~20 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dbc0543206eafc2e3bcad46e19629d817f496cf5;p=emacs.git Fix font-size handling bug. --- diff --git a/src/ChangeLog b/src/ChangeLog index 68e9c76a437..6b3c5bc3ab4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-02-17 Kenichi Handa + + * font.c (font_open_entity): Be sure to set scaled_pixel_size. + (font_find_for_lface): Check if attrs[LFACE_HEIGHT_INDEX] is + integer. + 2011-02-13 Eli Zaretskii * xdisp.c (redisplay_internal): Resynchronize `w' if the selected diff --git a/src/font.c b/src/font.c index ebf0b547b9f..08309d3697b 100644 --- a/src/font.c +++ b/src/font.c @@ -3042,7 +3042,7 @@ font_open_entity (f, entity, pixel_size) Lisp_Object objlist, size, val, font_object; struct font *font; int min_width, height; - int scaled_pixel_size; + int scaled_pixel_size = pixel_size; font_assert (FONT_ENTITY_P (entity)); size = AREF (entity, FONT_SIZE_INDEX); @@ -3422,7 +3422,7 @@ font_find_for_lface (f, attrs, spec, c) XSETFRAME (frame, f); size = AREF (spec, FONT_SIZE_INDEX); pixel_size = font_pixel_size (f, spec); - if (pixel_size == 0) + if (pixel_size == 0 && INTEGERP (attrs[LFACE_HEIGHT_INDEX])) { double pt = XINT (attrs[LFACE_HEIGHT_INDEX]);