diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 14:15:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 14:15:23 +0100 |
commit | 1bd7f2110aaa8f40004c63ceb646f8a9b93d55d2 (patch) | |
tree | 11b0cc2b797de247b99df488e2e93d0855a301ee /modules | |
parent | cf116bae8049fc971cbfa4dfd2e6c063c985b049 (diff) | |
parent | 02a4b3f85959cb96ac1823a37f9d568b819cc6c5 (diff) |
Merge pull request #68110 from bruvzg/hexbox_ver
[TextServer] Fix hex code box positions in vertical text layout.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index f310f46af9..155da3c67b 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -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)); } |