[TextServer] Fix hex code box positions in vertical text layout.

This commit is contained in:
bruvzg 2022-11-01 11:51:29 +02:00
parent e6751549cf
commit 02a4b3f859
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38

View file

@ -5072,6 +5072,8 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
p_sd->ascent = MAX(p_sd->ascent, get_hex_code_box_size(fs, gl.index).y);
} else {
gl.advance = get_hex_code_box_size(fs, gl.index).y;
gl.y_off = get_hex_code_box_size(fs, gl.index).y;
gl.x_off = -Math::round(get_hex_code_box_size(fs, gl.index).x * 0.5);
p_sd->ascent = MAX(p_sd->ascent, Math::round(get_hex_code_box_size(fs, gl.index).x * 0.5));
p_sd->descent = MAX(p_sd->descent, Math::round(get_hex_code_box_size(fs, gl.index).x * 0.5));
}