mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 10:07:17 +01:00
Fix auto-translation and ignore control chars.
This commit is contained in:
parent
0a11c9e1bf
commit
0c95c634bb
@ -684,6 +684,12 @@ void MeshInstance::_notification(int p_what) {
|
||||
_resolve_skeleton_path();
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_TRANSLATION_CHANGED) {
|
||||
if (mesh.is_valid()) {
|
||||
mesh->notification(NOTIFICATION_TRANSLATION_CHANGED);
|
||||
}
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
if (skin_ref.is_valid() && mesh.is_valid() && _is_software_skinning_enabled()) {
|
||||
ERR_FAIL_COND(!skin_ref->get_skeleton_node());
|
||||
|
@ -1859,7 +1859,7 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
|
||||
if ((c & 0xfffffc00) == 0xdc00) { // skip trail surrogate.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (utf32_char >= 0x20) {
|
||||
_generate_glyph_mesh_data(utf32_char, font, c, n);
|
||||
GlyphMeshData &gl_data = cache[utf32_char];
|
||||
|
||||
@ -1877,6 +1877,7 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
|
||||
min_p.y = MIN(gl_data.min_p.y + offset_pre.y, min_p.y);
|
||||
max_p.x = MAX(gl_data.max_p.x + offset_pre.x, max_p.x);
|
||||
max_p.y = MAX(gl_data.max_p.y + offset_pre.y, max_p.y);
|
||||
}
|
||||
|
||||
offset_pre.x += font->get_char_size(c, n).x * pixel_size;
|
||||
}
|
||||
@ -1913,6 +1914,7 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
|
||||
if ((c & 0xfffffc00) == 0xdc00) { // skip trail surrogate.
|
||||
continue;
|
||||
}
|
||||
if (utf32_char >= 0x20) {
|
||||
_generate_glyph_mesh_data(utf32_char, font, c, n);
|
||||
GlyphMeshData &gl_data = cache[utf32_char];
|
||||
|
||||
@ -2007,6 +2009,7 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
offset.x += font->get_char_size(c, n).x * pixel_size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user