diff options
| author | Kenichi Handa | 2008-02-25 01:45:47 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-25 01:45:47 +0000 |
| commit | b9c2785e9f5379a45c9838bba49dcd44d7404af3 (patch) | |
| tree | bcd254ab3f92a6feeb3255b383f4330949893608 /src | |
| parent | 298fd5b18889d17ca19ef76e6d425f33fef2381d (diff) | |
| download | emacs-b9c2785e9f5379a45c9838bba49dcd44d7404af3.tar.gz emacs-b9c2785e9f5379a45c9838bba49dcd44d7404af3.zip | |
(ftxfont_draw): Pay attention to s->padding_p.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftxfont.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ftxfont.c b/src/ftxfont.c index d7d8b710abc..d575182ef85 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -360,6 +360,7 @@ ftxfont_draw (s, from, to, x, y, with_background) | |||
| 360 | int len = to - from; | 360 | int len = to - from; |
| 361 | int i; | 361 | int i; |
| 362 | GC *gcs; | 362 | GC *gcs; |
| 363 | int xadvance; | ||
| 363 | 364 | ||
| 364 | n[0] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = 0; | 365 | n[0] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = 0; |
| 365 | 366 | ||
| @@ -392,8 +393,11 @@ ftxfont_draw (s, from, to, x, y, with_background) | |||
| 392 | s->clip, s->num_clips, Unsorted); | 393 | s->clip, s->num_clips, Unsorted); |
| 393 | 394 | ||
| 394 | for (i = 0; i < len; i++) | 395 | for (i = 0; i < len; i++) |
| 395 | x += ftxfont_draw_bitmap (f, s->gc, gcs, font, code[i], x, y, | 396 | { |
| 396 | p, 0x100, n, i + 1 == len); | 397 | xadvance = ftxfont_draw_bitmap (f, s->gc, gcs, font, code[i], x, y, |
| 398 | p, 0x100, n, i + 1 == len); | ||
| 399 | x += (s->padding_p ? 1 : xadvance); | ||
| 400 | } | ||
| 397 | if (s->num_clips) | 401 | if (s->num_clips) |
| 398 | for (i = 0; i < 6; i++) | 402 | for (i = 0; i < 6; i++) |
| 399 | XSetClipMask (FRAME_X_DISPLAY (f), gcs[i], None); | 403 | XSetClipMask (FRAME_X_DISPLAY (f), gcs[i], None); |
| @@ -403,8 +407,11 @@ ftxfont_draw (s, from, to, x, y, with_background) | |||
| 403 | /* We can't draw with antialiasing. | 407 | /* We can't draw with antialiasing. |
| 404 | s->gc should already have a proper clipping setting. */ | 408 | s->gc should already have a proper clipping setting. */ |
| 405 | for (i = 0; i < len; i++) | 409 | for (i = 0; i < len; i++) |
| 406 | x += ftxfont_draw_bitmap (f, s->gc, NULL, font, code[i], x, y, | 410 | { |
| 407 | p, 0x700, n, i + 1 == len); | 411 | xadvance = ftxfont_draw_bitmap (f, s->gc, NULL, font, code[i], x, y, |
| 412 | p, 0x700, n, i + 1 == len); | ||
| 413 | x += (s->padding_p ? 1 : xadvance); | ||
| 414 | } | ||
| 408 | } | 415 | } |
| 409 | 416 | ||
| 410 | UNBLOCK_INPUT; | 417 | UNBLOCK_INPUT; |