aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2006-02-15 00:49:52 +0000
committerKenichi Handa2006-02-15 00:49:52 +0000
commited1dba9d3f568168b1ca68537560c8b855818259 (patch)
tree59312bffd84486d7f621ecc849b2d0f874be53ae /src
parent1a85012afd74b4acc533c4f251ee0a6deb9ef6a8 (diff)
downloademacs-ed1dba9d3f568168b1ca68537560c8b855818259.tar.gz
emacs-ed1dba9d3f568168b1ca68537560c8b855818259.zip
(x_produce_glyphs): Handle composition with TAB.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index fb071542925..ef3e93a864f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20403,6 +20403,7 @@ x_produce_glyphs (it)
20403 int leftmost, rightmost, lowest, highest; 20403 int leftmost, rightmost, lowest, highest;
20404 int lbearing, rbearing; 20404 int lbearing, rbearing;
20405 int i, width, ascent, descent; 20405 int i, width, ascent, descent;
20406 int fully_padded = 0;
20406 20407
20407 cmp->font = (void *) font; 20408 cmp->font = (void *) font;
20408 20409
@@ -20455,8 +20456,15 @@ x_produce_glyphs (it)
20455 { 20456 {
20456 int left, right, btm, top; 20457 int left, right, btm, top;
20457 int ch = COMPOSITION_GLYPH (cmp, i); 20458 int ch = COMPOSITION_GLYPH (cmp, i);
20458 int face_id = FACE_FOR_CHAR (it->f, face, ch, pos, it->string); 20459 int face_id;
20459 20460
20461 if (ch == '\t')
20462 {
20463 fully_padded = 1;
20464 continue;
20465 }
20466
20467 face_id = FACE_FOR_CHAR (it->f, face, ch, pos, it->string);
20460 face = FACE_FROM_ID (it->f, face_id); 20468 face = FACE_FROM_ID (it->f, face_id);
20461 get_char_face_and_encoding (it->f, ch, face->id, 20469 get_char_face_and_encoding (it->f, ch, face->id,
20462 &char2b, it->multibyte_p, 0); 20470 &char2b, it->multibyte_p, 0);
@@ -20599,6 +20607,15 @@ x_produce_glyphs (it)
20599 cmp->rbearing -= leftmost; 20607 cmp->rbearing -= leftmost;
20600 } 20608 }
20601 20609
20610 if (fully_padded)
20611 {
20612 for (i = 0; i < cmp->glyph_len; i++)
20613 cmp->offsets[i * 2] -= cmp->lbearing;
20614 rightmost = cmp->rbearing - cmp->lbearing;
20615 cmp->lbearing = 0;
20616 cmp->rbearing = rightmost;
20617 }
20618
20602 cmp->pixel_width = rightmost; 20619 cmp->pixel_width = rightmost;
20603 cmp->ascent = highest; 20620 cmp->ascent = highest;
20604 cmp->descent = - lowest; 20621 cmp->descent = - lowest;