mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground): Implement overstriking.
This commit is contained in:
parent
11894ceb31
commit
fce1344909
1 changed files with 23 additions and 4 deletions
27
src/xterm.c
27
src/xterm.c
|
|
@ -3222,6 +3222,18 @@ x_draw_glyph_string_foreground (s)
|
|||
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 @@ x_draw_composite_glyph_string_foreground (s)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue