diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/packed_scene.cpp | 4 | ||||
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 10 | ||||
-rw-r--r-- | scene/resources/resource_format_text.cpp | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index f795e0ffd0..b90f396110 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -544,7 +544,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Has Variant value = p_node->get(name); if (E.type == Variant::OBJECT && missing_resource_properties.has(E.name)) { - // Was this missing resource overriden? If so do not save the old value. + // Was this missing resource overridden? If so do not save the old value. Ref<Resource> ures = value; if (ures.is_null()) { value = missing_resource_properties[E.name]; @@ -613,7 +613,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Has if (states_stack.is_empty() && !is_editable_instance) { //this node is not part of an instancing process, so save the type if (missing_node != nullptr) { - // Its a missing node (type non existant on load). + // It's a missing node (type non existent on load). nd.type = _nm_get_string(missing_node->get_original_class(), name_map); } else { nd.type = _nm_get_string(p_node->get_class(), name_map); diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index fb9b2823b4..36f5f92085 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -2402,6 +2402,10 @@ void TextMesh::_create_mesh_array(Array &p_arr) const { Vector2 offset_pre = offset; for (int i = 0; i < gl_size; i++) { + if (glyphs[i].index == 0) { + offset.x += glyphs[i].advance * pixel_size * glyphs[i].repeat; + continue; + } if (glyphs[i].font_rid != RID()) { uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id()); hash = hash_djb2_one_32(glyphs[i].index, hash); @@ -2457,6 +2461,10 @@ void TextMesh::_create_mesh_array(Array &p_arr) const { int32_t p_idx = 0; int32_t i_idx = 0; for (int i = 0; i < gl_size; i++) { + if (glyphs[i].index == 0) { + offset.x += glyphs[i].advance * pixel_size * glyphs[i].repeat; + continue; + } if (glyphs[i].font_rid != RID()) { uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id()); hash = hash_djb2_one_32(glyphs[i].index, hash); @@ -2596,7 +2604,7 @@ void TextMesh::_create_mesh_array(Array &p_arr) const { } if (p_size == 0) { - // If empty, add single trinagle to suppress errors. + // If empty, add single triangle to suppress errors. vertices.push_back(Vector3()); normals.push_back(Vector3()); uvs.push_back(Vector2()); diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 72d66ee4f5..9d586c6f03 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1891,7 +1891,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso } if (PE->get().type == Variant::OBJECT && missing_resource_properties.has(PE->get().name)) { - // Was this missing resource overriden? If so do not save the old value. + // Was this missing resource overridden? If so do not save the old value. Ref<Resource> ures = value; if (ures.is_null()) { value = missing_resource_properties[PE->get().name]; |