(font_open_for_lface): Handle unspecified height attribute.
This commit is contained in:
parent
14ccea62ca
commit
50b0cd29f7
1 changed files with 12 additions and 1 deletions
13
src/font.c
13
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue