diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-18 17:24:54 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-18 17:24:54 +0200 |
commit | b51ee8b029b0b9f719f01bbdd21a329e65d4d238 (patch) | |
tree | 52e79f7d4582023148fe24a494606e4792e419fa /servers/text_server.h | |
parent | a2a1ed1aac1cd7caa418a0a35a936f289b886a41 (diff) | |
parent | 5d3fcc57669c4104a85c79327f7c2662a0d191a3 (diff) | |
download | redot-engine-b51ee8b029b0b9f719f01bbdd21a329e65d4d238.tar.gz |
Merge pull request #80650 from bruvzg/comp_char_fix
[TextServer] Fix system font fallback and caret/selection behavior for composite characters.
Diffstat (limited to 'servers/text_server.h')
-rw-r--r-- | servers/text_server.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/text_server.h b/servers/text_server.h index a4ea1dfdc7..7bc353cb8c 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -491,6 +491,11 @@ public: virtual int64_t shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const; virtual int64_t shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const; + virtual PackedInt32Array shaped_text_get_character_breaks(const RID &p_shaped) const = 0; + virtual int64_t shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const; + virtual int64_t shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const; + virtual int64_t shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const; + // The pen position is always placed on the baseline and moveing left to right. virtual void shaped_text_draw(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, const Color &p_color = Color(1, 1, 1)) const; virtual void shaped_text_draw_outline(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, int64_t p_outline_size = 1, const Color &p_color = Color(1, 1, 1)) const; @@ -502,6 +507,7 @@ public: // String functions. virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "", int64_t p_chars_per_line = 0) const = 0; + virtual PackedInt32Array string_get_character_breaks(const String &p_string, const String &p_language = "") const; virtual int64_t is_confusable(const String &p_string, const PackedStringArray &p_dict) const { return -1; }; virtual bool spoof_check(const String &p_string) const { return false; }; |