]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_draw_composite_glyph_string_foreground): Draw rectangle
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 27 Aug 2007 08:31:30 +0000 (08:31 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 27 Aug 2007 08:31:30 +0000 (08:31 +0000)
for nonexistent or zero-width glyph in composition glyph.

src/ChangeLog
src/macterm.c

index 9e6641ebf2a1c843c0d87652711fc893047acd72..b402b1c7646965ae5abf574236226033af2b44f4 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle
+       for nonexistent or zero-width glyph in composition glyph.
+
 2007-08-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * m/amdx86-64.h: Redirect to intel386.h if compiling for i386.
index 9655b09c819b13ca6f0312ce6038f11f7705515f..0f2b053853dfec0e041317a3b1b3fbd743e6e84b 100644 (file)
@@ -3056,10 +3056,17 @@ x_draw_composite_glyph_string_foreground (s)
   else
     {
       for (i = 0; i < s->nchars; i++, ++s->gidx)
-       mac_draw_image_string_16 (s->f, s->gc,
-                                 x + s->cmp->offsets[s->gidx * 2],
-                                 s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
-                                 s->char2b + i, 1, 0, s->face->overstrike);
+       if (mac_per_char_metric (GC_FONT (s->gc), s->char2b + i, 0) == NULL)
+         /* This is a nonexistent or zero-width glyph such as a
+            combining diacritic.  Draw a rectangle.  */
+         mac_draw_rectangle (s->f, s->gc,
+                             x + s->cmp->offsets[s->gidx * 2], s->y,
+                             FONT_WIDTH (GC_FONT (s->gc)) - 1, s->height - 1);
+       else
+         mac_draw_image_string_16 (s->f, s->gc,
+                                   x + s->cmp->offsets[s->gidx * 2],
+                                   s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
+                                   s->char2b + i, 1, 0, s->face->overstrike);
     }
 }