summaryrefslogtreecommitdiff
path: root/scene/resources/primitive_meshes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/primitive_meshes.cpp')
-rw-r--r--scene/resources/primitive_meshes.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 86ed0001dd..7147fdeab1 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -2890,6 +2890,18 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
dirty_cache = false;
}
+ // When a shaped text is invalidated by an external source, we want to reshape it.
+ if (!TS->shaped_text_is_ready(text_rid)) {
+ dirty_text = true;
+ }
+
+ for (const RID &line_rid : lines_rid) {
+ if (!TS->shaped_text_is_ready(line_rid)) {
+ dirty_lines = true;
+ break;
+ }
+ }
+
// Update text buffer.
if (dirty_text) {
TS->shaped_text_clear(text_rid);