You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Improve invalid non-graphic glyph detection.
This commit is contained in:
@@ -4201,9 +4201,9 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p_sd->preserve_control) {
|
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 {
|
} 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) {
|
if (p_direction == HB_DIRECTION_LTR || p_direction == HB_DIRECTION_TTB) {
|
||||||
|
|||||||
Reference in New Issue
Block a user