From: Chong Yidong Date: Thu, 8 Jan 2009 13:34:44 +0000 (+0000) Subject: (font_open_for_lface): Handle unspecified height attribute. X-Git-Tag: emacs-pretest-23.0.90~625 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50b0cd29f7989dfdb4dfd15c77fdea974f31d9da;p=emacs.git (font_open_for_lface): Handle unspecified height attribute. --- diff --git a/src/font.c b/src/font.c index b82a4d2a045..d88b1c592ff 100644 --- a/src/font.c +++ b/src/font.c @@ -3382,7 +3382,18 @@ font_open_for_lface (f, entity, attrs, spec) size = font_pixel_size (f, spec); else { - double pt = XINT (attrs[LFACE_HEIGHT_INDEX]); + double pt; + if (INTEGERP (attrs[LFACE_HEIGHT_INDEX])) + pt = XINT (attrs[LFACE_HEIGHT_INDEX]); + else + { + struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID); + Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX]; + if (INTEGERP (height)) + pt = XINT (height); + else + abort(); /* We should never end up here. */ + } pt /= 10; size = POINT_TO_PIXEL (pt, f->resy);