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)
This commit is contained in:
parent
f13479d955
commit
03d9d18513
1 changed files with 5 additions and 0 deletions
|
@ -29317,6 +29317,7 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id,
|
||||||
int start, int end, int overlaps)
|
int start, int end, int overlaps)
|
||||||
{
|
{
|
||||||
struct glyph *glyph, *last;
|
struct glyph *glyph, *last;
|
||||||
|
int voffset;
|
||||||
Lisp_Object lgstring;
|
Lisp_Object lgstring;
|
||||||
int i;
|
int i;
|
||||||
bool glyph_not_available_p;
|
bool glyph_not_available_p;
|
||||||
|
@ -29324,6 +29325,7 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id,
|
||||||
s->for_overlaps = overlaps;
|
s->for_overlaps = overlaps;
|
||||||
glyph = s->row->glyphs[s->area] + start;
|
glyph = s->row->glyphs[s->area] + start;
|
||||||
last = s->row->glyphs[s->area] + end;
|
last = s->row->glyphs[s->area] + end;
|
||||||
|
voffset = glyph->voffset;
|
||||||
glyph_not_available_p = glyph->glyph_not_available_p;
|
glyph_not_available_p = glyph->glyph_not_available_p;
|
||||||
s->cmp_id = glyph->u.cmp.id;
|
s->cmp_id = glyph->u.cmp.id;
|
||||||
s->cmp_from = glyph->slice.cmp.from;
|
s->cmp_from = glyph->slice.cmp.from;
|
||||||
|
@ -29374,6 +29376,9 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id,
|
||||||
if (glyph_not_available_p)
|
if (glyph_not_available_p)
|
||||||
s->font_not_found_p = true;
|
s->font_not_found_p = true;
|
||||||
|
|
||||||
|
/* Adjust base line for subscript/superscript text. */
|
||||||
|
s->ybase += voffset;
|
||||||
|
|
||||||
return glyph - s->row->glyphs[s->area];
|
return glyph - s->row->glyphs[s->area];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue