diff options
| author | Eli Zaretskii | 2023-02-05 13:57:10 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-02-05 13:57:10 +0200 |
| commit | 03d9d18513b6ec50d0022f09d040ce330c918fff (patch) | |
| tree | 273e58178caf136585aff9b9bcc58bf3d7a09bb7 | |
| parent | f13479d95566e234a70001f02d4209f145e3729a (diff) | |
| download | emacs-03d9d18513b6ec50d0022f09d040ce330c918fff.tar.gz emacs-03d9d18513b6ec50d0022f09d040ce330c918fff.zip | |
Fix display of raised/lowered composed text
* src/xdisp.c (fill_gstring_glyph_string): Adjust the base line of
the glyph string due to subscript/superscript. (Bug#61290)
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d2c91e5847b..a19c9908616 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -29317,6 +29317,7 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id, | |||
| 29317 | int start, int end, int overlaps) | 29317 | int start, int end, int overlaps) |
| 29318 | { | 29318 | { |
| 29319 | struct glyph *glyph, *last; | 29319 | struct glyph *glyph, *last; |
| 29320 | int voffset; | ||
| 29320 | Lisp_Object lgstring; | 29321 | Lisp_Object lgstring; |
| 29321 | int i; | 29322 | int i; |
| 29322 | bool glyph_not_available_p; | 29323 | bool glyph_not_available_p; |
| @@ -29324,6 +29325,7 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id, | |||
| 29324 | s->for_overlaps = overlaps; | 29325 | s->for_overlaps = overlaps; |
| 29325 | glyph = s->row->glyphs[s->area] + start; | 29326 | glyph = s->row->glyphs[s->area] + start; |
| 29326 | last = s->row->glyphs[s->area] + end; | 29327 | last = s->row->glyphs[s->area] + end; |
| 29328 | voffset = glyph->voffset; | ||
| 29327 | glyph_not_available_p = glyph->glyph_not_available_p; | 29329 | glyph_not_available_p = glyph->glyph_not_available_p; |
| 29328 | s->cmp_id = glyph->u.cmp.id; | 29330 | s->cmp_id = glyph->u.cmp.id; |
| 29329 | s->cmp_from = glyph->slice.cmp.from; | 29331 | s->cmp_from = glyph->slice.cmp.from; |
| @@ -29374,6 +29376,9 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id, | |||
| 29374 | if (glyph_not_available_p) | 29376 | if (glyph_not_available_p) |
| 29375 | s->font_not_found_p = true; | 29377 | s->font_not_found_p = true; |
| 29376 | 29378 | ||
| 29379 | /* Adjust base line for subscript/superscript text. */ | ||
| 29380 | s->ybase += voffset; | ||
| 29381 | |||
| 29377 | return glyph - s->row->glyphs[s->area]; | 29382 | return glyph - s->row->glyphs[s->area]; |
| 29378 | } | 29383 | } |
| 29379 | 29384 | ||