Commit e3b300a4 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

Fix font size handling.

parent 5e73594a
2011-02-22 Kenichi Handa <handa@m17n.org>
* 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-19 Chong Yidong <cyd@stupidchicken.com> 2011-02-19 Chong Yidong <cyd@stupidchicken.com>
   
* Makefile.in (prefix-args${EXEEXT}): Compile with ALL_CFLAGS. * Makefile.in (prefix-args${EXEEXT}): Compile with ALL_CFLAGS.
......
...@@ -3042,7 +3042,7 @@ font_open_entity (f, entity, pixel_size) ...@@ -3042,7 +3042,7 @@ font_open_entity (f, entity, pixel_size)
Lisp_Object objlist, size, val, font_object; Lisp_Object objlist, size, val, font_object;
struct font *font; struct font *font;
int min_width, height; int min_width, height;
int scaled_pixel_size; int scaled_pixel_size = pixel_size;
font_assert (FONT_ENTITY_P (entity)); font_assert (FONT_ENTITY_P (entity));
size = AREF (entity, FONT_SIZE_INDEX); size = AREF (entity, FONT_SIZE_INDEX);
...@@ -3422,7 +3422,7 @@ font_find_for_lface (f, attrs, spec, c) ...@@ -3422,7 +3422,7 @@ font_find_for_lface (f, attrs, spec, c)
XSETFRAME (frame, f); XSETFRAME (frame, f);
size = AREF (spec, FONT_SIZE_INDEX); size = AREF (spec, FONT_SIZE_INDEX);
pixel_size = font_pixel_size (f, spec); 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]); double pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment