From: YAMAMOTO Mitsuharu Date: Mon, 27 Aug 2007 08:33:57 +0000 (+0000) Subject: (x_draw_composite_glyph_string_foreground): Draw rectangle X-Git-Tag: emacs-pretest-22.1.90~891 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=769174c4d4efe3e849480e4410c679605bb51eb2;p=emacs.git (x_draw_composite_glyph_string_foreground): Draw rectangle for nonexistent or zero-width glyph in composition glyph. --- diff --git a/src/ChangeLog b/src/ChangeLog index 73a906bcc56..5ad9ac7d84e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-27 YAMAMOTO Mitsuharu + + * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle + for nonexistent or zero-width glyph in composition glyph. + 2007-08-27 Richard Stallman * eval.c (condition-case): Doc fix. diff --git a/src/macterm.c b/src/macterm.c index b282bac3aa6..01ac7328d6f 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -2973,10 +2973,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); } }