Mercurial > emacs
changeset 90298:15363e44d751
(x_produce_glyphs): Handle composition with TAB.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 15 Feb 2006 00:49:52 +0000 |
parents | 6dde40edf186 |
children | 9e490faa9f6b |
files | src/xdisp.c |
diffstat | 1 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Wed Feb 15 00:32:56 2006 +0000 +++ b/src/xdisp.c Wed Feb 15 00:49:52 2006 +0000 @@ -20403,6 +20403,7 @@ int leftmost, rightmost, lowest, highest; int lbearing, rbearing; int i, width, ascent, descent; + int fully_padded = 0; cmp->font = (void *) font; @@ -20455,8 +20456,15 @@ { int left, right, btm, top; int ch = COMPOSITION_GLYPH (cmp, i); - int face_id = FACE_FOR_CHAR (it->f, face, ch, pos, it->string); - + int face_id; + + if (ch == '\t') + { + fully_padded = 1; + continue; + } + + face_id = FACE_FOR_CHAR (it->f, face, ch, pos, it->string); face = FACE_FROM_ID (it->f, face_id); get_char_face_and_encoding (it->f, ch, face->id, &char2b, it->multibyte_p, 0); @@ -20599,6 +20607,15 @@ cmp->rbearing -= leftmost; } + if (fully_padded) + { + for (i = 0; i < cmp->glyph_len; i++) + cmp->offsets[i * 2] -= cmp->lbearing; + rightmost = cmp->rbearing - cmp->lbearing; + cmp->lbearing = 0; + cmp->rbearing = rightmost; + } + cmp->pixel_width = rightmost; cmp->ascent = highest; cmp->descent = - lowest;