Mercurial > emacs
changeset 48383:c44793510100
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground): Implement overstriking.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 17 Nov 2002 23:49:32 +0000 |
parents | d4986198a59a |
children | acfaa904eb56 |
files | src/xterm.c |
diffstat | 1 files changed, 23 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Sun Nov 17 23:46:26 2002 +0000 +++ b/src/xterm.c Sun Nov 17 23:49:32 2002 +0000 @@ -3222,6 +3222,18 @@ XDrawImageString (s->display, s->window, s->gc, x, s->ybase - boff, char1b, s->nchars); } + + if (s->face->overstrike) + { + /* For overstriking (to simulate bold-face), draw the + characters again shifted to the right by one pixel. */ + if (s->two_byte_p) + XDrawString16 (s->display, s->window, s->gc, x + 1, + s->ybase - boff, s->char2b, s->nchars); + else + XDrawString (s->display, s->window, s->gc, x + 1, + s->ybase - boff, char1b, s->nchars); + } } } @@ -3257,10 +3269,17 @@ else { for (i = 0; i < s->nchars; i++, ++s->gidx) - XDrawString16 (s->display, s->window, s->gc, - x + s->cmp->offsets[s->gidx * 2], - s->ybase - s->cmp->offsets[s->gidx * 2 + 1], - s->char2b + i, 1); + { + XDrawString16 (s->display, s->window, s->gc, + x + s->cmp->offsets[s->gidx * 2], + s->ybase - s->cmp->offsets[s->gidx * 2 + 1], + s->char2b + i, 1); + if (s->face->overstrike) + XDrawString16 (s->display, s->window, s->gc, + x + s->cmp->offsets[s->gidx * 2] + 1, + s->ybase - s->cmp->offsets[s->gidx * 2 + 1], + s->char2b + i, 1); + } } }