| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#pragma once |
| 32 |
|
| 33 |
#include "core/object/gdvirtual.gen.inc" |
| 34 |
#include "core/os/thread_safe.h" |
| 35 |
#include "core/variant/native_ptr.h" |
| 36 |
#include "core/variant/typed_array.h" |
| 37 |
#include "servers/text/text_server.h" |
| 38 |
|
| 39 |
class TextServerExtension : public TextServer { |
| 40 |
GDCLASS(TextServerExtension, TextServer); |
| 41 |
|
| 42 |
protected: |
| 43 |
_THREAD_SAFE_CLASS_ |
| 44 |
|
| 45 |
static void _bind_methods(); |
| 46 |
|
| 47 |
public: |
| 48 |
virtual bool has_feature(Feature p_feature) const override; |
| 49 |
virtual String get_name() const override; |
| 50 |
virtual int64_t get_features() const override; |
| 51 |
GDVIRTUAL1RC_REQUIRED(bool, _has_feature, Feature); |
| 52 |
GDVIRTUAL0RC_REQUIRED(String, _get_name); |
| 53 |
GDVIRTUAL0RC_REQUIRED(int64_t, _get_features); |
| 54 |
|
| 55 |
virtual void free_rid(const RID &p_rid) override; |
| 56 |
virtual bool has(const RID &p_rid) override; |
| 57 |
virtual bool load_support_data(const String &p_filename) override; |
| 58 |
GDVIRTUAL1_REQUIRED(_free_rid, RID); |
| 59 |
GDVIRTUAL1R_REQUIRED(bool, _has, RID); |
| 60 |
GDVIRTUAL1R(bool, _load_support_data, const String &); |
| 61 |
|
| 62 |
virtual String get_support_data_filename() const override; |
| 63 |
virtual String get_support_data_info() const override; |
| 64 |
virtual bool save_support_data(const String &p_filename) const override; |
| 65 |
virtual PackedByteArray get_support_data() const override; |
| 66 |
GDVIRTUAL0RC(String, _get_support_data_filename); |
| 67 |
GDVIRTUAL0RC(String, _get_support_data_info); |
| 68 |
GDVIRTUAL1RC(bool, _save_support_data, const String &); |
| 69 |
GDVIRTUAL0RC(PackedByteArray, _get_support_data); |
| 70 |
virtual bool is_locale_using_support_data(const String &p_locale) const override; |
| 71 |
GDVIRTUAL1RC(bool, _is_locale_using_support_data, const String &); |
| 72 |
|
| 73 |
virtual bool is_locale_right_to_left(const String &p_locale) const override; |
| 74 |
GDVIRTUAL1RC(bool, _is_locale_right_to_left, const String &); |
| 75 |
|
| 76 |
virtual int64_t name_to_tag(const String &p_name) const override; |
| 77 |
virtual String tag_to_name(int64_t p_tag) const override; |
| 78 |
GDVIRTUAL1RC(int64_t, _name_to_tag, const String &); |
| 79 |
GDVIRTUAL1RC(String, _tag_to_name, int64_t); |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
virtual RID create_font() override; |
| 84 |
GDVIRTUAL0R_REQUIRED(RID, _create_font); |
| 85 |
|
| 86 |
virtual RID create_font_linked_variation(const RID &p_font_rid) override; |
| 87 |
GDVIRTUAL1R(RID, _create_font_linked_variation, RID); |
| 88 |
|
| 89 |
virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) override; |
| 90 |
virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) override; |
| 91 |
GDVIRTUAL2(_font_set_data, RID, const PackedByteArray &); |
| 92 |
GDVIRTUAL3(_font_set_data_ptr, RID, GDExtensionConstPtr<const uint8_t>, int64_t); |
| 93 |
|
| 94 |
virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override; |
| 95 |
virtual int64_t font_get_face_index(const RID &p_font_rid) const override; |
| 96 |
GDVIRTUAL2(_font_set_face_index, RID, int64_t); |
| 97 |
GDVIRTUAL1RC(int64_t, _font_get_face_index, RID); |
| 98 |
|
| 99 |
virtual int64_t font_get_face_count(const RID &p_font_rid) const override; |
| 100 |
GDVIRTUAL1RC(int64_t, _font_get_face_count, RID); |
| 101 |
|
| 102 |
virtual void font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) override; |
| 103 |
virtual BitField<FontStyle> font_get_style(const RID &p_font_rid) const override; |
| 104 |
GDVIRTUAL2(_font_set_style, RID, BitField<FontStyle>); |
| 105 |
GDVIRTUAL1RC(BitField<FontStyle>, _font_get_style, RID); |
| 106 |
|
| 107 |
virtual void font_set_name(const RID &p_font_rid, const String &p_name) override; |
| 108 |
virtual String font_get_name(const RID &p_font_rid) const override; |
| 109 |
virtual Dictionary font_get_ot_name_strings(const RID &p_font_rid) const override; |
| 110 |
GDVIRTUAL2(_font_set_name, RID, const String &); |
| 111 |
GDVIRTUAL1RC(String, _font_get_name, RID); |
| 112 |
GDVIRTUAL1RC(Dictionary, _font_get_ot_name_strings, RID); |
| 113 |
|
| 114 |
virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) override; |
| 115 |
virtual String font_get_style_name(const RID &p_font_rid) const override; |
| 116 |
GDVIRTUAL2(_font_set_style_name, RID, const String &); |
| 117 |
GDVIRTUAL1RC(String, _font_get_style_name, RID); |
| 118 |
|
| 119 |
virtual void font_set_weight(const RID &p_font_rid, int64_t p_weight) override; |
| 120 |
virtual int64_t font_get_weight(const RID &p_font_rid) const override; |
| 121 |
GDVIRTUAL2(_font_set_weight, RID, int64_t); |
| 122 |
GDVIRTUAL1RC(int64_t, _font_get_weight, RID); |
| 123 |
|
| 124 |
virtual void font_set_stretch(const RID &p_font_rid, int64_t p_stretch) override; |
| 125 |
virtual int64_t font_get_stretch(const RID &p_font_rid) const override; |
| 126 |
GDVIRTUAL2(_font_set_stretch, RID, int64_t); |
| 127 |
GDVIRTUAL1RC(int64_t, _font_get_stretch, RID); |
| 128 |
|
| 129 |
virtual void font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) override; |
| 130 |
virtual TextServer::FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const override; |
| 131 |
GDVIRTUAL2(_font_set_antialiasing, RID, TextServer::FontAntialiasing); |
| 132 |
GDVIRTUAL1RC(TextServer::FontAntialiasing, _font_get_antialiasing, RID); |
| 133 |
|
| 134 |
virtual void font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) override; |
| 135 |
virtual bool font_get_disable_embedded_bitmaps(const RID &p_font_rid) const override; |
| 136 |
GDVIRTUAL2(_font_set_disable_embedded_bitmaps, RID, bool); |
| 137 |
GDVIRTUAL1RC(bool, _font_get_disable_embedded_bitmaps, RID); |
| 138 |
|
| 139 |
virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override; |
| 140 |
virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override; |
| 141 |
GDVIRTUAL2(_font_set_generate_mipmaps, RID, bool); |
| 142 |
GDVIRTUAL1RC(bool, _font_get_generate_mipmaps, RID); |
| 143 |
|
| 144 |
virtual void font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) override; |
| 145 |
virtual bool font_is_multichannel_signed_distance_field(const RID &p_font_rid) const override; |
| 146 |
GDVIRTUAL2(_font_set_multichannel_signed_distance_field, RID, bool); |
| 147 |
GDVIRTUAL1RC(bool, _font_is_multichannel_signed_distance_field, RID); |
| 148 |
|
| 149 |
virtual void font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) override; |
| 150 |
virtual int64_t font_get_msdf_pixel_range(const RID &p_font_rid) const override; |
| 151 |
GDVIRTUAL2(_font_set_msdf_pixel_range, RID, int64_t); |
| 152 |
GDVIRTUAL1RC(int64_t, _font_get_msdf_pixel_range, RID); |
| 153 |
|
| 154 |
virtual void font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) override; |
| 155 |
virtual int64_t font_get_msdf_size(const RID &p_font_rid) const override; |
| 156 |
GDVIRTUAL2(_font_set_msdf_size, RID, int64_t); |
| 157 |
GDVIRTUAL1RC(int64_t, _font_get_msdf_size, RID); |
| 158 |
|
| 159 |
virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) override; |
| 160 |
virtual int64_t font_get_fixed_size(const RID &p_font_rid) const override; |
| 161 |
GDVIRTUAL2_REQUIRED(_font_set_fixed_size, RID, int64_t); |
| 162 |
GDVIRTUAL1RC_REQUIRED(int64_t, _font_get_fixed_size, RID); |
| 163 |
|
| 164 |
virtual void font_set_fixed_size_scale_mode(const RID &p_font_rid, FixedSizeScaleMode p_fixed_size_scale) override; |
| 165 |
virtual FixedSizeScaleMode font_get_fixed_size_scale_mode(const RID &p_font_rid) const override; |
| 166 |
GDVIRTUAL2_REQUIRED(_font_set_fixed_size_scale_mode, RID, FixedSizeScaleMode); |
| 167 |
GDVIRTUAL1RC_REQUIRED(FixedSizeScaleMode, _font_get_fixed_size_scale_mode, RID); |
| 168 |
|
| 169 |
virtual void font_set_subpixel_positioning(const RID &p_font_rid, SubpixelPositioning p_subpixel) override; |
| 170 |
virtual SubpixelPositioning font_get_subpixel_positioning(const RID &p_font_rid) const override; |
| 171 |
GDVIRTUAL2(_font_set_subpixel_positioning, RID, SubpixelPositioning); |
| 172 |
GDVIRTUAL1RC(SubpixelPositioning, _font_get_subpixel_positioning, RID); |
| 173 |
|
| 174 |
virtual void font_set_keep_rounding_remainders(const RID &p_font_rid, bool p_keep_rounding_remainders) override; |
| 175 |
virtual bool font_get_keep_rounding_remainders(const RID &p_font_rid) const override; |
| 176 |
GDVIRTUAL2(_font_set_keep_rounding_remainders, RID, bool); |
| 177 |
GDVIRTUAL1RC(bool, _font_get_keep_rounding_remainders, RID); |
| 178 |
|
| 179 |
virtual void font_set_embolden(const RID &p_font_rid, double p_strength) override; |
| 180 |
virtual double font_get_embolden(const RID &p_font_rid) const override; |
| 181 |
GDVIRTUAL2(_font_set_embolden, RID, double); |
| 182 |
GDVIRTUAL1RC(double, _font_get_embolden, RID); |
| 183 |
|
| 184 |
virtual void font_set_spacing(const RID &p_font_rid, SpacingType p_spacing, int64_t p_value) override; |
| 185 |
virtual int64_t font_get_spacing(const RID &p_font_rid, SpacingType p_spacing) const override; |
| 186 |
GDVIRTUAL3(_font_set_spacing, const RID &, SpacingType, int64_t); |
| 187 |
GDVIRTUAL2RC(int64_t, _font_get_spacing, const RID &, SpacingType); |
| 188 |
|
| 189 |
virtual void font_set_baseline_offset(const RID &p_font_rid, double p_baseline_offset) override; |
| 190 |
virtual double font_get_baseline_offset(const RID &p_font_rid) const override; |
| 191 |
GDVIRTUAL2(_font_set_baseline_offset, const RID &, double); |
| 192 |
GDVIRTUAL1RC(double, _font_get_baseline_offset, const RID &); |
| 193 |
|
| 194 |
virtual void font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) override; |
| 195 |
virtual Transform2D font_get_transform(const RID &p_font_rid) const override; |
| 196 |
GDVIRTUAL2(_font_set_transform, RID, Transform2D); |
| 197 |
GDVIRTUAL1RC(Transform2D, _font_get_transform, RID); |
| 198 |
|
| 199 |
virtual void font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) override; |
| 200 |
virtual bool font_is_allow_system_fallback(const RID &p_font_rid) const override; |
| 201 |
virtual void font_clear_system_fallback_cache() override; |
| 202 |
GDVIRTUAL2(_font_set_allow_system_fallback, RID, bool); |
| 203 |
GDVIRTUAL1RC(bool, _font_is_allow_system_fallback, RID); |
| 204 |
GDVIRTUAL0(_font_clear_system_fallback_cache); |
| 205 |
|
| 206 |
virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override; |
| 207 |
virtual bool font_is_force_autohinter(const RID &p_font_rid) const override; |
| 208 |
GDVIRTUAL2(_font_set_force_autohinter, RID, bool); |
| 209 |
GDVIRTUAL1RC(bool, _font_is_force_autohinter, RID); |
| 210 |
|
| 211 |
virtual void font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) override; |
| 212 |
virtual bool font_is_modulate_color_glyphs(const RID &p_font_rid) const override; |
| 213 |
GDVIRTUAL2(_font_set_modulate_color_glyphs, RID, bool); |
| 214 |
GDVIRTUAL1RC(bool, _font_is_modulate_color_glyphs, RID); |
| 215 |
|
| 216 |
virtual void font_set_hinting(const RID &p_font_rid, Hinting p_hinting) override; |
| 217 |
virtual Hinting font_get_hinting(const RID &p_font_rid) const override; |
| 218 |
GDVIRTUAL2(_font_set_hinting, RID, Hinting); |
| 219 |
GDVIRTUAL1RC(Hinting, _font_get_hinting, RID); |
| 220 |
|
| 221 |
virtual void font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) override; |
| 222 |
virtual Dictionary font_get_variation_coordinates(const RID &p_font_rid) const override; |
| 223 |
GDVIRTUAL2(_font_set_variation_coordinates, RID, Dictionary); |
| 224 |
GDVIRTUAL1RC(Dictionary, _font_get_variation_coordinates, RID); |
| 225 |
|
| 226 |
virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override; |
| 227 |
virtual double font_get_oversampling(const RID &p_font_rid) const override; |
| 228 |
GDVIRTUAL2(_font_set_oversampling, RID, double); |
| 229 |
GDVIRTUAL1RC(double, _font_get_oversampling, RID); |
| 230 |
|
| 231 |
virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override; |
| 232 |
virtual void font_clear_size_cache(const RID &p_font_rid) override; |
| 233 |
virtual void font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) override; |
| 234 |
virtual TypedArray<Dictionary> font_get_size_cache_info(const RID &p_font_rid) const override; |
| 235 |
GDVIRTUAL1RC_REQUIRED(TypedArray<Vector2i>, _font_get_size_cache_list, RID); |
| 236 |
GDVIRTUAL1_REQUIRED(_font_clear_size_cache, RID); |
| 237 |
GDVIRTUAL2_REQUIRED(_font_remove_size_cache, RID, const Vector2i &); |
| 238 |
GDVIRTUAL1RC(TypedArray<Dictionary>, _font_get_size_cache_info, RID); |
| 239 |
|
| 240 |
virtual void font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) override; |
| 241 |
virtual double font_get_ascent(const RID &p_font_rid, int64_t p_size) const override; |
| 242 |
GDVIRTUAL3_REQUIRED(_font_set_ascent, RID, int64_t, double); |
| 243 |
GDVIRTUAL2RC_REQUIRED(double, _font_get_ascent, RID, int64_t); |
| 244 |
|
| 245 |
virtual void font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) override; |
| 246 |
virtual double font_get_descent(const RID &p_font_rid, int64_t p_size) const override; |
| 247 |
GDVIRTUAL3_REQUIRED(_font_set_descent, RID, int64_t, double); |
| 248 |
GDVIRTUAL2RC_REQUIRED(double, _font_get_descent, RID, int64_t); |
| 249 |
|
| 250 |
virtual void font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) override; |
| 251 |
virtual double font_get_underline_position(const RID &p_font_rid, int64_t p_size) const override; |
| 252 |
GDVIRTUAL3_REQUIRED(_font_set_underline_position, RID, int64_t, double); |
| 253 |
GDVIRTUAL2RC_REQUIRED(double, _font_get_underline_position, RID, int64_t); |
| 254 |
|
| 255 |
virtual void font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) override; |
| 256 |
virtual double font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const override; |
| 257 |
GDVIRTUAL3_REQUIRED(_font_set_underline_thickness, RID, int64_t, double); |
| 258 |
GDVIRTUAL2RC_REQUIRED(double, _font_get_underline_thickness, RID, int64_t); |
| 259 |
|
| 260 |
virtual void font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) override; |
| 261 |
virtual double font_get_scale(const RID &p_font_rid, int64_t p_size) const override; |
| 262 |
GDVIRTUAL3_REQUIRED(_font_set_scale, RID, int64_t, double); |
| 263 |
GDVIRTUAL2RC_REQUIRED(double, _font_get_scale, RID, int64_t); |
| 264 |
|
| 265 |
virtual int64_t font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const override; |
| 266 |
virtual void font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) override; |
| 267 |
virtual void font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) override; |
| 268 |
GDVIRTUAL2RC_REQUIRED(int64_t, _font_get_texture_count, RID, const Vector2i &); |
| 269 |
GDVIRTUAL2_REQUIRED(_font_clear_textures, RID, const Vector2i &); |
| 270 |
GDVIRTUAL3_REQUIRED(_font_remove_texture, RID, const Vector2i &, int64_t); |
| 271 |
|
| 272 |
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; |
| 273 |
virtual Ref<Image> font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override; |
| 274 |
GDVIRTUAL4_REQUIRED(_font_set_texture_image, RID, const Vector2i &, int64_t, const Ref<Image> &); |
| 275 |
GDVIRTUAL3RC_REQUIRED(Ref<Image>, _font_get_texture_image, RID, const Vector2i &, int64_t); |
| 276 |
|
| 277 |
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; |
| 278 |
virtual PackedInt32Array font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override; |
| 279 |
GDVIRTUAL4(_font_set_texture_offsets, RID, const Vector2i &, int64_t, const PackedInt32Array &); |
| 280 |
GDVIRTUAL3RC(PackedInt32Array, _font_get_texture_offsets, RID, const Vector2i &, int64_t); |
| 281 |
|
| 282 |
virtual PackedInt32Array font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const override; |
| 283 |
virtual void font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) override; |
| 284 |
virtual void font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) override; |
| 285 |
GDVIRTUAL2RC_REQUIRED(PackedInt32Array, _font_get_glyph_list, RID, const Vector2i &); |
| 286 |
GDVIRTUAL2_REQUIRED(_font_clear_glyphs, RID, const Vector2i &); |
| 287 |
GDVIRTUAL3_REQUIRED(_font_remove_glyph, RID, const Vector2i &, int64_t); |
| 288 |
|
| 289 |
virtual Vector2 font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const override; |
| 290 |
virtual void font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) override; |
| 291 |
GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_advance, RID, int64_t, int64_t); |
| 292 |
GDVIRTUAL4_REQUIRED(_font_set_glyph_advance, RID, int64_t, int64_t, const Vector2 &); |
| 293 |
|
| 294 |
virtual Vector2 font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 295 |
virtual void font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) override; |
| 296 |
GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_offset, RID, const Vector2i &, int64_t); |
| 297 |
GDVIRTUAL4_REQUIRED(_font_set_glyph_offset, RID, const Vector2i &, int64_t, const Vector2 &); |
| 298 |
|
| 299 |
virtual Vector2 font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 300 |
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; |
| 301 |
GDVIRTUAL3RC_REQUIRED(Vector2, _font_get_glyph_size, RID, const Vector2i &, int64_t); |
| 302 |
GDVIRTUAL4_REQUIRED(_font_set_glyph_size, RID, const Vector2i &, int64_t, const Vector2 &); |
| 303 |
|
| 304 |
virtual Rect2 font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 305 |
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; |
| 306 |
GDVIRTUAL3RC_REQUIRED(Rect2, _font_get_glyph_uv_rect, RID, const Vector2i &, int64_t); |
| 307 |
GDVIRTUAL4_REQUIRED(_font_set_glyph_uv_rect, RID, const Vector2i &, int64_t, const Rect2 &); |
| 308 |
|
| 309 |
virtual int64_t font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 310 |
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; |
| 311 |
GDVIRTUAL3RC_REQUIRED(int64_t, _font_get_glyph_texture_idx, RID, const Vector2i &, int64_t); |
| 312 |
GDVIRTUAL4_REQUIRED(_font_set_glyph_texture_idx, RID, const Vector2i &, int64_t, int64_t); |
| 313 |
|
| 314 |
virtual RID font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 315 |
GDVIRTUAL3RC_REQUIRED(RID, _font_get_glyph_texture_rid, RID, const Vector2i &, int64_t); |
| 316 |
|
| 317 |
virtual Size2 font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override; |
| 318 |
GDVIRTUAL3RC_REQUIRED(Size2, _font_get_glyph_texture_size, RID, const Vector2i &, int64_t); |
| 319 |
|
| 320 |
virtual Dictionary font_get_glyph_contours(const RID &p_font, int64_t p_size, int64_t p_index) const override; |
| 321 |
GDVIRTUAL3RC(Dictionary, _font_get_glyph_contours, RID, int64_t, int64_t); |
| 322 |
|
| 323 |
virtual TypedArray<Vector2i> font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const override; |
| 324 |
virtual void font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) override; |
| 325 |
virtual void font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) override; |
| 326 |
GDVIRTUAL2RC(TypedArray<Vector2i>, _font_get_kerning_list, RID, int64_t); |
| 327 |
GDVIRTUAL2(_font_clear_kerning_map, RID, int64_t); |
| 328 |
GDVIRTUAL3(_font_remove_kerning, RID, int64_t, const Vector2i &); |
| 329 |
|
| 330 |
virtual void font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override; |
| 331 |
virtual Vector2 font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const override; |
| 332 |
GDVIRTUAL4(_font_set_kerning, RID, int64_t, const Vector2i &, const Vector2 &); |
| 333 |
GDVIRTUAL3RC(Vector2, _font_get_kerning, RID, int64_t, const Vector2i &); |
| 334 |
|
| 335 |
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; |
| 336 |
GDVIRTUAL4RC_REQUIRED(int64_t, _font_get_glyph_index, RID, int64_t, int64_t, int64_t); |
| 337 |
|
| 338 |
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; |
| 339 |
GDVIRTUAL3RC_REQUIRED(int64_t, _font_get_char_from_glyph_index, RID, int64_t, int64_t); |
| 340 |
|
| 341 |
virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override; |
| 342 |
virtual String font_get_supported_chars(const RID &p_font_rid) const override; |
| 343 |
virtual PackedInt32Array font_get_supported_glyphs(const RID &p_font_rid) const override; |
| 344 |
GDVIRTUAL2RC_REQUIRED(bool, _font_has_char, RID, int64_t); |
| 345 |
GDVIRTUAL1RC_REQUIRED(String, _font_get_supported_chars, RID); |
| 346 |
GDVIRTUAL1RC_REQUIRED(PackedInt32Array, _font_get_supported_glyphs, RID); |
| 347 |
|
| 348 |
virtual void font_render_range(const RID &p_font, const Vector2i &p_size, int64_t p_start, int64_t p_end) override; |
| 349 |
virtual void font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) override; |
| 350 |
GDVIRTUAL4(_font_render_range, RID, const Vector2i &, int64_t, int64_t); |
| 351 |
GDVIRTUAL3(_font_render_glyph, RID, const Vector2i &, int64_t); |
| 352 |
|
| 353 |
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), float p_oversampling = 0.0) const override; |
| 354 |
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), float p_oversampling = 0.0) const override; |
| 355 |
GDVIRTUAL7C_REQUIRED(_font_draw_glyph, RID, RID, int64_t, const Vector2 &, int64_t, const Color &, float); |
| 356 |
GDVIRTUAL8C_REQUIRED(_font_draw_glyph_outline, RID, RID, int64_t, int64_t, const Vector2 &, int64_t, const Color &, float); |
| 357 |
#ifndef DISABLE_DEPRECATED |
| 358 |
GDVIRTUAL6C_COMPAT(_font_draw_glyph_bind_compat_104872, _font_draw_glyph, RID, RID, int64_t, const Vector2 &, int64_t, const Color &); |
| 359 |
GDVIRTUAL7C_COMPAT(_font_draw_glyph_outline_bind_compat_104872, _font_draw_glyph_outline, RID, RID, int64_t, int64_t, const Vector2 &, int64_t, const Color &); |
| 360 |
#endif |
| 361 |
|
| 362 |
virtual bool font_is_language_supported(const RID &p_font_rid, const String &p_language) const override; |
| 363 |
virtual void font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) override; |
| 364 |
virtual bool font_get_language_support_override(const RID &p_font_rid, const String &p_language) override; |
| 365 |
virtual void font_remove_language_support_override(const RID &p_font_rid, const String &p_language) override; |
| 366 |
virtual PackedStringArray font_get_language_support_overrides(const RID &p_font_rid) override; |
| 367 |
GDVIRTUAL2RC(bool, _font_is_language_supported, RID, const String &); |
| 368 |
GDVIRTUAL3(_font_set_language_support_override, RID, const String &, bool); |
| 369 |
GDVIRTUAL2R(bool, _font_get_language_support_override, RID, const String &); |
| 370 |
GDVIRTUAL2(_font_remove_language_support_override, RID, const String &); |
| 371 |
GDVIRTUAL1R(PackedStringArray, _font_get_language_support_overrides, RID); |
| 372 |
|
| 373 |
virtual bool font_is_script_supported(const RID &p_font_rid, const String &p_script) const override; |
| 374 |
virtual void font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) override; |
| 375 |
virtual bool font_get_script_support_override(const RID &p_font_rid, const String &p_script) override; |
| 376 |
virtual void font_remove_script_support_override(const RID &p_font_rid, const String &p_script) override; |
| 377 |
virtual PackedStringArray font_get_script_support_overrides(const RID &p_font_rid) override; |
| 378 |
GDVIRTUAL2RC(bool, _font_is_script_supported, RID, const String &); |
| 379 |
GDVIRTUAL3(_font_set_script_support_override, RID, const String &, bool); |
| 380 |
GDVIRTUAL2R(bool, _font_get_script_support_override, RID, const String &); |
| 381 |
GDVIRTUAL2(_font_remove_script_support_override, RID, const String &); |
| 382 |
GDVIRTUAL1R(PackedStringArray, _font_get_script_support_overrides, RID); |
| 383 |
|
| 384 |
virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) override; |
| 385 |
virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const override; |
| 386 |
GDVIRTUAL2(_font_set_opentype_feature_overrides, RID, const Dictionary &); |
| 387 |
GDVIRTUAL1RC(Dictionary, _font_get_opentype_feature_overrides, RID); |
| 388 |
|
| 389 |
virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const override; |
| 390 |
virtual Dictionary font_supported_variation_list(const RID &p_font_rid) const override; |
| 391 |
GDVIRTUAL1RC(Dictionary, _font_supported_feature_list, RID); |
| 392 |
GDVIRTUAL1RC(Dictionary, _font_supported_variation_list, RID); |
| 393 |
|
| 394 |
#ifndef DISABLE_DEPRECATED |
| 395 |
virtual double font_get_global_oversampling() const override; |
| 396 |
virtual void font_set_global_oversampling(double p_oversampling) override; |
| 397 |
GDVIRTUAL0RC(double, _font_get_global_oversampling); |
| 398 |
GDVIRTUAL1(_font_set_global_oversampling, double); |
| 399 |
#endif |
| 400 |
virtual void reference_oversampling_level(double p_oversampling) override; |
| 401 |
virtual void unreference_oversampling_level(double p_oversampling) override; |
| 402 |
GDVIRTUAL1(_reference_oversampling_level, double); |
| 403 |
GDVIRTUAL1(_unreference_oversampling_level, double); |
| 404 |
|
| 405 |
virtual Vector2 get_hex_code_box_size(int64_t p_size, int64_t p_index) const override; |
| 406 |
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; |
| 407 |
GDVIRTUAL2RC(Vector2, _get_hex_code_box_size, int64_t, int64_t); |
| 408 |
GDVIRTUAL5C(_draw_hex_code_box, RID, int64_t, const Vector2 &, int64_t, const Color &); |
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) override; |
| 413 |
GDVIRTUAL2R_REQUIRED(RID, _create_shaped_text, Direction, Orientation); |
| 414 |
|
| 415 |
virtual void shaped_text_clear(const RID &p_shaped) override; |
| 416 |
GDVIRTUAL1_REQUIRED(_shaped_text_clear, RID); |
| 417 |
|
| 418 |
virtual RID shaped_text_duplicate(const RID &p_shaped) override; |
| 419 |
GDVIRTUAL1R_REQUIRED(RID, _shaped_text_duplicate, RID); |
| 420 |
|
| 421 |
virtual void shaped_text_set_direction(const RID &p_shaped, Direction p_direction = DIRECTION_AUTO) override; |
| 422 |
virtual Direction shaped_text_get_direction(const RID &p_shaped) const override; |
| 423 |
virtual Direction shaped_text_get_inferred_direction(const RID &p_shaped) const override; |
| 424 |
GDVIRTUAL2(_shaped_text_set_direction, RID, Direction); |
| 425 |
GDVIRTUAL1RC(Direction, _shaped_text_get_direction, RID); |
| 426 |
GDVIRTUAL1RC(Direction, _shaped_text_get_inferred_direction, RID); |
| 427 |
|
| 428 |
virtual void shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) override; |
| 429 |
GDVIRTUAL2(_shaped_text_set_bidi_override, RID, const Array &); |
| 430 |
|
| 431 |
virtual void shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) override; |
| 432 |
virtual String shaped_text_get_custom_punctuation(const RID &p_shaped) const override; |
| 433 |
GDVIRTUAL2(_shaped_text_set_custom_punctuation, RID, String); |
| 434 |
GDVIRTUAL1RC(String, _shaped_text_get_custom_punctuation, RID); |
| 435 |
|
| 436 |
virtual void shaped_text_set_custom_ellipsis(const RID &p_shaped, int64_t p_char) override; |
| 437 |
virtual int64_t shaped_text_get_custom_ellipsis(const RID &p_shaped) const override; |
| 438 |
GDVIRTUAL2(_shaped_text_set_custom_ellipsis, RID, int64_t); |
| 439 |
GDVIRTUAL1RC(int64_t, _shaped_text_get_custom_ellipsis, RID); |
| 440 |
|
| 441 |
virtual void shaped_text_set_orientation(const RID &p_shaped, Orientation p_orientation = ORIENTATION_HORIZONTAL) override; |
| 442 |
virtual Orientation shaped_text_get_orientation(const RID &p_shaped) const override; |
| 443 |
GDVIRTUAL2(_shaped_text_set_orientation, RID, Orientation); |
| 444 |
GDVIRTUAL1RC(Orientation, _shaped_text_get_orientation, RID); |
| 445 |
|
| 446 |
virtual void shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) override; |
| 447 |
virtual bool shaped_text_get_preserve_invalid(const RID &p_shaped) const override; |
| 448 |
GDVIRTUAL2(_shaped_text_set_preserve_invalid, RID, bool); |
| 449 |
GDVIRTUAL1RC(bool, _shaped_text_get_preserve_invalid, RID); |
| 450 |
|
| 451 |
virtual void shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) override; |
| 452 |
virtual bool shaped_text_get_preserve_control(const RID &p_shaped) const override; |
| 453 |
GDVIRTUAL2(_shaped_text_set_preserve_control, RID, bool); |
| 454 |
GDVIRTUAL1RC(bool, _shaped_text_get_preserve_control, RID); |
| 455 |
|
| 456 |
virtual void shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) override; |
| 457 |
virtual int64_t shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const override; |
| 458 |
GDVIRTUAL3(_shaped_text_set_spacing, RID, SpacingType, int64_t); |
| 459 |
GDVIRTUAL2RC(int64_t, _shaped_text_get_spacing, RID, SpacingType); |
| 460 |
|
| 461 |
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; |
| 462 |
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; |
| 463 |
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; |
| 464 |
virtual bool shaped_text_has_object(const RID &p_shaped, const Variant &p_key) const override; |
| 465 |
GDVIRTUAL7R_REQUIRED(bool, _shaped_text_add_string, RID, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &); |
| 466 |
GDVIRTUAL6R_REQUIRED(bool, _shaped_text_add_object, RID, const Variant &, const Size2 &, InlineAlignment, int64_t, double); |
| 467 |
GDVIRTUAL5R_REQUIRED(bool, _shaped_text_resize_object, RID, const Variant &, const Size2 &, InlineAlignment, double); |
| 468 |
GDVIRTUAL2RC_REQUIRED(bool, _shaped_text_has_object, RID, const Variant &); |
| 469 |
|
| 470 |
virtual String shaped_get_text(const RID &p_shaped) const override; |
| 471 |
GDVIRTUAL1RC_REQUIRED(String, _shaped_get_text, RID); |
| 472 |
|
| 473 |
virtual int64_t shaped_get_span_count(const RID &p_shaped) const override; |
| 474 |
virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override; |
| 475 |
virtual Variant shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const override; |
| 476 |
virtual String shaped_get_span_text(const RID &p_shaped, int64_t p_index) const override; |
| 477 |
virtual Variant shaped_get_span_object(const RID &p_shaped, int64_t p_index) const override; |
| 478 |
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; |
| 479 |
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_get_span_count, RID); |
| 480 |
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_meta, RID, int64_t); |
| 481 |
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_embedded_object, RID, int64_t); |
| 482 |
GDVIRTUAL2RC_REQUIRED(String, _shaped_get_span_text, RID, int64_t); |
| 483 |
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_object, RID, int64_t); |
| 484 |
GDVIRTUAL5_REQUIRED(_shaped_set_span_update_font, RID, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &); |
| 485 |
|
| 486 |
virtual int64_t shaped_get_run_count(const RID &p_shaped) const override; |
| 487 |
virtual String shaped_get_run_text(const RID &p_shaped, int64_t p_index) const override; |
| 488 |
virtual Vector2i shaped_get_run_range(const RID &p_shaped, int64_t p_index) const override; |
| 489 |
virtual Vector2i shaped_get_run_glyph_range(const RID &p_shaped, int64_t p_index) const override; |
| 490 |
virtual RID shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const override; |
| 491 |
virtual int shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const override; |
| 492 |
virtual String shaped_get_run_language(const RID &p_shaped, int64_t p_index) const override; |
| 493 |
virtual Direction shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const override; |
| 494 |
virtual Variant shaped_get_run_object(const RID &p_shaped, int64_t p_index) const override; |
| 495 |
GDVIRTUAL1RC(int64_t, _shaped_get_run_count, RID); |
| 496 |
GDVIRTUAL2RC(String, _shaped_get_run_text, RID, int64_t); |
| 497 |
GDVIRTUAL2RC(Vector2i, _shaped_get_run_range, RID, int64_t); |
| 498 |
GDVIRTUAL2RC(Vector2i, _shaped_get_run_glyph_range, RID, int64_t); |
| 499 |
GDVIRTUAL2RC(RID, _shaped_get_run_font_rid, RID, int64_t); |
| 500 |
GDVIRTUAL2RC(int, _shaped_get_run_font_size, RID, int64_t); |
| 501 |
GDVIRTUAL2RC(String, _shaped_get_run_language, RID, int64_t); |
| 502 |
GDVIRTUAL2RC(Direction, _shaped_get_run_direction, RID, int64_t); |
| 503 |
GDVIRTUAL2RC(Variant, _shaped_get_run_object, RID, int64_t); |
| 504 |
|
| 505 |
virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override; |
| 506 |
virtual RID shaped_text_get_parent(const RID &p_shaped) const override; |
| 507 |
GDVIRTUAL3RC_REQUIRED(RID, _shaped_text_substr, RID, int64_t, int64_t); |
| 508 |
GDVIRTUAL1RC_REQUIRED(RID, _shaped_text_get_parent, RID); |
| 509 |
|
| 510 |
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; |
| 511 |
virtual double shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) override; |
| 512 |
GDVIRTUAL3R(double, _shaped_text_fit_to_width, RID, double, BitField<TextServer::JustificationFlag>); |
| 513 |
GDVIRTUAL2R(double, _shaped_text_tab_align, RID, const PackedFloat32Array &); |
| 514 |
|
| 515 |
virtual bool shaped_text_shape(const RID &p_shaped) override; |
| 516 |
virtual bool shaped_text_update_breaks(const RID &p_shaped) override; |
| 517 |
virtual bool shaped_text_update_justification_ops(const RID &p_shaped) override; |
| 518 |
GDVIRTUAL1R_REQUIRED(bool, _shaped_text_shape, RID); |
| 519 |
GDVIRTUAL1R(bool, _shaped_text_update_breaks, RID); |
| 520 |
GDVIRTUAL1R(bool, _shaped_text_update_justification_ops, RID); |
| 521 |
|
| 522 |
virtual bool shaped_text_is_ready(const RID &p_shaped) const override; |
| 523 |
GDVIRTUAL1RC_REQUIRED(bool, _shaped_text_is_ready, RID); |
| 524 |
|
| 525 |
virtual const Glyph *shaped_text_get_glyphs(const RID &p_shaped) const override; |
| 526 |
virtual const Glyph *shaped_text_sort_logical(const RID &p_shaped) override; |
| 527 |
virtual int64_t shaped_text_get_glyph_count(const RID &p_shaped) const override; |
| 528 |
GDVIRTUAL1RC_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_get_glyphs, RID); |
| 529 |
GDVIRTUAL1R_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_sort_logical, RID); |
| 530 |
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_glyph_count, RID); |
| 531 |
|
| 532 |
virtual Vector2i shaped_text_get_range(const RID &p_shaped) const override; |
| 533 |
GDVIRTUAL1RC_REQUIRED(Vector2i, _shaped_text_get_range, RID); |
| 534 |
|
| 535 |
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; |
| 536 |
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; |
| 537 |
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; |
| 538 |
GDVIRTUAL5RC(PackedInt32Array, _shaped_text_get_line_breaks_adv, RID, const PackedFloat32Array &, int64_t, bool, BitField<TextServer::LineBreakFlag>); |
| 539 |
GDVIRTUAL4RC(PackedInt32Array, _shaped_text_get_line_breaks, RID, double, int64_t, BitField<TextServer::LineBreakFlag>); |
| 540 |
GDVIRTUAL3RC(PackedInt32Array, _shaped_text_get_word_breaks, RID, BitField<TextServer::GraphemeFlag>, BitField<TextServer::GraphemeFlag>); |
| 541 |
|
| 542 |
virtual int64_t shaped_text_get_trim_pos(const RID &p_shaped) const override; |
| 543 |
virtual int64_t shaped_text_get_ellipsis_pos(const RID &p_shaped) const override; |
| 544 |
virtual const Glyph *shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const override; |
| 545 |
virtual int64_t shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const override; |
| 546 |
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_trim_pos, RID); |
| 547 |
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_ellipsis_pos, RID); |
| 548 |
GDVIRTUAL1RC_REQUIRED(GDExtensionConstPtr<const Glyph>, _shaped_text_get_ellipsis_glyphs, RID); |
| 549 |
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_text_get_ellipsis_glyph_count, RID); |
| 550 |
|
| 551 |
virtual void shaped_text_overrun_trim_to_width(const RID &p_shaped, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) override; |
| 552 |
GDVIRTUAL3(_shaped_text_overrun_trim_to_width, RID, double, BitField<TextServer::TextOverrunFlag>); |
| 553 |
|
| 554 |
virtual Array shaped_text_get_objects(const RID &p_shaped) const override; |
| 555 |
virtual Rect2 shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const override; |
| 556 |
virtual Vector2i shaped_text_get_object_range(const RID &p_shaped, const Variant &p_key) const override; |
| 557 |
virtual int64_t shaped_text_get_object_glyph(const RID &p_shaped, const Variant &p_key) const override; |
| 558 |
GDVIRTUAL1RC_REQUIRED(Array, _shaped_text_get_objects, RID); |
| 559 |
GDVIRTUAL2RC_REQUIRED(Rect2, _shaped_text_get_object_rect, RID, const Variant &); |
| 560 |
GDVIRTUAL2RC_REQUIRED(Vector2i, _shaped_text_get_object_range, RID, const Variant &); |
| 561 |
GDVIRTUAL2RC_REQUIRED(int64_t, _shaped_text_get_object_glyph, RID, const Variant &); |
| 562 |
|
| 563 |
virtual Size2 shaped_text_get_size(const RID &p_shaped) const override; |
| 564 |
virtual double shaped_text_get_ascent(const RID &p_shaped) const override; |
| 565 |
virtual double shaped_text_get_descent(const RID &p_shaped) const override; |
| 566 |
virtual double shaped_text_get_width(const RID &p_shaped) const override; |
| 567 |
virtual double shaped_text_get_underline_position(const RID &p_shaped) const override; |
| 568 |
virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override; |
| 569 |
GDVIRTUAL1RC_REQUIRED(Size2, _shaped_text_get_size, RID); |
| 570 |
GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_ascent, RID); |
| 571 |
GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_descent, RID); |
| 572 |
GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_width, RID); |
| 573 |
GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_underline_position, RID); |
| 574 |
GDVIRTUAL1RC_REQUIRED(double, _shaped_text_get_underline_thickness, RID); |
| 575 |
|
| 576 |
virtual Direction shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const override; |
| 577 |
GDVIRTUAL3RC(int64_t, _shaped_text_get_dominant_direction_in_range, RID, int64_t, int64_t); |
| 578 |
|
| 579 |
virtual CaretInfo shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const override; |
| 580 |
virtual Vector<Vector2> shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const override; |
| 581 |
GDVIRTUAL3C(_shaped_text_get_carets, RID, int64_t, GDExtensionPtr<CaretInfo>); |
| 582 |
GDVIRTUAL3RC(Vector<Vector2>, _shaped_text_get_selection, RID, int64_t, int64_t); |
| 583 |
|
| 584 |
virtual int64_t shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const override; |
| 585 |
virtual int64_t shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const override; |
| 586 |
GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_grapheme, RID, double); |
| 587 |
GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_position, RID, double); |
| 588 |
|
| 589 |
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), float p_oversampling = 0.0) const override; |
| 590 |
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), float p_oversampling = 0.0) const override; |
| 591 |
GDVIRTUAL7C(_shaped_text_draw, RID, RID, const Vector2 &, double, double, const Color &, float); |
| 592 |
GDVIRTUAL8C(_shaped_text_draw_outline, RID, RID, const Vector2 &, double, double, int64_t, const Color &, float); |
| 593 |
#ifndef DISABLE_DEPRECATED |
| 594 |
GDVIRTUAL6C_COMPAT(_shaped_text_draw_bind_compat_104872, _shaped_text_draw, RID, RID, const Vector2 &, double, double, const Color &); |
| 595 |
GDVIRTUAL7C_COMPAT(_shaped_text_draw_outline_bind_compat_104872, _shaped_text_draw_outline, RID, RID, const Vector2 &, double, double, int64_t, const Color &); |
| 596 |
#endif |
| 597 |
|
| 598 |
virtual Vector2 shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const override; |
| 599 |
virtual int64_t shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override; |
| 600 |
virtual int64_t shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override; |
| 601 |
GDVIRTUAL2RC(Vector2, _shaped_text_get_grapheme_bounds, RID, int64_t); |
| 602 |
GDVIRTUAL2RC(int64_t, _shaped_text_next_grapheme_pos, RID, int64_t); |
| 603 |
GDVIRTUAL2RC(int64_t, _shaped_text_prev_grapheme_pos, RID, int64_t); |
| 604 |
|
| 605 |
virtual PackedInt32Array shaped_text_get_character_breaks(const RID &p_shaped) const override; |
| 606 |
virtual int64_t shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const override; |
| 607 |
virtual int64_t shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const override; |
| 608 |
virtual int64_t shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const override; |
| 609 |
GDVIRTUAL1RC(PackedInt32Array, _shaped_text_get_character_breaks, RID); |
| 610 |
GDVIRTUAL2RC(int64_t, _shaped_text_next_character_pos, RID, int64_t); |
| 611 |
GDVIRTUAL2RC(int64_t, _shaped_text_prev_character_pos, RID, int64_t); |
| 612 |
GDVIRTUAL2RC(int64_t, _shaped_text_closest_character_pos, RID, int64_t); |
| 613 |
|
| 614 |
#ifndef DISABLE_DEPRECATED |
| 615 |
virtual String format_number(const String &p_string, const String &p_language = "") const override; |
| 616 |
virtual String parse_number(const String &p_string, const String &p_language = "") const override; |
| 617 |
virtual String percent_sign(const String &p_language = "") const override; |
| 618 |
GDVIRTUAL2RC(String, _format_number, const String &, const String &); |
| 619 |
GDVIRTUAL2RC(String, _parse_number, const String &, const String &); |
| 620 |
GDVIRTUAL1RC(String, _percent_sign, const String &); |
| 621 |
#endif |
| 622 |
|
| 623 |
virtual String strip_diacritics(const String &p_string) const override; |
| 624 |
GDVIRTUAL1RC(String, _strip_diacritics, const String &); |
| 625 |
|
| 626 |
virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "", int64_t p_chars_per_line = 0) const override; |
| 627 |
GDVIRTUAL3RC(PackedInt32Array, _string_get_word_breaks, const String &, const String &, int64_t); |
| 628 |
|
| 629 |
virtual PackedInt32Array string_get_character_breaks(const String &p_string, const String &p_language = "") const override; |
| 630 |
GDVIRTUAL2RC(PackedInt32Array, _string_get_character_breaks, const String &, const String &); |
| 631 |
|
| 632 |
virtual bool is_valid_identifier(const String &p_string) const override; |
| 633 |
GDVIRTUAL1RC(bool, _is_valid_identifier, const String &); |
| 634 |
virtual bool is_valid_letter(uint64_t p_unicode) const override; |
| 635 |
GDVIRTUAL1RC(bool, _is_valid_letter, uint64_t); |
| 636 |
|
| 637 |
virtual String string_to_upper(const String &p_string, const String &p_language = "") const override; |
| 638 |
virtual String string_to_lower(const String &p_string, const String &p_language = "") const override; |
| 639 |
virtual String string_to_title(const String &p_string, const String &p_language = "") const override; |
| 640 |
GDVIRTUAL2RC(String, _string_to_upper, const String &, const String &); |
| 641 |
GDVIRTUAL2RC(String, _string_to_lower, const String &, const String &); |
| 642 |
GDVIRTUAL2RC(String, _string_to_title, const String &, const String &); |
| 643 |
|
| 644 |
TypedArray<Vector3i> parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const; |
| 645 |
GDVIRTUAL3RC(TypedArray<Vector3i>, _parse_structured_text, StructuredTextParser, const Array &, const String &); |
| 646 |
|
| 647 |
virtual int64_t is_confusable(const String &p_string, const PackedStringArray &p_dict) const override; |
| 648 |
virtual bool spoof_check(const String &p_string) const override; |
| 649 |
GDVIRTUAL2RC(int64_t, _is_confusable, const String &, const PackedStringArray &); |
| 650 |
GDVIRTUAL1RC(bool, _spoof_check, const String &); |
| 651 |
|
| 652 |
virtual void cleanup() override; |
| 653 |
GDVIRTUAL0(_cleanup); |
| 654 |
|
| 655 |
TextServerExtension(); |
| 656 |
~TextServerExtension(); |
| 657 |
}; |