summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2011-02-22 10:58:03 +0900
committerKenichi Handa <handa@m17n.org>2011-02-22 10:58:03 +0900
commite3b300a497971596f3cc6c0f3eb187c903d43dd0 (patch)
treeb9eabbbef27091a39a00f0a575a9ea9673f5cd5a
parent5e73594adafb41804c9f4b25f30532beea2804c3 (diff)
downloademacs-e3b300a497971596f3cc6c0f3eb187c903d43dd0.tar.gz
Fix font size handling.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/font.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3a356bb81aa..f9c15811547 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+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>
* Makefile.in (prefix-args${EXEEXT}): Compile with ALL_CFLAGS.
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]);