Merge pull request #61327 from bruvzg/text_mesh_non_visual
This commit is contained in:
commit
3fb1f258be
@ -2402,6 +2402,10 @@ void TextMesh::_create_mesh_array(Array &p_arr) const {
|
|||||||
|
|
||||||
Vector2 offset_pre = offset;
|
Vector2 offset_pre = offset;
|
||||||
for (int i = 0; i < gl_size; i++) {
|
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()) {
|
if (glyphs[i].font_rid != RID()) {
|
||||||
uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id());
|
uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id());
|
||||||
hash = hash_djb2_one_32(glyphs[i].index, hash);
|
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 p_idx = 0;
|
||||||
int32_t i_idx = 0;
|
int32_t i_idx = 0;
|
||||||
for (int i = 0; i < gl_size; i++) {
|
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()) {
|
if (glyphs[i].font_rid != RID()) {
|
||||||
uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id());
|
uint32_t hash = hash_one_uint64(glyphs[i].font_rid.get_id());
|
||||||
hash = hash_djb2_one_32(glyphs[i].index, hash);
|
hash = hash_djb2_one_32(glyphs[i].index, hash);
|
||||||
|
Loading…
Reference in New Issue
Block a user