comparison src/xterm.c @ 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 e5d539ae9468
children 6b6ac8aa78d2
comparison
equal deleted inserted replaced
48382:d4986198a59a 48383:c44793510100
3220 s->ybase - boff, s->char2b, s->nchars); 3220 s->ybase - boff, s->char2b, s->nchars);
3221 else 3221 else
3222 XDrawImageString (s->display, s->window, s->gc, x, 3222 XDrawImageString (s->display, s->window, s->gc, x,
3223 s->ybase - boff, char1b, s->nchars); 3223 s->ybase - boff, char1b, s->nchars);
3224 } 3224 }
3225
3226 if (s->face->overstrike)
3227 {
3228 /* For overstriking (to simulate bold-face), draw the
3229 characters again shifted to the right by one pixel. */
3230 if (s->two_byte_p)
3231 XDrawString16 (s->display, s->window, s->gc, x + 1,
3232 s->ybase - boff, s->char2b, s->nchars);
3233 else
3234 XDrawString (s->display, s->window, s->gc, x + 1,
3235 s->ybase - boff, char1b, s->nchars);
3236 }
3225 } 3237 }
3226 } 3238 }
3227 3239
3228 /* Draw the foreground of composite glyph string S. */ 3240 /* Draw the foreground of composite glyph string S. */
3229 3241
3255 s->width - 1, s->height - 1); 3267 s->width - 1, s->height - 1);
3256 } 3268 }
3257 else 3269 else
3258 { 3270 {
3259 for (i = 0; i < s->nchars; i++, ++s->gidx) 3271 for (i = 0; i < s->nchars; i++, ++s->gidx)
3260 XDrawString16 (s->display, s->window, s->gc, 3272 {
3261 x + s->cmp->offsets[s->gidx * 2], 3273 XDrawString16 (s->display, s->window, s->gc,
3262 s->ybase - s->cmp->offsets[s->gidx * 2 + 1], 3274 x + s->cmp->offsets[s->gidx * 2],
3263 s->char2b + i, 1); 3275 s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
3276 s->char2b + i, 1);
3277 if (s->face->overstrike)
3278 XDrawString16 (s->display, s->window, s->gc,
3279 x + s->cmp->offsets[s->gidx * 2] + 1,
3280 s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
3281 s->char2b + i, 1);
3282 }
3264 } 3283 }
3265 } 3284 }
3266 3285
3267 3286
3268 #ifdef USE_X_TOOLKIT 3287 #ifdef USE_X_TOOLKIT