Check FC_DUAL too. For such fonts, check width one by one.
authorKenichi Handa <handa@etlken>
Wed, 30 Jun 2010 06:55:41 +0000 (15:55 +0900)
committerKenichi Handa <handa@etlken>
Wed, 30 Jun 2010 06:55:41 +0000 (15:55 +0900)
src/ChangeLog
src/ftfont.c
src/xftfont.c

index 2670410..8d54136 100644 (file)
@@ -1,3 +1,10 @@
+2009-06-17  Naohiro Aota  <naota@elisp.net>  (tiny change)
+
+       * xftfont.c (xftfont_open): Check font width one by one also when
+       spacing is dual.
+
+       * ftfont.c (ftfont_open): Ditto.
+
 2010-06-30  Glenn Morris  <rgm@gnu.org>
 
        * s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now.
index 9699dc5..33a9614 100644 (file)
@@ -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);
index 5d4581b..197cc9c 100644 (file)
@@ -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;