summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-22 14:07:25 +0200
committerGitHub <noreply@github.com>2021-09-22 14:07:25 +0200
commit8afa14e9b7f07e4d2034e1102ff08ad7a180a209 (patch)
treeeb35f6663bb823ad574c8a4405b776ca1341d4bc /modules
parenta09547450a93983af874f81961405a13764e3806 (diff)
parenta58a7cdc9f35533c5c5abc38eefd79ab6512e743 (diff)
Merge pull request #51104 from bruvzg/improve_invalid_non_graph_char_detection
Diffstat (limited to 'modules')
-rw-r--r--modules/text_server_adv/text_server_adv.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 341ae9c015..2336153c0d 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -4201,9 +4201,9 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
}
if (p_sd->preserve_control) {
- last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || is_whitespace(p_sd->text[glyph_info[i].cluster]) || is_linebreak(p_sd->text[glyph_info[i].cluster]));
+ last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || (p_sd->text[glyph_info[i].cluster] == 0x0009) || (u_isblank(p_sd->text[glyph_info[i].cluster]) && (gl.advance != 0)) || (!u_isblank(p_sd->text[glyph_info[i].cluster]) && is_linebreak(p_sd->text[glyph_info[i].cluster])));
} else {
- last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || !u_isgraph(p_sd->text[glyph_info[i].cluster]));
+ last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || (p_sd->text[glyph_info[i].cluster] == 0x0009) || (u_isblank(p_sd->text[glyph_info[i].cluster]) && (gl.advance != 0)) || (!u_isblank(p_sd->text[glyph_info[i].cluster]) && !u_isgraph(p_sd->text[glyph_info[i].cluster])));
}
}
if (p_direction == HB_DIRECTION_LTR || p_direction == HB_DIRECTION_TTB) {