1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

[Text Server] Prevent composite glyphs which incorporate kashida from being used for justification. Update TextServer tests to clean up on fail.

This commit is contained in:
bruvzg
2022-08-05 18:06:08 +03:00
parent 8f05263bd5
commit 4b155b939b
2 changed files with 121 additions and 79 deletions

View File

@@ -4706,7 +4706,7 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(const RID &p_shape
for (int i = 0; i < sd_size; i++) {
if (sd_glyphs[i].count > 0) {
char32_t c = sd->text[sd_glyphs[i].start - sd->start];
if (c == 0x0640) {
if (c == 0x0640 && sd_glyphs[i].start == sd_glyphs[i].end - 1) {
sd_glyphs[i].flags |= GRAPHEME_IS_ELONGATION;
}
if (sd->jstops.has(sd_glyphs[i].start)) {