From 3d8416fce94a69c96e1819ddf0e40ad759cec9a3 Mon Sep 17 00:00:00 2001 From: Naohiro Aota Date: Wed, 30 Jun 2010 10:22:18 -0400 Subject: [PATCH] Check FC_DUAL too. For such fonts, check width one by one (Bug#4129). * xftfont.c (xftfont_open): Check font width one by one also when spacing is dual. * ftfont.c (ftfont_open): Ditto. --- src/ChangeLog | 7 +++++++ src/ftfont.c | 2 +- src/xftfont.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5ba3f0e12a2..0db4a543ab7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-06-30 Naohiro Aota (tiny change) + + * xftfont.c (xftfont_open): Check font width one by one also when + spacing is dual. + + * ftfont.c (ftfont_open): Ditto. + 2010-06-26 Andreas Schwab * alloc.c (Fmake_byte_code): Don't access undefined argument diff --git a/src/ftfont.c b/src/ftfont.c index 9699dc58009..33a96143fd0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1262,7 +1262,7 @@ ftfont_open (f, entity, pixel_size) spacing = XINT (AREF (entity, FONT_SPACING_INDEX)); else spacing = FC_PROPORTIONAL; - if (spacing != FC_PROPORTIONAL) + if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) font->min_width = font->average_width = font->space_width = (scalable ? ft_face->max_advance_width * size / upEM : ft_face->size->metrics.max_advance >> 6); diff --git a/src/xftfont.c b/src/xftfont.c index 5d4581be4e9..197cc9c1f5b 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -429,7 +429,7 @@ xftfont_open (f, entity, pixel_size) ascii_printable[i] = ' ' + i; } BLOCK_INPUT; - if (spacing != FC_PROPORTIONAL) + if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL) { font->min_width = font->average_width = font->space_width = xftfont->max_advance_width; -- 2.39.2