text_server_extension.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. /**************************************************************************/
  2. /* text_server_extension.h */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #ifndef TEXT_SERVER_EXTENSION_H
  31. #define TEXT_SERVER_EXTENSION_H
  32. #include "core/object/gdvirtual.gen.inc"
  33. #include "core/os/thread_safe.h"
  34. #include "core/variant/native_ptr.h"
  35. #include "core/variant/typed_array.h"
  36. #include "servers/text_server.h"
  37. class TextServerExtension : public TextServer {
  38. GDCLASS(TextServerExtension, TextServer);
  39. protected:
  40. _THREAD_SAFE_CLASS_
  41. static void _bind_methods();
  42. public:
  43. virtual bool has_feature(Feature p_feature) const override;
  44. virtual String get_name() const override;
  45. virtual int64_t get_features() const override;
  46. GDVIRTUAL1RC_REQUIRED(bool, _has_feature, Feature);
  47. GDVIRTUAL0RC_REQUIRED(String, _get_name);
  48. GDVIRTUAL0RC_REQUIRED(int64_t, _get_features);
  49. virtual void free_rid(const RID &p_rid) override;
  50. virtual bool has(const RID &p_rid) override;
  51. virtual bool load_support_data(const String &p_filename) override;
  52. GDVIRTUAL1_REQUIRED(_free_rid, RID);
  53. GDVIRTUAL1R_REQUIRED(bool, _has, RID);
  54. GDVIRTUAL1R(bool, _load_support_data, const String &);
  55. virtual String get_support_data_filename() const override;
  56. virtual String get_support_data_info() const override;
  57. virtual bool save_support_data(const String &p_filename) const override;
  58. GDVIRTUAL0RC(String, _get_support_data_filename);
  59. GDVIRTUAL0RC(String, _get_support_data_info);
  60. GDVIRTUAL1RC(bool, _save_support_data, const String &);
  61. virtual bool is_locale_right_to_left(const String &p_locale) const override;
  62. GDVIRTUAL1RC(bool, _is_locale_right_to_left, const String &);
  63. virtual int64_t name_to_tag(const String &p_name) const override;
  64. virtual String tag_to_name(int64_t p_tag) const override;
  65. GDVIRTUAL1RC(int64_t, _name_to_tag, const String &);
  66. GDVIRTUAL1RC(String, _tag_to_name, int64_t);
  67. /* Font interface */
  68. virtual RID create_font() override;
  69. GDVIRTUAL0R_REQUIRED(RID, _create_font);
  70. virtual RID create_font_linked_variation(const RID &p_font_rid) override;
  71. GDVIRTUAL1R(RID, _create_font_linked_variation, RID);
  72. virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) override;
  73. virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) override;
  74. GDVIRTUAL2(_font_set_data, RID, const PackedByteArray &);
  75. GDVIRTUAL3(_font_set_data_ptr, RID, GDExtensionConstPtr<const uint8_t>, int64_t);
  76. virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override;
  77. virtual int64_t font_get_face_index(const RID &p_font_rid) const override;
  78. GDVIRTUAL2(_font_set_face_index, RID, int64_t);
  79. GDVIRTUAL1RC(int64_t, _font_get_face_index, RID);
  80. virtual int64_t font_get_face_count(const RID &p_font_rid) const override;
  81. GDVIRTUAL1RC(int64_t, _font_get_face_count, RID);
  82. virtual void font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) override;
  83. virtual BitField<FontStyle> font_get_style(const RID &p_font_rid) const override;
  84. GDVIRTUAL2(_font_set_style, RID, BitField<FontStyle>);
  85. GDVIRTUAL1RC(BitField<FontStyle>, _font_get_style, RID);
  86. virtual void font_set_name(const RID &p_font_rid, const String &p_name) override;
  87. virtual String font_get_name(const RID &p_font_rid) const override;
  88. virtual Dictionary font_get_ot_name_strings(const RID &p_font_rid) const override;
  89. GDVIRTUAL2(_font_set_name, RID, const String &);
  90. GDVIRTUAL1RC(String, _font_get_name, RID);
  91. GDVIRTUAL1RC(Dictionary, _font_get_ot_name_strings, RID);
  92. virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) override;
  93. virtual String font_get_style_name(const RID &p_font_rid) const override;
  94. GDVIRTUAL2(_font_set_style_name, RID, const String &);
  95. GDVIRTUAL1RC(String, _font_get_style_name, RID);
  96. virtual void font_set_weight(const RID &p_font_rid, int64_t p_weight) override;
  97. virtual int64_t font_get_weight(const RID &p_font_rid) const override;
  98. GDVIRTUAL2(_font_set_weight, RID, int64_t);
  99. GDVIRTUAL1RC(int64_t, _font_get_weight, RID);
  100. virtual void font_set_stretch(const RID &p_font_rid, int64_t p_stretch) override;
  101. virtual int64_t font_get_stretch(const RID &p_font_rid) const override;
  102. GDVIRTUAL2(_font_set_stretch, RID, int64_t);
  103. GDVIRTUAL1RC(int64_t, _font_get_stretch, RID);
  104. virtual void font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
  105. virtual TextServer::FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const override;
  106. GDVIRTUAL2(_font_set_antialiasing, RID, TextServer::FontAntialiasing);
  107. GDVIRTUAL1RC(TextServer::FontAntialiasing, _font_get_antialiasing, RID);
  108. virtual void font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) override;
  109. virtual bool font_get_disable_embedded_bitmaps(const RID &p_font_rid) const override;
  110. GDVIRTUAL2(_font_set_disable_embedded_bitmaps, RID, bool);
  111. GDVIRTUAL1RC(bool, _font_get_disable_embedded_bitmaps, RID);
  112. virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override;
  113. virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override;
  114. GDVIRTUAL2(_font_set_generate_mipmaps, RID, bool);
  115. GDVIRTUAL1RC(bool, _font_get_generate_mipmaps, RID);
  116. virtual void font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) override;
  117. virtual bool font_is_multichannel_signed_distance_field(const RID &p_font_rid) const override;
  118. GDVIRTUAL2(_font_set_multichannel_signed_distance_field, RID, bool);
  119. GDVIRTUAL1RC(bool, _font_is_multichannel_signed_distance_field, RID);
  120. virtual void font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) override;
  121. virtual int64_t font_get_msdf_pixel_range(const RID &p_font_rid) const override;
  122. GDVIRTUAL2(_font_set_msdf_pixel_range, RID, int64_t);
  123. GDVIRTUAL1RC(int64_t, _font_get_msdf_pixel_range, RID);
  124. virtual void font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) override;
  125. virtual int64_t font_get_msdf_size(const RID &p_font_rid) const override;
  126. GDVIRTUAL2(_font_set_msdf_size, RID, int64_t);
  127. GDVIRTUAL1RC(int64_t, _font_get_msdf_size, RID);
  128. virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) override;
  129. virtual int64_t font_get_fixed_size(const RID &p_font_rid) const override;
  130. GDVIRTUAL2_REQUIRED(_font_set_fixed_size, RID, int64_t);
  131. GDVIRTUAL1RC_REQUIRED(int64_t, _font_get_fixed_size, RID);
  132. virtual void font_set_fixed_size_scale_mode(const RID &p_font_rid, FixedSizeScaleMode p_fixed_size_scale) override;
  133. virtual FixedSizeScaleMode font_get_fixed_size_scale_mode(const RID &p_font_rid) const override;
  134. GDVIRTUAL2_REQUIRED(_font_set_fixed_size_scale_mode, RID, FixedSizeScaleMode);
  135. GDVIRTUAL1RC_REQUIRED(FixedSizeScaleMode, _font_get_fixed_size_scale_mode, RID);
  136. virtual void font_set_subpixel_positioning(const RID &p_font_rid, SubpixelPositioning p_subpixel) override;
  137. virtual SubpixelPositioning font_get_subpixel_positioning(const RID &p_font_rid) const override;
  138. GDVIRTUAL2(_font_set_subpixel_positioning, RID, SubpixelPositioning);
  139. GDVIRTUAL1RC(SubpixelPositioning, _font_get_subpixel_positioning, RID);
  140. virtual void font_set_embolden(const RID &p_font_rid, double p_strength) override;
  141. virtual double font_get_embolden(const RID &p_font_rid) const override;
  142. GDVIRTUAL2(_font_set_embolden, RID, double);
  143. GDVIRTUAL1RC(double, _font_get_embolden, RID);
  144. virtual void font_set_spacing(const RID &p_font_rid, SpacingType p_spacing, int64_t p_value) override;
  145. virtual int64_t font_get_spacing(const RID &p_font_rid, SpacingType p_spacing) const override;
  146. GDVIRTUAL3(_font_set_spacing, const RID &, SpacingType, int64_t);
  147. GDVIRTUAL2RC(int64_t, _font_get_spacing, const RID &, SpacingType);
  148. virtual void font_set_baseline_offset(const RID &p_font_rid, double p_baseline_offset) override;
  149. virtual double font_get_baseline_offset(const RID &p_font_rid) const override;
  150. GDVIRTUAL2(_font_set_baseline_offset, const RID &, double);
  151. GDVIRTUAL1RC(double, _font_get_baseline_offset, const RID &);
  152. virtual void font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) override;
  153. virtual Transform2D font_get_transform(const RID &p_font_rid) const override;
  154. GDVIRTUAL2(_font_set_transform, RID, Transform2D);
  155. GDVIRTUAL1RC(Transform2D, _font_get_transform, RID);
  156. virtual void font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) override;
  157. virtual bool font_is_allow_system_fallback(const RID &p_font_rid) const override;
  158. GDVIRTUAL2(_font_set_allow_system_fallback, RID, bool);
  159. GDVIRTUAL1RC(bool, _font_is_allow_system_fallback, RID);
  160. virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override;
  161. virtual bool font_is_force_autohinter(const RID &p_font_rid) const override;
  162. GDVIRTUAL2(_font_set_force_autohinter, RID, bool);
  163. GDVIRTUAL1RC(bool, _font_is_force_autohinter, RID);
  164. virtual void font_set_hinting(const RID &p_font_rid, Hinting p_hinting) override;
  165. virtual Hinting font_get_hinting(const RID &p_font_rid) const override;
  166. GDVIRTUAL2(_font_set_hinting, RID, Hinting);
  167. GDVIRTUAL1RC(Hinting, _font_get_hinting, RID);
  168. virtual void font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) override;
  169. virtual Dictionary font_get_variation_coordinates(const RID &p_font_rid) const override;
  170. GDVIRTUAL2(_font_set_variation_coordinates, RID, Dictionary);
  171. GDVIRTUAL1RC(Dictionary, _font_get_variation_coordinates, RID);
  172. virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override;
  173. virtual double font_get_oversampling(const RID &p_font_rid) const override;
  174. GDVIRTUAL2(_font_set_oversampling, RID, double);
  175. GDVIRTUAL1RC(double, _font_get_oversampling, RID);
  176. virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override;
  177. virtual void font_clear_size_cache(const RID &p_font_rid) override;
  178. virtual void font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) override;
  179. GDVIRTUAL1RC_REQUIRED(TypedArray<Vector2i>, _font_get_size_cache_list, RID);
  180. GDVIRTUAL1_REQUIRED(_font_clear_size_cache, RID);
  181. GDVIRTUAL2_REQUIRED(_font_remove_size_cache, RID, const Vector2i &);
  182. virtual void font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) override;
  183. virtual double font_get_ascent(const RID &p_font_rid, int64_t p_size) const override;
  184. GDVIRTUAL3_REQUIRED(_font_set_ascent, RID, int64_t, double);
  185. GDVIRTUAL2RC_REQUIRED(double, _font_get_ascent, RID, int64_t);
  186. virtual void font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) override;
  187. virtual double font_get_descent(const RID &p_font_rid, int64_t p_size) const override;
  188. GDVIRTUAL3_REQUIRED(_font_set_descent, RID, int64_t, double);
  189. GDVIRTUAL2RC_REQUIRED(double, _font_get_descent, RID, int64_t);
  190. virtual void font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) override;
  191. virtual double font_get_underline_position(const RID &p_font_rid, int64_t p_size) const override;
  192. GDVIRTUAL3_REQUIRED(_font_set_underline_position, RID, int64_t, double);
  193. GDVIRTUAL2RC_REQUIRED(double, _font_get_underline_position, RID, int64_t);
  194. virtual void font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) override;
  195. virtual double font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const override;
  196. GDVIRTUAL3_REQUIRED(_font_set_underline_thickness, RID, int64_t, double);
  197. GDVIRTUAL2RC_REQUIRED(double, _font_get_underline_thickness, RID, int64_t);
  198. virtual void font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) override;
  199. virtual double font_get_scale(const RID &p_font_rid, int64_t p_size) const override;
  200. GDVIRTUAL3_REQUIRED(_font_set_scale, RID, int64_t, double);
  201. GDVIRTUAL2RC_REQUIRED(double, _font_get_scale, RID, int64_t);
  202. virtual int64_t font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const override;
  203. virtual void font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) override;
  204. virtual void font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) override;
  205. GDVIRTUAL2RC_REQUIRED(int64_t, _font_get_texture_count, RID, const Vector2i &);
  206. GDVIRTUAL2_REQUIRED(_font_clear_textures, RID, const Vector2i &);
  207. GDVIRTUAL3_REQUIRED(_font_remove_texture, RID, const Vector2i &, int64_t);
  208. virtual void font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) override;
  209. virtual Ref<Image> font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
  210. GDVIRTUAL4_REQUIRED(_font_set_texture_image, RID, const Vector2i &, int64_t, const Ref<Image> &);
  211. GDVIRTUAL3RC_REQUIRED(Ref<Image>, _font_get_texture_image, RID, const Vector2i &, int64_t);
  212. virtual void font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) override;
  213. virtual PackedInt32Array font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
  214. GDVIRTUAL4(_font_set_texture_offsets, RID, const Vector2i &, int64_t, const PackedInt32Array &);
  215. GDVIRTUAL3RC(PackedInt32Array, _font_get_texture_offsets, RID, const Vector2i &, int64_t);
  216. virtual PackedInt32Array font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const override;
  217. virtual void font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) override;
  218. virtual void font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) override;
  219. GDVIRTUAL2RC_REQUIRED(PackedInt32Array, _font_get_glyph_list, RID, const Vector2i &);
  220. GDVIRTUAL2_REQUIRED(_font_clear_glyphs, RID, const Vector2i &);
  221. GDVIRTUAL3_REQUIRED(_font_remove_glyph, RID, const Vector2i &, int64_t);
  222. virtual Vector2 font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const override;
  223. virtual void font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) override;
  224. GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_advance, RID, int64_t, int64_t);
  225. GDVIRTUAL4_REQUIRED(_font_set_glyph_advance, RID, int64_t, int64_t, const Vector2 &);
  226. virtual Vector2 font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  227. virtual void font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) override;
  228. GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_offset, RID, const Vector2i &, int64_t);
  229. GDVIRTUAL4_REQUIRED(_font_set_glyph_offset, RID, const Vector2i &, int64_t, const Vector2 &);
  230. virtual Vector2 font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  231. virtual void font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) override;
  232. GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_size, RID, const Vector2i &, int64_t);
  233. GDVIRTUAL4_REQUIRED(_font_set_glyph_size, RID, const Vector2i &, int64_t, const Vector2 &);
  234. virtual Rect2 font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  235. virtual void font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) override;
  236. GDVIRTUAL3RC_REQUIRED(Rect2, _font_get_glyph_uv_rect, RID, const Vector2i &, int64_t);
  237. GDVIRTUAL4_REQUIRED(_font_set_glyph_uv_rect, RID, const Vector2i &, int64_t, const Rect2 &);
  238. virtual int64_t font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  239. virtual void font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) override;
  240. GDVIRTUAL3RC_REQUIRED(int64_t, _font_get_glyph_texture_idx, RID, const Vector2i &, int64_t);
  241. GDVIRTUAL4_REQUIRED(_font_set_glyph_texture_idx, RID, const Vector2i &, int64_t, int64_t);
  242. virtual RID font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  243. GDVIRTUAL3RC_REQUIRED(RID, _font_get_glyph_texture_rid, RID, const Vector2i &, int64_t);
  244. virtual Size2 font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
  245. GDVIRTUAL3RC_REQUIRED(Size2, _font_get_glyph_texture_size, RID, const Vector2i &, int64_t);
  246. virtual Dictionary font_get_glyph_contours(const RID &p_font, int64_t p_size, int64_t p_index) const override;
  247. GDVIRTUAL3RC(Dictionary, _font_get_glyph_contours, RID, int64_t, int64_t);
  248. virtual TypedArray<Vector2i> font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const override;
  249. virtual void font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) override;
  250. virtual void font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) override;
  251. GDVIRTUAL2RC(TypedArray<Vector2i>, _font_get_kerning_list, RID, int64_t);
  252. GDVIRTUAL2(_font_clear_kerning_map, RID, int64_t);
  253. GDVIRTUAL3(_font_remove_kerning, RID, int64_t, const Vector2i &);
  254. virtual void font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
  255. virtual Vector2 font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const override;
  256. GDVIRTUAL4(_font_set_kerning, RID, int64_t, const Vector2i &, const Vector2 &);
  257. GDVIRTUAL3RC(Vector2, _font_get_kerning, RID, int64_t, const Vector2i &);
  258. virtual int64_t font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector = 0) const override;
  259. GDVIRTUAL4RC_REQUIRED(int64_t, _font_get_glyph_index, RID, int64_t, int64_t, int64_t);
  260. virtual int64_t font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const override;
  261. GDVIRTUAL3RC_REQUIRED(int64_t, _font_get_char_from_glyph_index, RID, int64_t, int64_t);
  262. virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override;
  263. virtual String font_get_supported_chars(const RID &p_font_rid) const override;
  264. virtual PackedInt32Array font_get_supported_glyphs(const RID &p_font_rid) const override;
  265. GDVIRTUAL2RC_REQUIRED(bool, _font_has_char, RID, int64_t);
  266. GDVIRTUAL1RC_REQUIRED(String, _font_get_supported_chars, RID);
  267. GDVIRTUAL1RC_REQUIRED(PackedInt32Array, _font_get_supported_glyphs, RID);
  268. virtual void font_render_range(const RID &p_font, const Vector2i &p_size, int64_t p_start, int64_t p_end) override;
  269. virtual void font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) override;
  270. GDVIRTUAL4(_font_render_range, RID, const Vector2i &, int64_t, int64_t);
  271. GDVIRTUAL3(_font_render_glyph, RID, const Vector2i &, int64_t);
  272. virtual void font_draw_glyph(const RID &p_font, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
  273. virtual void font_draw_glyph_outline(const RID &p_font, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
  274. GDVIRTUAL6C_REQUIRED(_font_draw_glyph, RID, RID, int64_t, const Vector2 &, int64_t, const Color &);
  275. GDVIRTUAL7C_REQUIRED(_font_draw_glyph_outline, RID, RID, int64_t, int64_t, const Vector2 &, int64_t, const Color &);
  276. virtual bool font_is_language_supported(const RID &p_font_rid, const String &p_language) const override;
  277. virtual void font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) override;
  278. virtual bool font_get_language_support_override(const RID &p_font_rid, const String &p_language) override;
  279. virtual void font_remove_language_support_override(const RID &p_font_rid, const String &p_language) override;
  280. virtual PackedStringArray font_get_language_support_overrides(const RID &p_font_rid) override;
  281. GDVIRTUAL2RC(bool, _font_is_language_supported, RID, const String &);
  282. GDVIRTUAL3(_font_set_language_support_override, RID, const String &, bool);
  283. GDVIRTUAL2R(bool, _font_get_language_support_override, RID, const String &);
  284. GDVIRTUAL2(_font_remove_language_support_override, RID, const String &);
  285. GDVIRTUAL1R(PackedStringArray, _font_get_language_support_overrides, RID);
  286. virtual bool font_is_script_supported(const RID &p_font_rid, const String &p_script) const override;
  287. virtual void font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) override;
  288. virtual bool font_get_script_support_override(const RID &p_font_rid, const String &p_script) override;
  289. virtual void font_remove_script_support_override(const RID &p_font_rid, const String &p_script) override;
  290. virtual PackedStringArray font_get_script_support_overrides(const RID &p_font_rid) override;
  291. GDVIRTUAL2RC(bool, _font_is_script_supported, RID, const String &);
  292. GDVIRTUAL3(_font_set_script_support_override, RID, const String &, bool);
  293. GDVIRTUAL2R(bool, _font_get_script_support_override, RID, const String &);
  294. GDVIRTUAL2(_font_remove_script_support_override, RID, const String &);
  295. GDVIRTUAL1R(PackedStringArray, _font_get_script_support_overrides, RID);
  296. virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) override;
  297. virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const override;
  298. GDVIRTUAL2(_font_set_opentype_feature_overrides, RID, const Dictionary &);
  299. GDVIRTUAL1RC(Dictionary, _font_get_opentype_feature_overrides, RID);
  300. virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const override;
  301. virtual Dictionary font_supported_variation_list(const RID &p_font_rid) const override;
  302. GDVIRTUAL1RC(Dictionary, _font_supported_feature_list, RID);
  303. GDVIRTUAL1RC(Dictionary, _font_supported_variation_list, RID);
  304. virtual double font_get_global_oversampling() const override;
  305. virtual void font_set_global_oversampling(double p_oversampling) override;
  306. GDVIRTUAL0RC(double, _font_get_global_oversampling);
  307. GDVIRTUAL1(_font_set_global_oversampling, double);
  308. virtual Vector2 get_hex_code_box_size(int64_t p_size, int64_t p_index) const override;
  309. virtual void draw_hex_code_box(const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const override;
  310. GDVIRTUAL2RC(Vector2, _get_hex_code_box_size, int64_t, int64_t);
  311. GDVIRTUAL5C(_draw_hex_code_box, RID, int64_t, const Vector2 &, int64_t, const Color &);
  312. /* Shaped text buffer interface */
  313. virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
  314. GDVIRTUAL2R_REQUIRED(RID, _create_shaped_text, Direction, Orientation);
  315. virtual void shaped_text_clear(const RID &p_shaped) override;
  316. GDVIRTUAL1_REQUIRED(_shaped_text_clear, RID);
  317. virtual void shaped_text_set_direction(const RID &p_shaped, Direction p_direction = DIRECTION_AUTO) override;
  318. virtual Direction shaped_text_get_direction(const RID &p_shaped) const override;
  319. virtual Direction shaped_text_get_inferred_direction(const RID &p_shaped) const override;
  320. GDVIRTUAL2(_shaped_text_set_direction, RID, Direction);
  321. GDVIRTUAL1RC(Direction, _shaped_text_get_direction, RID);
  322. GDVIRTUAL1RC(Direction, _shaped_text_get_inferred_direction, RID);
  323. virtual void shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) override;
  324. GDVIRTUAL2(_shaped_text_set_bidi_override, RID, const Array &);
  325. virtual void shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) override;
  326. virtual String shaped_text_get_custom_punctuation(const RID &p_shaped) const override;
  327. GDVIRTUAL2(_shaped_text_set_custom_punctuation, RID, String);
  328. GDVIRTUAL1RC(String, _shaped_text_get_custom_punctuation, RID);
  329. virtual void shaped_text_set_custom_ellipsis(const RID &p_shaped, int64_t p_char) override;
  330. virtual int64_t shaped_text_get_custom_ellipsis(const RID &p_shaped) const override;
  331. GDVIRTUAL2(_shaped_text_set_custom_ellipsis, RID, int64_t);
  332. GDVIRTUAL1RC(int64_t, _shaped_text_get_custom_ellipsis, RID);
  333. virtual void shaped_text_set_orientation(const RID &p_shaped, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
  334. virtual Orientation shaped_text_get_orientation(const RID &p_shaped) const override;
  335. GDVIRTUAL2(_shaped_text_set_orientation, RID, Orientation);
  336. GDVIRTUAL1RC(Orientation, _shaped_text_get_orientation, RID);
  337. virtual void shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) override;
  338. virtual bool shaped_text_get_preserve_invalid(const RID &p_shaped) const override;
  339. GDVIRTUAL2(_shaped_text_set_preserve_invalid, RID, bool);
  340. GDVIRTUAL1RC(bool, _shaped_text_get_preserve_invalid, RID);
  341. virtual void shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) override;
  342. virtual bool shaped_text_get_preserve_control(const RID &p_shaped) const override;
  343. GDVIRTUAL2(_shaped_text_set_preserve_control, RID, bool);
  344. GDVIRTUAL1RC(bool, _shaped_text_get_preserve_control, RID);
  345. virtual void shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) override;
  346. virtual int64_t shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const override;
  347. GDVIRTUAL3(_shaped_text_set_spacing, RID, SpacingType, int64_t);
  348. GDVIRTUAL2RC(int64_t, _shaped_text_get_spacing, RID, SpacingType);
  349. virtual bool shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", const Variant &p_meta = Variant()) override;
  350. virtual bool shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, int64_t p_length = 1, double p_baseline = 0.0) override;
  351. virtual bool shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, double p_baseline = 0.0) override;
  352. GDVIRTUAL7R_REQUIRED(bool, _shaped_text_add_string, RID, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &);
  353. GDVIRTUAL6R_REQUIRED(bool, _shaped_text_add_object, RID, const Variant &, const Size2 &, InlineAlignment, int64_t, double);
  354. GDVIRTUAL5R_REQUIRED(bool, _shaped_text_resize_object, RID, const Variant &, const Size2 &, InlineAlignment, double);
  355. virtual int64_t shaped_get_span_count(const RID &p_shaped) const override;
  356. virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override;
  357. virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) override;
  358. GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_get_span_count, RID);
  359. GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_meta, RID, int64_t);
  360. GDVIRTUAL5_REQUIRED(_shaped_set_span_update_font, RID, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
  361. virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override;
  362. virtual RID shaped_text_get_parent(const RID &p_shaped) const override;
  363. GDVIRTUAL3RC_REQUIRED(RID, _shaped_text_substr, RID, int64_t, int64_t);
  364. GDVIRTUAL1RC_REQUIRED(RID, _shaped_text_get_parent, RID);
  365. virtual double shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
  366. virtual double shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) override;
  367. GDVIRTUAL3R(double, _shaped_text_fit_to_width, RID, double, BitField<TextServer::JustificationFlag>);
  368. GDVIRTUAL2R(double, _shaped_text_tab_align, RID, const PackedFloat32Array &);
  369. virtual bool shaped_text_shape(const RID &p_shaped) override;
  370. virtual bool shaped_text_update_breaks(const RID &p_shaped) override;
  371. virtual bool shaped_text_update_justification_ops(const RID &p_shaped) override;
  372. GDVIRTUAL1R_REQUIRED(bool, _shaped_text_shape, RID);
  373. GDVIRTUAL1R(bool, _shaped_text_update_breaks, RID);
  374. GDVIRTUAL1R(bool, _shaped_text_update_justification_ops, RID);
  375. virtual bool shaped_text_is_ready(const RID &p_shaped) const override;
  376. GDVIRTUAL1RC_REQUIRED(bool, _shaped_text_is_ready, RID);
  377. virtual const Glyph *shaped_text_get_glyphs(const RID &p_shaped) const override;
  378. virtual const Glyph *shaped_text_sort_logical(const RID &p_shaped) override;
  379. virtual int64_t shaped_text_get_glyph_count(const RID &p_shaped) const override;
  380. GDVIRTUAL1RC_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_get_glyphs, RID);
  381. GDVIRTUAL1R_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_sort_logical, RID);
  382. GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_glyph_count, RID);
  383. virtual Vector2i shaped_text_get_range(const RID &p_shaped) const override;
  384. GDVIRTUAL1RC_REQUIRED(Vector2i, _shaped_text_get_range, RID);
  385. virtual PackedInt32Array shaped_text_get_line_breaks_adv(const RID &p_shaped, const PackedFloat32Array &p_width, int64_t p_start = 0, bool p_once = true, BitField<TextServer::LineBreakFlag> p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
  386. virtual PackedInt32Array shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start = 0, BitField<TextServer::LineBreakFlag> p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
  387. virtual PackedInt32Array shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_PUNCTUATION, BitField<TextServer::GraphemeFlag> p_skip_grapheme_flags = GRAPHEME_IS_VIRTUAL) const override;
  388. GDVIRTUAL5RC(PackedInt32Array, _shaped_text_get_line_breaks_adv, RID, const PackedFloat32Array &, int64_t, bool, BitField<TextServer::LineBreakFlag>);
  389. GDVIRTUAL4RC(PackedInt32Array, _shaped_text_get_line_breaks, RID, double, int64_t, BitField<TextServer::LineBreakFlag>);
  390. GDVIRTUAL3RC(PackedInt32Array, _shaped_text_get_word_breaks, RID, BitField<TextServer::GraphemeFlag>, BitField<TextServer::GraphemeFlag>);
  391. virtual int64_t shaped_text_get_trim_pos(const RID &p_shaped) const override;
  392. virtual int64_t shaped_text_get_ellipsis_pos(const RID &p_shaped) const override;
  393. virtual const Glyph *shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const override;
  394. virtual int64_t shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const override;
  395. GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_trim_pos, RID);
  396. GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_ellipsis_pos, RID);
  397. GDVIRTUAL1RC_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_get_ellipsis_glyphs, RID);
  398. GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_ellipsis_glyph_count, RID);
  399. virtual void shaped_text_overrun_trim_to_width(const RID &p_shaped, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) override;
  400. GDVIRTUAL3(_shaped_text_overrun_trim_to_width, RID, double, BitField<TextServer::TextOverrunFlag>);
  401. virtual Array shaped_text_get_objects(const RID &p_shaped) const override;
  402. virtual Rect2 shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const override;
  403. virtual Vector2i shaped_text_get_object_range(const RID &p_shaped, const Variant &p_key) const override;
  404. virtual int64_t shaped_text_get_object_glyph(const RID &p_shaped, const Variant &p_key) const override;
  405. GDVIRTUAL1RC_REQUIRED(Array, _shaped_text_get_objects, RID);
  406. GDVIRTUAL2RC_REQUIRED(Rect2, _shaped_text_get_object_rect, RID, const Variant &);
  407. GDVIRTUAL2RC_REQUIRED(Vector2i, _shaped_text_get_object_range, RID, const Variant &);
  408. GDVIRTUAL2RC_REQUIRED(int64_t, _shaped_text_get_object_glyph, RID, const Variant &);
  409. virtual Size2 shaped_text_get_size(const RID &p_shaped) const override;
  410. virtual double shaped_text_get_ascent(const RID &p_shaped) const override;
  411. virtual double shaped_text_get_descent(const RID &p_shaped) const override;
  412. virtual double shaped_text_get_width(const RID &p_shaped) const override;
  413. virtual double shaped_text_get_underline_position(const RID &p_shaped) const override;
  414. virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override;
  415. GDVIRTUAL1RC_REQUIRED(Size2, _shaped_text_get_size, RID);
  416. GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_ascent, RID);
  417. GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_descent, RID);
  418. GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_width, RID);
  419. GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_underline_position, RID);
  420. GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_underline_thickness, RID);
  421. virtual Direction shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const override;
  422. GDVIRTUAL3RC(int64_t, _shaped_text_get_dominant_direction_in_range, RID, int64_t, int64_t);
  423. virtual CaretInfo shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const override;
  424. virtual Vector<Vector2> shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const override;
  425. GDVIRTUAL3C(_shaped_text_get_carets, RID, int64_t, GDExtensionPtr<CaretInfo>);
  426. GDVIRTUAL3RC(Vector<Vector2>, _shaped_text_get_selection, RID, int64_t, int64_t);
  427. virtual int64_t shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const override;
  428. virtual int64_t shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const override;
  429. GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_grapheme, RID, double);
  430. GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_position, RID, double);
  431. 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 override;
  432. 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 override;
  433. GDVIRTUAL6C(_shaped_text_draw, RID, RID, const Vector2 &, double, double, const Color &);
  434. GDVIRTUAL7C(_shaped_text_draw_outline, RID, RID, const Vector2 &, double, double, int64_t, const Color &);
  435. virtual Vector2 shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const override;
  436. virtual int64_t shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override;
  437. virtual int64_t shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override;
  438. GDVIRTUAL2RC(Vector2, _shaped_text_get_grapheme_bounds, RID, int64_t);
  439. GDVIRTUAL2RC(int64_t, _shaped_text_next_grapheme_pos, RID, int64_t);
  440. GDVIRTUAL2RC(int64_t, _shaped_text_prev_grapheme_pos, RID, int64_t);
  441. virtual PackedInt32Array shaped_text_get_character_breaks(const RID &p_shaped) const override;
  442. virtual int64_t shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const override;
  443. virtual int64_t shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const override;
  444. virtual int64_t shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const override;
  445. GDVIRTUAL1RC(PackedInt32Array, _shaped_text_get_character_breaks, RID);
  446. GDVIRTUAL2RC(int64_t, _shaped_text_next_character_pos, RID, int64_t);
  447. GDVIRTUAL2RC(int64_t, _shaped_text_prev_character_pos, RID, int64_t);
  448. GDVIRTUAL2RC(int64_t, _shaped_text_closest_character_pos, RID, int64_t);
  449. virtual String format_number(const String &p_string, const String &p_language = "") const override;
  450. virtual String parse_number(const String &p_string, const String &p_language = "") const override;
  451. virtual String percent_sign(const String &p_language = "") const override;
  452. GDVIRTUAL2RC(String, _format_number, const String &, const String &);
  453. GDVIRTUAL2RC(String, _parse_number, const String &, const String &);
  454. GDVIRTUAL1RC(String, _percent_sign, const String &);
  455. virtual String strip_diacritics(const String &p_string) const override;
  456. GDVIRTUAL1RC(String, _strip_diacritics, const String &);
  457. virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "", int64_t p_chars_per_line = 0) const override;
  458. GDVIRTUAL3RC(PackedInt32Array, _string_get_word_breaks, const String &, const String &, int64_t);
  459. virtual PackedInt32Array string_get_character_breaks(const String &p_string, const String &p_language = "") const override;
  460. GDVIRTUAL2RC(PackedInt32Array, _string_get_character_breaks, const String &, const String &);
  461. virtual bool is_valid_identifier(const String &p_string) const override;
  462. GDVIRTUAL1RC(bool, _is_valid_identifier, const String &);
  463. virtual bool is_valid_letter(uint64_t p_unicode) const override;
  464. GDVIRTUAL1RC(bool, _is_valid_letter, uint64_t);
  465. virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
  466. virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
  467. virtual String string_to_title(const String &p_string, const String &p_language = "") const override;
  468. GDVIRTUAL2RC(String, _string_to_upper, const String &, const String &);
  469. GDVIRTUAL2RC(String, _string_to_lower, const String &, const String &);
  470. GDVIRTUAL2RC(String, _string_to_title, const String &, const String &);
  471. TypedArray<Vector3i> parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const;
  472. GDVIRTUAL3RC(TypedArray<Vector3i>, _parse_structured_text, StructuredTextParser, const Array &, const String &);
  473. virtual int64_t is_confusable(const String &p_string, const PackedStringArray &p_dict) const override;
  474. virtual bool spoof_check(const String &p_string) const override;
  475. GDVIRTUAL2RC(int64_t, _is_confusable, const String &, const PackedStringArray &);
  476. GDVIRTUAL1RC(bool, _spoof_check, const String &);
  477. virtual void cleanup() override;
  478. GDVIRTUAL0(_cleanup);
  479. TextServerExtension();
  480. ~TextServerExtension();
  481. };
  482. #endif // TEXT_SERVER_EXTENSION_H