changeset 100445:e412b5885b9d

(font_open_entity): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Tue, 16 Dec 2008 11:29:46 +0000
parents 3e9018e11d27
children 8a63963e517e
files src/font.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Tue Dec 16 08:10:01 2008 +0000
+++ b/src/font.c	Tue Dec 16 11:29:46 2008 +0000
@@ -2877,13 +2877,14 @@
   Lisp_Object objlist, size, val, font_object;
   struct font *font;
   int min_width, height;
+  int scaled_pixel_size;
 
   font_assert (FONT_ENTITY_P (entity));
   size = AREF (entity, FONT_SIZE_INDEX);
   if (XINT (size) != 0)
-    pixel_size = XINT (size);
+    scaled_pixel_size = pixel_size = XINT (size);
   else if (CONSP (Vface_font_rescale_alist))
-    pixel_size *= font_rescale_ratio (entity);
+    scaled_pixel_size = pixel_size * font_rescale_ratio (entity);
 
   for (objlist = AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist);
        objlist = XCDR (objlist))
@@ -2898,7 +2899,8 @@
   if (! driver_list)
     return Qnil;
 
-  font_object = driver_list->driver->open (f, entity, pixel_size);
+  font_object = driver_list->driver->open (f, entity, scaled_pixel_size);
+  ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));
   font_add_log ("open", entity, font_object);
   if (NILP (font_object))
     return Qnil;