diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-04-12 10:08:51 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-24 16:28:28 +0200 |
commit | e071fb226374e027eedf5660294288a683b422a7 (patch) | |
tree | d71e1417e4ef81a5d5ad63fda93ef49f2bd4ffe5 /servers/text_server.cpp | |
parent | d4c9ca39758ef0fb9ed27f8473faed5690994fef (diff) |
[TextServer] Use dedicated flag for object replacement characters.
(cherry picked from commit d904516e553426dae1fa40566e3fe67f6213e769)
Diffstat (limited to 'servers/text_server.cpp')
-rw-r--r-- | servers/text_server.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/servers/text_server.cpp b/servers/text_server.cpp index 027109b67d..69ba3dafb2 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -546,6 +546,7 @@ void TextServer::_bind_methods() { BIND_BITFIELD_FLAG(GRAPHEME_IS_UNDERSCORE); BIND_BITFIELD_FLAG(GRAPHEME_IS_CONNECTED); BIND_BITFIELD_FLAG(GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL); + BIND_BITFIELD_FLAG(GRAPHEME_IS_EMBEDDED_OBJECT); /* Hinting */ BIND_ENUM_CONSTANT(HINTING_NONE); @@ -1448,7 +1449,7 @@ void TextServer::shaped_text_draw(const RID &p_shaped, const RID &p_canvas, cons if (glyphs[i].font_rid != RID()) { font_draw_glyph(glyphs[i].font_rid, p_canvas, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, p_color); - } else if (hex_codes && ((glyphs[i].flags & GRAPHEME_IS_VIRTUAL) != GRAPHEME_IS_VIRTUAL)) { + } else if (hex_codes && ((glyphs[i].flags & GRAPHEME_IS_VIRTUAL) != GRAPHEME_IS_VIRTUAL) && ((glyphs[i].flags & GRAPHEME_IS_EMBEDDED_OBJECT) != GRAPHEME_IS_EMBEDDED_OBJECT)) { TextServer::draw_hex_code_box(p_canvas, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, p_color); } if (orientation == ORIENTATION_HORIZONTAL) { |