diff options
| author | Kenichi Handa | 2006-02-21 11:45:17 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-02-21 11:45:17 +0000 |
| commit | 3df3a5b06ba9aac8a986bca782f4b83f68c1345f (patch) | |
| tree | 8e444e0b1f04c587bd96bfc7fc4110f41950c4fd /src | |
| parent | 3eb4417872b7c9e41fd390e907d5be47b7699d7f (diff) | |
| download | emacs-3df3a5b06ba9aac8a986bca782f4b83f68c1345f.tar.gz emacs-3df3a5b06ba9aac8a986bca782f4b83f68c1345f.zip | |
(fill_composite_glyph_string): Check s->face is NULL or
not.
(BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
(x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index bdef9cd448f..ff2c7d299e5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18535,14 +18535,24 @@ fill_composite_glyph_string (s, faces, overlaps) | |||
| 18535 | s->for_overlaps = overlaps; | 18535 | s->for_overlaps = overlaps; |
| 18536 | 18536 | ||
| 18537 | s->face = faces[s->gidx]; | 18537 | s->face = faces[s->gidx]; |
| 18538 | s->font = s->face->font; | 18538 | if (s->face == NULL) |
| 18539 | s->font_info = FONT_INFO_FROM_ID (s->f, s->face->font_info_id); | 18539 | { |
| 18540 | s->font = NULL; | ||
| 18541 | s->font_info = NULL; | ||
| 18542 | } | ||
| 18543 | else | ||
| 18544 | { | ||
| 18545 | s->font = s->face->font; | ||
| 18546 | s->font_info = FONT_INFO_FROM_ID (s->f, s->face->font_info_id); | ||
| 18547 | } | ||
| 18540 | 18548 | ||
| 18541 | /* For all glyphs of this composition, starting at the offset | 18549 | /* For all glyphs of this composition, starting at the offset |
| 18542 | S->gidx, until we reach the end of the definition or encounter a | 18550 | S->gidx, until we reach the end of the definition or encounter a |
| 18543 | glyph that requires the different face, add it to S. */ | 18551 | glyph that requires the different face, add it to S. */ |
| 18544 | ++s->nchars; | 18552 | ++s->nchars; |
| 18545 | for (i = s->gidx + 1; i < s->cmp->glyph_len && faces[i] == s->face; ++i) | 18553 | for (i = s->gidx + 1; |
| 18554 | i < s->cmp->glyph_len && (faces[i] == s->face || ! faces[i] || ! s->face); | ||
| 18555 | ++i) | ||
| 18546 | ++s->nchars; | 18556 | ++s->nchars; |
| 18547 | 18557 | ||
| 18548 | /* All glyph strings for the same composition has the same width, | 18558 | /* All glyph strings for the same composition has the same width, |
| @@ -18563,8 +18573,6 @@ fill_composite_glyph_string (s, faces, overlaps) | |||
| 18563 | /* Adjust base line for subscript/superscript text. */ | 18573 | /* Adjust base line for subscript/superscript text. */ |
| 18564 | s->ybase += s->first_glyph->voffset; | 18574 | s->ybase += s->first_glyph->voffset; |
| 18565 | 18575 | ||
| 18566 | xassert (s->face && s->face->gc); | ||
| 18567 | |||
| 18568 | /* This glyph string must always be drawn with 16-bit functions. */ | 18576 | /* This glyph string must always be drawn with 16-bit functions. */ |
| 18569 | s->two_byte_p = 1; | 18577 | s->two_byte_p = 1; |
| 18570 | 18578 | ||
| @@ -19100,10 +19108,16 @@ compute_overhangs_and_x (s, x, backward_p) | |||
| 19100 | for (n = 0; n < glyph_len; n++) \ | 19108 | for (n = 0; n < glyph_len; n++) \ |
| 19101 | { \ | 19109 | { \ |
| 19102 | int c = COMPOSITION_GLYPH (cmp, n); \ | 19110 | int c = COMPOSITION_GLYPH (cmp, n); \ |
| 19103 | int this_face_id = FACE_FOR_CHAR (f, base_face, c, -1, Qnil); \ | 19111 | \ |
| 19104 | faces[n] = FACE_FROM_ID (f, this_face_id); \ | 19112 | if (c == '\t') \ |
| 19105 | get_char_face_and_encoding (f, c, this_face_id, \ | 19113 | faces[n] = NULL; \ |
| 19114 | else \ | ||
| 19115 | { \ | ||
| 19116 | int this_face_id = FACE_FOR_CHAR (f, base_face, c, -1, Qnil); \ | ||
| 19117 | faces[n] = FACE_FROM_ID (f, this_face_id); \ | ||
| 19118 | get_char_face_and_encoding (f, c, this_face_id, \ | ||
| 19106 | char2b + n, 1, 1); \ | 19119 | char2b + n, 1, 1); \ |
| 19120 | } \ | ||
| 19107 | } \ | 19121 | } \ |
| 19108 | \ | 19122 | \ |
| 19109 | /* Make glyph_strings for each glyph sequence that is drawable by \ | 19123 | /* Make glyph_strings for each glyph sequence that is drawable by \ |
| @@ -20462,6 +20476,8 @@ x_produce_glyphs (it) | |||
| 20462 | if (ch == '\t') | 20476 | if (ch == '\t') |
| 20463 | { | 20477 | { |
| 20464 | fully_padded = 1; | 20478 | fully_padded = 1; |
| 20479 | cmp->offsets[i * 2] = 0; | ||
| 20480 | cmp->offsets[i * 2 + 1] = boff; | ||
| 20465 | continue; | 20481 | continue; |
| 20466 | } | 20482 | } |
| 20467 | 20483 | ||