# HG changeset patch # User Kenichi Handa # Date 1139964592 0 # Node ID 15363e44d7518364b02b95ebe34fb51fb6167219 # Parent 6dde40edf1867a5246f3194dab664e74b0365e95 (x_produce_glyphs): Handle composition with TAB. diff -r 6dde40edf186 -r 15363e44d751 src/xdisp.c --- 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;