Debian Codegraph @

servers/text/text_server_extension.cpp

raw symbols SCIP
1 /**************************************************************************/
2 /* text_server_extension.cpp */
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
31 #include "text_server_extension.h"
32
33 void TextServerExtension::_bind_methods() {
34 GDVIRTUAL_BIND(_has_feature, "feature");
35 GDVIRTUAL_BIND(_get_name);
36 GDVIRTUAL_BIND(_get_features);
37
38 GDVIRTUAL_BIND(_free_rid, "rid");
39 GDVIRTUAL_BIND(_has, "rid");
40 GDVIRTUAL_BIND(_load_support_data, "filename");
41
42 GDVIRTUAL_BIND(_get_support_data_filename);
43 GDVIRTUAL_BIND(_get_support_data_info);
44 GDVIRTUAL_BIND(_save_support_data, "filename");
45 GDVIRTUAL_BIND(_get_support_data);
46 GDVIRTUAL_BIND(_is_locale_using_support_data, "locale");
47
48 GDVIRTUAL_BIND(_is_locale_right_to_left, "locale");
49
50 GDVIRTUAL_BIND(_name_to_tag, "name");
51 GDVIRTUAL_BIND(_tag_to_name, "tag");
52
53 /* Font interface */
54
55 GDVIRTUAL_BIND(_create_font);
56 GDVIRTUAL_BIND(_create_font_linked_variation, "font_rid");
57
58 GDVIRTUAL_BIND(_font_set_data, "font_rid", "data");
59 GDVIRTUAL_BIND(_font_set_data_ptr, "font_rid", "data_ptr", "data_size");
60
61 GDVIRTUAL_BIND(_font_set_face_index, "font_rid", "face_index");
62 GDVIRTUAL_BIND(_font_get_face_index, "font_rid");
63
64 GDVIRTUAL_BIND(_font_get_face_count, "font_rid");
65
66 GDVIRTUAL_BIND(_font_set_style, "font_rid", "style");
67 GDVIRTUAL_BIND(_font_get_style, "font_rid");
68
69 GDVIRTUAL_BIND(_font_set_name, "font_rid", "name");
70 GDVIRTUAL_BIND(_font_get_name, "font_rid");
71 GDVIRTUAL_BIND(_font_get_ot_name_strings, "font_rid");
72
73 GDVIRTUAL_BIND(_font_set_style_name, "font_rid", "name_style");
74 GDVIRTUAL_BIND(_font_get_style_name, "font_rid");
75
76 GDVIRTUAL_BIND(_font_set_weight, "font_rid", "weight");
77 GDVIRTUAL_BIND(_font_get_weight, "font_rid");
78
79 GDVIRTUAL_BIND(_font_set_stretch, "font_rid", "stretch");
80 GDVIRTUAL_BIND(_font_get_stretch, "font_rid");
81
82 GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");
83 GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");
84
85 GDVIRTUAL_BIND(_font_set_disable_embedded_bitmaps, "font_rid", "disable_embedded_bitmaps");
86 GDVIRTUAL_BIND(_font_get_disable_embedded_bitmaps, "font_rid");
87
88 GDVIRTUAL_BIND(_font_set_generate_mipmaps, "font_rid", "generate_mipmaps");
89 GDVIRTUAL_BIND(_font_get_generate_mipmaps, "font_rid");
90
91 GDVIRTUAL_BIND(_font_set_multichannel_signed_distance_field, "font_rid", "msdf");
92 GDVIRTUAL_BIND(_font_is_multichannel_signed_distance_field, "font_rid");
93
94 GDVIRTUAL_BIND(_font_set_msdf_pixel_range, "font_rid", "msdf_pixel_range");
95 GDVIRTUAL_BIND(_font_get_msdf_pixel_range, "font_rid");
96
97 GDVIRTUAL_BIND(_font_set_msdf_size, "font_rid", "msdf_size");
98 GDVIRTUAL_BIND(_font_get_msdf_size, "font_rid");
99
100 GDVIRTUAL_BIND(_font_set_fixed_size, "font_rid", "fixed_size");
101 GDVIRTUAL_BIND(_font_get_fixed_size, "font_rid");
102
103 GDVIRTUAL_BIND(_font_set_fixed_size_scale_mode, "font_rid", "fixed_size_scale_mode");
104 GDVIRTUAL_BIND(_font_get_fixed_size_scale_mode, "font_rid");
105
106 GDVIRTUAL_BIND(_font_set_allow_system_fallback, "font_rid", "allow_system_fallback");
107 GDVIRTUAL_BIND(_font_is_allow_system_fallback, "font_rid");
108 GDVIRTUAL_BIND(_font_clear_system_fallback_cache);
109
110 GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");
111 GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");
112
113 GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");
114 GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");
115
116 GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");
117 GDVIRTUAL_BIND(_font_get_hinting, "font_rid");
118
119 GDVIRTUAL_BIND(_font_set_subpixel_positioning, "font_rid", "subpixel_positioning");
120 GDVIRTUAL_BIND(_font_get_subpixel_positioning, "font_rid");
121
122 GDVIRTUAL_BIND(_font_set_keep_rounding_remainders, "font_rid", "keep_rounding_remainders");
123 GDVIRTUAL_BIND(_font_get_keep_rounding_remainders, "font_rid");
124
125 GDVIRTUAL_BIND(_font_set_embolden, "font_rid", "strength");
126 GDVIRTUAL_BIND(_font_get_embolden, "font_rid");
127
128 GDVIRTUAL_BIND(_font_set_spacing, "font_rid", "spacing", "value");
129 GDVIRTUAL_BIND(_font_get_spacing, "font_rid", "spacing");
130
131 GDVIRTUAL_BIND(_font_set_baseline_offset, "font_rid", "baseline_offset");
132 GDVIRTUAL_BIND(_font_get_baseline_offset, "font_rid");
133
134 GDVIRTUAL_BIND(_font_set_transform, "font_rid", "transform");
135 GDVIRTUAL_BIND(_font_get_transform, "font_rid");
136
137 GDVIRTUAL_BIND(_font_set_variation_coordinates, "font_rid", "variation_coordinates");
138 GDVIRTUAL_BIND(_font_get_variation_coordinates, "font_rid");
139
140 #ifndef DISABLE_DEPRECATED
141 GDVIRTUAL_BIND(_font_set_oversampling, "font_rid", "oversampling");
142 GDVIRTUAL_BIND(_font_get_oversampling, "font_rid");
143 #endif
144
145 GDVIRTUAL_BIND(_font_get_size_cache_list, "font_rid");
146 GDVIRTUAL_BIND(_font_clear_size_cache, "font_rid");
147 GDVIRTUAL_BIND(_font_remove_size_cache, "font_rid", "size");
148 GDVIRTUAL_BIND(_font_get_size_cache_info, "font_rid");
149
150 GDVIRTUAL_BIND(_font_set_ascent, "font_rid", "size", "ascent");
151 GDVIRTUAL_BIND(_font_get_ascent, "font_rid", "size");
152
153 GDVIRTUAL_BIND(_font_set_descent, "font_rid", "size", "descent");
154 GDVIRTUAL_BIND(_font_get_descent, "font_rid", "size");
155
156 GDVIRTUAL_BIND(_font_set_underline_position, "font_rid", "size", "underline_position");
157 GDVIRTUAL_BIND(_font_get_underline_position, "font_rid", "size");
158
159 GDVIRTUAL_BIND(_font_set_underline_thickness, "font_rid", "size", "underline_thickness");
160 GDVIRTUAL_BIND(_font_get_underline_thickness, "font_rid", "size");
161
162 GDVIRTUAL_BIND(_font_set_scale, "font_rid", "size", "scale");
163 GDVIRTUAL_BIND(_font_get_scale, "font_rid", "size");
164
165 GDVIRTUAL_BIND(_font_get_texture_count, "font_rid", "size");
166 GDVIRTUAL_BIND(_font_clear_textures, "font_rid", "size");
167 GDVIRTUAL_BIND(_font_remove_texture, "font_rid", "size", "texture_index");
168
169 GDVIRTUAL_BIND(_font_set_texture_image, "font_rid", "size", "texture_index", "image");
170 GDVIRTUAL_BIND(_font_get_texture_image, "font_rid", "size", "texture_index");
171
172 GDVIRTUAL_BIND(_font_set_texture_offsets, "font_rid", "size", "texture_index", "offset");
173 GDVIRTUAL_BIND(_font_get_texture_offsets, "font_rid", "size", "texture_index");
174
175 GDVIRTUAL_BIND(_font_get_glyph_list, "font_rid", "size");
176 GDVIRTUAL_BIND(_font_clear_glyphs, "font_rid", "size");
177 GDVIRTUAL_BIND(_font_remove_glyph, "font_rid", "size", "glyph");
178
179 GDVIRTUAL_BIND(_font_get_glyph_advance, "font_rid", "size", "glyph");
180 GDVIRTUAL_BIND(_font_set_glyph_advance, "font_rid", "size", "glyph", "advance");
181
182 GDVIRTUAL_BIND(_font_get_glyph_offset, "font_rid", "size", "glyph");
183 GDVIRTUAL_BIND(_font_set_glyph_offset, "font_rid", "size", "glyph", "offset");
184
185 GDVIRTUAL_BIND(_font_get_glyph_size, "font_rid", "size", "glyph");
186 GDVIRTUAL_BIND(_font_set_glyph_size, "font_rid", "size", "glyph", "gl_size");
187
188 GDVIRTUAL_BIND(_font_get_glyph_uv_rect, "font_rid", "size", "glyph");
189 GDVIRTUAL_BIND(_font_set_glyph_uv_rect, "font_rid", "size", "glyph", "uv_rect");
190
191 GDVIRTUAL_BIND(_font_get_glyph_texture_idx, "font_rid", "size", "glyph");
192 GDVIRTUAL_BIND(_font_set_glyph_texture_idx, "font_rid", "size", "glyph", "texture_idx");
193
194 GDVIRTUAL_BIND(_font_get_glyph_texture_rid, "font_rid", "size", "glyph");
195 GDVIRTUAL_BIND(_font_get_glyph_texture_size, "font_rid", "size", "glyph");
196
197 GDVIRTUAL_BIND(_font_get_glyph_contours, "font_rid", "size", "index");
198
199 GDVIRTUAL_BIND(_font_get_kerning_list, "font_rid", "size");
200 GDVIRTUAL_BIND(_font_clear_kerning_map, "font_rid", "size");
201 GDVIRTUAL_BIND(_font_remove_kerning, "font_rid", "size", "glyph_pair");
202
203 GDVIRTUAL_BIND(_font_set_kerning, "font_rid", "size", "glyph_pair", "kerning");
204 GDVIRTUAL_BIND(_font_get_kerning, "font_rid", "size", "glyph_pair");
205
206 GDVIRTUAL_BIND(_font_get_glyph_index, "font_rid", "size", "char", "variation_selector");
207 GDVIRTUAL_BIND(_font_get_char_from_glyph_index, "font_rid", "size", "glyph_index");
208
209 GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");
210 GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");
211 GDVIRTUAL_BIND(_font_get_supported_glyphs, "font_rid");
212
213 GDVIRTUAL_BIND(_font_render_range, "font_rid", "size", "start", "end");
214 GDVIRTUAL_BIND(_font_render_glyph, "font_rid", "size", "index");
215
216 GDVIRTUAL_BIND(_font_draw_glyph, "font_rid", "canvas", "size", "pos", "index", "color", "oversampling");
217 GDVIRTUAL_BIND(_font_draw_glyph_outline, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color", "oversampling");
218 #ifndef DISABLE_DEPRECATED
219 GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_bind_compat_104872, "font_rid", "canvas", "size", "pos", "index", "color");
220 GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_outline_bind_compat_104872, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color");
221 #endif
222
223 GDVIRTUAL_BIND(_font_is_language_supported, "font_rid", "language");
224 GDVIRTUAL_BIND(_font_set_language_support_override, "font_rid", "language", "supported");
225 GDVIRTUAL_BIND(_font_get_language_support_override, "font_rid", "language");
226 GDVIRTUAL_BIND(_font_remove_language_support_override, "font_rid", "language");
227 GDVIRTUAL_BIND(_font_get_language_support_overrides, "font_rid");
228
229 GDVIRTUAL_BIND(_font_is_script_supported, "font_rid", "script");
230 GDVIRTUAL_BIND(_font_set_script_support_override, "font_rid", "script", "supported");
231 GDVIRTUAL_BIND(_font_get_script_support_override, "font_rid", "script");
232 GDVIRTUAL_BIND(_font_remove_script_support_override, "font_rid", "script");
233 GDVIRTUAL_BIND(_font_get_script_support_overrides, "font_rid");
234
235 GDVIRTUAL_BIND(_font_set_opentype_feature_overrides, "font_rid", "overrides");
236 GDVIRTUAL_BIND(_font_get_opentype_feature_overrides, "font_rid");
237
238 GDVIRTUAL_BIND(_font_supported_feature_list, "font_rid");
239 GDVIRTUAL_BIND(_font_supported_variation_list, "font_rid");
240
241 #ifndef DISABLE_DEPRECATED
242 GDVIRTUAL_BIND(_font_get_global_oversampling);
243 GDVIRTUAL_BIND(_font_set_global_oversampling, "oversampling");
244 #endif
245 GDVIRTUAL_BIND(_reference_oversampling_level, "oversampling");
246 GDVIRTUAL_BIND(_unreference_oversampling_level, "oversampling");
247
248 GDVIRTUAL_BIND(_get_hex_code_box_size, "size", "index");
249 GDVIRTUAL_BIND(_draw_hex_code_box, "canvas", "size", "pos", "index", "color");
250
251 /* Shaped text buffer interface */
252
253 GDVIRTUAL_BIND(_create_shaped_text, "direction", "orientation");
254
255 GDVIRTUAL_BIND(_shaped_text_clear, "shaped");
256 GDVIRTUAL_BIND(_shaped_text_duplicate, "shaped");
257
258 GDVIRTUAL_BIND(_shaped_text_set_direction, "shaped", "direction");
259 GDVIRTUAL_BIND(_shaped_text_get_direction, "shaped");
260 GDVIRTUAL_BIND(_shaped_text_get_inferred_direction, "shaped");
261
262 GDVIRTUAL_BIND(_shaped_text_set_bidi_override, "shaped", "override");
263
264 GDVIRTUAL_BIND(_shaped_text_set_custom_punctuation, "shaped", "punct");
265 GDVIRTUAL_BIND(_shaped_text_get_custom_punctuation, "shaped");
266
267 GDVIRTUAL_BIND(_shaped_text_set_custom_ellipsis, "shaped", "char");
268 GDVIRTUAL_BIND(_shaped_text_get_custom_ellipsis, "shaped");
269
270 GDVIRTUAL_BIND(_shaped_text_set_orientation, "shaped", "orientation");
271 GDVIRTUAL_BIND(_shaped_text_get_orientation, "shaped");
272
273 GDVIRTUAL_BIND(_shaped_text_set_preserve_invalid, "shaped", "enabled");
274 GDVIRTUAL_BIND(_shaped_text_get_preserve_invalid, "shaped");
275
276 GDVIRTUAL_BIND(_shaped_text_set_preserve_control, "shaped", "enabled");
277 GDVIRTUAL_BIND(_shaped_text_get_preserve_control, "shaped");
278
279 GDVIRTUAL_BIND(_shaped_text_set_spacing, "shaped", "spacing", "value");
280 GDVIRTUAL_BIND(_shaped_text_get_spacing, "shaped", "spacing");
281
282 GDVIRTUAL_BIND(_shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");
283 GDVIRTUAL_BIND(_shaped_text_add_object, "shaped", "key", "size", "inline_align", "length", "baseline");
284 GDVIRTUAL_BIND(_shaped_text_resize_object, "shaped", "key", "size", "inline_align", "baseline");
285 GDVIRTUAL_BIND(_shaped_text_has_object, "shaped", "key");
286 GDVIRTUAL_BIND(_shaped_get_text, "shaped");
287
288 GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");
289 GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");
290 GDVIRTUAL_BIND(_shaped_get_span_embedded_object, "shaped", "index");
291 GDVIRTUAL_BIND(_shaped_get_span_text, "shaped", "index");
292 GDVIRTUAL_BIND(_shaped_get_span_object, "shaped", "index");
293 GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");
294
295 GDVIRTUAL_BIND(_shaped_get_run_count, "shaped");
296 GDVIRTUAL_BIND(_shaped_get_run_text, "shaped", "index");
297 GDVIRTUAL_BIND(_shaped_get_run_range, "shaped", "index");
298 GDVIRTUAL_BIND(_shaped_get_run_glyph_range, "shaped", "index");
299 GDVIRTUAL_BIND(_shaped_get_run_font_rid, "shaped", "index");
300 GDVIRTUAL_BIND(_shaped_get_run_font_size, "shaped", "index");
301 GDVIRTUAL_BIND(_shaped_get_run_language, "shaped", "index");
302 GDVIRTUAL_BIND(_shaped_get_run_direction, "shaped", "index");
303 GDVIRTUAL_BIND(_shaped_get_run_object, "shaped", "index");
304
305 GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");
306 GDVIRTUAL_BIND(_shaped_text_get_parent, "shaped");
307
308 GDVIRTUAL_BIND(_shaped_text_fit_to_width, "shaped", "width", "justification_flags");
309 GDVIRTUAL_BIND(_shaped_text_tab_align, "shaped", "tab_stops");
310
311 GDVIRTUAL_BIND(_shaped_text_shape, "shaped");
312 GDVIRTUAL_BIND(_shaped_text_update_breaks, "shaped");
313 GDVIRTUAL_BIND(_shaped_text_update_justification_ops, "shaped");
314
315 GDVIRTUAL_BIND(_shaped_text_is_ready, "shaped");
316
317 GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped");
318 GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped");
319 GDVIRTUAL_BIND(_shaped_text_get_glyph_count, "shaped");
320
321 GDVIRTUAL_BIND(_shaped_text_get_range, "shaped");
322
323 GDVIRTUAL_BIND(_shaped_text_get_line_breaks_adv, "shaped", "width", "start", "once", "break_flags");
324 GDVIRTUAL_BIND(_shaped_text_get_line_breaks, "shaped", "width", "start", "break_flags");
325 GDVIRTUAL_BIND(_shaped_text_get_word_breaks, "shaped", "grapheme_flags", "skip_grapheme_flags");
326
327 GDVIRTUAL_BIND(_shaped_text_get_trim_pos, "shaped");
328 GDVIRTUAL_BIND(_shaped_text_get_ellipsis_pos, "shaped");
329 GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyph_count, "shaped");
330 GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped");
331
332 GDVIRTUAL_BIND(_shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");
333
334 GDVIRTUAL_BIND(_shaped_text_get_objects, "shaped");
335 GDVIRTUAL_BIND(_shaped_text_get_object_rect, "shaped", "key");
336 GDVIRTUAL_BIND(_shaped_text_get_object_range, "shaped", "key");
337 GDVIRTUAL_BIND(_shaped_text_get_object_glyph, "shaped", "key");
338
339 GDVIRTUAL_BIND(_shaped_text_get_size, "shaped");
340 GDVIRTUAL_BIND(_shaped_text_get_ascent, "shaped");
341 GDVIRTUAL_BIND(_shaped_text_get_descent, "shaped");
342 GDVIRTUAL_BIND(_shaped_text_get_width, "shaped");
343 GDVIRTUAL_BIND(_shaped_text_get_underline_position, "shaped");
344 GDVIRTUAL_BIND(_shaped_text_get_underline_thickness, "shaped");
345
346 GDVIRTUAL_BIND(_shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");
347
348 GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "caret");
349 GDVIRTUAL_BIND(_shaped_text_get_selection, "shaped", "start", "end");
350
351 GDVIRTUAL_BIND(_shaped_text_hit_test_grapheme, "shaped", "coord");
352 GDVIRTUAL_BIND(_shaped_text_hit_test_position, "shaped", "coord");
353
354 GDVIRTUAL_BIND(_shaped_text_draw, "shaped", "canvas", "pos", "clip_l", "clip_r", "color", "oversampling");
355 GDVIRTUAL_BIND(_shaped_text_draw_outline, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color", "oversampling");
356 #ifndef DISABLE_DEPRECATED
357 GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "color");
358 GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_outline_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color");
359 #endif
360
361 GDVIRTUAL_BIND(_shaped_text_get_grapheme_bounds, "shaped", "pos");
362 GDVIRTUAL_BIND(_shaped_text_next_grapheme_pos, "shaped", "pos");
363 GDVIRTUAL_BIND(_shaped_text_prev_grapheme_pos, "shaped", "pos");
364
365 GDVIRTUAL_BIND(_shaped_text_get_character_breaks, "shaped");
366 GDVIRTUAL_BIND(_shaped_text_next_character_pos, "shaped", "pos");
367 GDVIRTUAL_BIND(_shaped_text_prev_character_pos, "shaped", "pos");
368 GDVIRTUAL_BIND(_shaped_text_closest_character_pos, "shaped", "pos");
369
370 #ifndef DISABLE_DEPRECATED
371 GDVIRTUAL_BIND(_format_number, "number", "language");
372 GDVIRTUAL_BIND(_parse_number, "number", "language");
373 GDVIRTUAL_BIND(_percent_sign, "language");
374 #endif
375
376 GDVIRTUAL_BIND(_strip_diacritics, "string");
377 GDVIRTUAL_BIND(_is_valid_identifier, "string");
378 GDVIRTUAL_BIND(_is_valid_letter, "unicode");
379
380 GDVIRTUAL_BIND(_string_get_word_breaks, "string", "language", "chars_per_line");
381 GDVIRTUAL_BIND(_string_get_character_breaks, "string", "language");
382
383 GDVIRTUAL_BIND(_is_confusable, "string", "dict");
384 GDVIRTUAL_BIND(_spoof_check, "string");
385
386 GDVIRTUAL_BIND(_string_to_upper, "string", "language");
387 GDVIRTUAL_BIND(_string_to_lower, "string", "language");
388 GDVIRTUAL_BIND(_string_to_title, "string", "language");
389
390 GDVIRTUAL_BIND(_parse_structured_text, "parser_type", "args", "text");
391
392 GDVIRTUAL_BIND(_cleanup);
393 }
394
395 bool TextServerExtension::has_feature(Feature p_feature) const {
396 bool ret = false;
397 GDVIRTUAL_CALL(_has_feature, p_feature, ret);
398 return ret;
399 }
400
401 String TextServerExtension::get_name() const {
402 String ret = "Unknown";
403 GDVIRTUAL_CALL(_get_name, ret);
404 return ret;
405 }
406
407 int64_t TextServerExtension::get_features() const {
408 int64_t ret = 0;
409 GDVIRTUAL_CALL(_get_features, ret);
410 return ret;
411 }
412
413 void TextServerExtension::free_rid(const RID &p_rid) {
414 GDVIRTUAL_CALL(_free_rid, p_rid);
415 }
416
417 bool TextServerExtension::has(const RID &p_rid) {
418 bool ret = false;
419 GDVIRTUAL_CALL(_has, p_rid, ret);
420 return ret;
421 }
422
423 bool TextServerExtension::load_support_data(const String &p_filename) {
424 bool ret = false;
425 GDVIRTUAL_CALL(_load_support_data, p_filename, ret);
426 return ret;
427 }
428
429 String TextServerExtension::get_support_data_filename() const {
430 String ret;
431 GDVIRTUAL_CALL(_get_support_data_filename, ret);
432 return ret;
433 }
434
435 String TextServerExtension::get_support_data_info() const {
436 String ret;
437 GDVIRTUAL_CALL(_get_support_data_info, ret);
438 return ret;
439 }
440
441 bool TextServerExtension::save_support_data(const String &p_filename) const {
442 bool ret = false;
443 GDVIRTUAL_CALL(_save_support_data, p_filename, ret);
444 return ret;
445 }
446
447 PackedByteArray TextServerExtension::get_support_data() const {
448 PackedByteArray ret;
449 GDVIRTUAL_CALL(_get_support_data, ret);
450 return ret;
451 }
452
453 bool TextServerExtension::is_locale_using_support_data(const String &p_locale) const {
454 bool ret = false;
455 GDVIRTUAL_CALL(_is_locale_using_support_data, p_locale, ret);
456 return ret;
457 }
458
459 bool TextServerExtension::is_locale_right_to_left(const String &p_locale) const {
460 bool ret = false;
461 GDVIRTUAL_CALL(_is_locale_right_to_left, p_locale, ret);
462 return ret;
463 }
464
465 int64_t TextServerExtension::name_to_tag(const String &p_name) const {
466 int64_t ret = 0;
467 if (GDVIRTUAL_CALL(_name_to_tag, p_name, ret)) {
468 return ret;
469 }
470 return TextServer::name_to_tag(p_name);
471 }
472
473 String TextServerExtension::tag_to_name(int64_t p_tag) const {
474 String ret;
475 if (GDVIRTUAL_CALL(_tag_to_name, p_tag, ret)) {
476 return ret;
477 }
478 return TextServer::tag_to_name(p_tag);
479 }
480
481 /*************************************************************************/
482 /* Font */
483 /*************************************************************************/
484
485 RID TextServerExtension::create_font() {
486 RID ret;
487 GDVIRTUAL_CALL(_create_font, ret);
488 return ret;
489 }
490
491 RID TextServerExtension::create_font_linked_variation(const RID &p_font_rid) {
492 RID ret;
493 GDVIRTUAL_CALL(_create_font_linked_variation, p_font_rid, ret);
494 return ret;
495 }
496
497 void TextServerExtension::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
498 GDVIRTUAL_CALL(_font_set_data, p_font_rid, p_data);
499 }
500
501 void TextServerExtension::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
502 GDVIRTUAL_CALL(_font_set_data_ptr, p_font_rid, p_data_ptr, p_data_size);
503 }
504
505 void TextServerExtension::font_set_face_index(const RID &p_font_rid, int64_t p_index) {
506 GDVIRTUAL_CALL(_font_set_face_index, p_font_rid, p_index);
507 }
508
509 int64_t TextServerExtension::font_get_face_index(const RID &p_font_rid) const {
510 int64_t ret = 0;
511 GDVIRTUAL_CALL(_font_get_face_index, p_font_rid, ret);
512 return ret;
513 }
514
515 int64_t TextServerExtension::font_get_face_count(const RID &p_font_rid) const {
516 int64_t ret = 1;
517 GDVIRTUAL_CALL(_font_get_face_count, p_font_rid, ret);
518 return ret;
519 }
520
521 void TextServerExtension::font_set_style(const RID &p_font_rid, BitField<TextServer::FontStyle> p_style) {
522 GDVIRTUAL_CALL(_font_set_style, p_font_rid, p_style);
523 }
524
525 BitField<TextServer::FontStyle> TextServerExtension::font_get_style(const RID &p_font_rid) const {
526 BitField<TextServer::FontStyle> ret = 0;
527 GDVIRTUAL_CALL(_font_get_style, p_font_rid, ret);
528 return ret;
529 }
530
531 void TextServerExtension::font_set_style_name(const RID &p_font_rid, const String &p_name) {
532 GDVIRTUAL_CALL(_font_set_style_name, p_font_rid, p_name);
533 }
534
535 String TextServerExtension::font_get_style_name(const RID &p_font_rid) const {
536 String ret;
537 GDVIRTUAL_CALL(_font_get_style_name, p_font_rid, ret);
538 return ret;
539 }
540
541 void TextServerExtension::font_set_weight(const RID &p_font_rid, int64_t p_weight) {
542 GDVIRTUAL_CALL(_font_set_weight, p_font_rid, p_weight);
543 }
544
545 int64_t TextServerExtension::font_get_weight(const RID &p_font_rid) const {
546 int64_t ret = 400;
547 GDVIRTUAL_CALL(_font_get_weight, p_font_rid, ret);
548 return ret;
549 }
550
551 void TextServerExtension::font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {
552 GDVIRTUAL_CALL(_font_set_stretch, p_font_rid, p_stretch);
553 }
554
555 int64_t TextServerExtension::font_get_stretch(const RID &p_font_rid) const {
556 int64_t ret = 100;
557 GDVIRTUAL_CALL(_font_get_stretch, p_font_rid, ret);
558 return ret;
559 }
560
561 void TextServerExtension::font_set_name(const RID &p_font_rid, const String &p_name) {
562 GDVIRTUAL_CALL(_font_set_name, p_font_rid, p_name);
563 }
564
565 String TextServerExtension::font_get_name(const RID &p_font_rid) const {
566 String ret;
567 GDVIRTUAL_CALL(_font_get_name, p_font_rid, ret);
568 return ret;
569 }
570
571 Dictionary TextServerExtension::font_get_ot_name_strings(const RID &p_font_rid) const {
572 Dictionary ret;
573 GDVIRTUAL_CALL(_font_get_ot_name_strings, p_font_rid, ret);
574 return ret;
575 }
576
577 void TextServerExtension::font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
578 GDVIRTUAL_CALL(_font_set_antialiasing, p_font_rid, p_antialiasing);
579 }
580
581 TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(const RID &p_font_rid) const {
582 TextServer::FontAntialiasing ret = TextServer::FONT_ANTIALIASING_NONE;
583 GDVIRTUAL_CALL(_font_get_antialiasing, p_font_rid, ret);
584 return ret;
585 }
586
587 void TextServerExtension::font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) {
588 GDVIRTUAL_CALL(_font_set_disable_embedded_bitmaps, p_font_rid, p_disable_embedded_bitmaps);
589 }
590
591 bool TextServerExtension::font_get_disable_embedded_bitmaps(const RID &p_font_rid) const {
592 bool ret = false;
593 GDVIRTUAL_CALL(_font_get_disable_embedded_bitmaps, p_font_rid, ret);
594 return ret;
595 }
596
597 void TextServerExtension::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
598 GDVIRTUAL_CALL(_font_set_generate_mipmaps, p_font_rid, p_generate_mipmaps);
599 }
600
601 bool TextServerExtension::font_get_generate_mipmaps(const RID &p_font_rid) const {
602 bool ret = false;
603 GDVIRTUAL_CALL(_font_get_generate_mipmaps, p_font_rid, ret);
604 return ret;
605 }
606
607 void TextServerExtension::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
608 GDVIRTUAL_CALL(_font_set_multichannel_signed_distance_field, p_font_rid, p_msdf);
609 }
610
611 bool TextServerExtension::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
612 bool ret = false;
613 GDVIRTUAL_CALL(_font_is_multichannel_signed_distance_field, p_font_rid, ret);
614 return ret;
615 }
616
617 void TextServerExtension::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
618 GDVIRTUAL_CALL(_font_set_msdf_pixel_range, p_font_rid, p_msdf_pixel_range);
619 }
620
621 int64_t TextServerExtension::font_get_msdf_pixel_range(const RID &p_font_rid) const {
622 int64_t ret = 0;
623 GDVIRTUAL_CALL(_font_get_msdf_pixel_range, p_font_rid, ret);
624 return ret;
625 }
626
627 void TextServerExtension::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
628 GDVIRTUAL_CALL(_font_set_msdf_size, p_font_rid, p_msdf_size);
629 }
630
631 int64_t TextServerExtension::font_get_msdf_size(const RID &p_font_rid) const {
632 int64_t ret = 0;
633 GDVIRTUAL_CALL(_font_get_msdf_size, p_font_rid, ret);
634 return ret;
635 }
636
637 void TextServerExtension::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
638 GDVIRTUAL_CALL(_font_set_fixed_size, p_font_rid, p_fixed_size);
639 }
640
641 int64_t TextServerExtension::font_get_fixed_size(const RID &p_font_rid) const {
642 int64_t ret = 0;
643 GDVIRTUAL_CALL(_font_get_fixed_size, p_font_rid, ret);
644 return ret;
645 }
646
647 void TextServerExtension::font_set_fixed_size_scale_mode(const RID &p_font_rid, TextServer::FixedSizeScaleMode p_fixed_size_scale_mode) {
648 GDVIRTUAL_CALL(_font_set_fixed_size_scale_mode, p_font_rid, p_fixed_size_scale_mode);
649 }
650
651 TextServer::FixedSizeScaleMode TextServerExtension::font_get_fixed_size_scale_mode(const RID &p_font_rid) const {
652 FixedSizeScaleMode ret = FIXED_SIZE_SCALE_DISABLE;
653 GDVIRTUAL_CALL(_font_get_fixed_size_scale_mode, p_font_rid, ret);
654 return ret;
655 }
656
657 void TextServerExtension::font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {
658 GDVIRTUAL_CALL(_font_set_allow_system_fallback, p_font_rid, p_allow_system_fallback);
659 }
660
661 bool TextServerExtension::font_is_allow_system_fallback(const RID &p_font_rid) const {
662 bool ret = false;
663 GDVIRTUAL_CALL(_font_is_allow_system_fallback, p_font_rid, ret);
664 return ret;
665 }
666
667 void TextServerExtension::font_clear_system_fallback_cache() {
668 GDVIRTUAL_CALL(_font_clear_system_fallback_cache);
669 }
670
671 void TextServerExtension::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
672 GDVIRTUAL_CALL(_font_set_force_autohinter, p_font_rid, p_force_autohinter);
673 }
674
675 bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const {
676 bool ret = false;
677 GDVIRTUAL_CALL(_font_is_force_autohinter, p_font_rid, ret);
678 return ret;
679 }
680
681 void TextServerExtension::font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) {
682 GDVIRTUAL_CALL(_font_set_modulate_color_glyphs, p_font_rid, p_modulate);
683 }
684
685 bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) const {
686 bool ret = false;
687 GDVIRTUAL_CALL(_font_is_modulate_color_glyphs, p_font_rid, ret);
688 return ret;
689 }
690
691 void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
692 GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);
693 }
694
695 TextServer::Hinting TextServerExtension::font_get_hinting(const RID &p_font_rid) const {
696 TextServer::Hinting ret = TextServer::HINTING_NONE;
697 GDVIRTUAL_CALL(_font_get_hinting, p_font_rid, ret);
698 return ret;
699 }
700
701 void TextServerExtension::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
702 GDVIRTUAL_CALL(_font_set_subpixel_positioning, p_font_rid, p_subpixel);
703 }
704
705 TextServer::SubpixelPositioning TextServerExtension::font_get_subpixel_positioning(const RID &p_font_rid) const {
706 TextServer::SubpixelPositioning ret = TextServer::SUBPIXEL_POSITIONING_DISABLED;
707 GDVIRTUAL_CALL(_font_get_subpixel_positioning, p_font_rid, ret);
708 return ret;
709 }
710
711 void TextServerExtension::font_set_keep_rounding_remainders(const RID &p_font_rid, bool p_keep_rounding_remainders) {
712 GDVIRTUAL_CALL(_font_set_keep_rounding_remainders, p_font_rid, p_keep_rounding_remainders);
713 }
714
715 bool TextServerExtension::font_get_keep_rounding_remainders(const RID &p_font_rid) const {
716 bool ret = true;
717 GDVIRTUAL_CALL(_font_get_keep_rounding_remainders, p_font_rid, ret);
718 return ret;
719 }
720
721 void TextServerExtension::font_set_embolden(const RID &p_font_rid, double p_strength) {
722 GDVIRTUAL_CALL(_font_set_embolden, p_font_rid, p_strength);
723 }
724
725 double TextServerExtension::font_get_embolden(const RID &p_font_rid) const {
726 double ret = 0;
727 GDVIRTUAL_CALL(_font_get_embolden, p_font_rid, ret);
728 return ret;
729 }
730
731 void TextServerExtension::font_set_spacing(const RID &p_font_rid, SpacingType p_spacing, int64_t p_value) {
732 GDVIRTUAL_CALL(_font_set_spacing, p_font_rid, p_spacing, p_value);
733 }
734
735 int64_t TextServerExtension::font_get_spacing(const RID &p_font_rid, SpacingType p_spacing) const {
736 int64_t ret = 0;
737 GDVIRTUAL_CALL(_font_get_spacing, p_font_rid, p_spacing, ret);
738 return ret;
739 }
740
741 void TextServerExtension::font_set_baseline_offset(const RID &p_font_rid, double p_baseline_offset) {
742 GDVIRTUAL_CALL(_font_set_baseline_offset, p_font_rid, p_baseline_offset);
743 }
744
745 double TextServerExtension::font_get_baseline_offset(const RID &p_font_rid) const {
746 double ret = 0.0;
747 GDVIRTUAL_CALL(_font_get_baseline_offset, p_font_rid, ret);
748 return ret;
749 }
750
751 void TextServerExtension::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
752 GDVIRTUAL_CALL(_font_set_transform, p_font_rid, p_transform);
753 }
754
755 Transform2D TextServerExtension::font_get_transform(const RID &p_font_rid) const {
756 Transform2D ret;
757 GDVIRTUAL_CALL(_font_get_transform, p_font_rid, ret);
758 return ret;
759 }
760
761 void TextServerExtension::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
762 GDVIRTUAL_CALL(_font_set_variation_coordinates, p_font_rid, p_variation_coordinates);
763 }
764
765 Dictionary TextServerExtension::font_get_variation_coordinates(const RID &p_font_rid) const {
766 Dictionary ret;
767 GDVIRTUAL_CALL(_font_get_variation_coordinates, p_font_rid, ret);
768 return ret;
769 }
770
771 void TextServerExtension::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
772 GDVIRTUAL_CALL(_font_set_oversampling, p_font_rid, p_oversampling);
773 }
774
775 double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {
776 double ret = -1.0;
777 GDVIRTUAL_CALL(_font_get_oversampling, p_font_rid, ret);
778 return ret;
779 }
780
781 TypedArray<Vector2i> TextServerExtension::font_get_size_cache_list(const RID &p_font_rid) const {
782 TypedArray<Vector2i> ret;
783 GDVIRTUAL_CALL(_font_get_size_cache_list, p_font_rid, ret);
784 return ret;
785 }
786
787 void TextServerExtension::font_clear_size_cache(const RID &p_font_rid) {
788 GDVIRTUAL_CALL(_font_clear_size_cache, p_font_rid);
789 }
790
791 void TextServerExtension::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
792 GDVIRTUAL_CALL(_font_remove_size_cache, p_font_rid, p_size);
793 }
794
795 TypedArray<Dictionary> TextServerExtension::font_get_size_cache_info(const RID &p_font_rid) const {
796 TypedArray<Dictionary> ret;
797 GDVIRTUAL_CALL(_font_get_size_cache_info, p_font_rid, ret);
798 return ret;
799 }
800
801 void TextServerExtension::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
802 GDVIRTUAL_CALL(_font_set_ascent, p_font_rid, p_size, p_ascent);
803 }
804
805 double TextServerExtension::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
806 double ret = 0;
807 GDVIRTUAL_CALL(_font_get_ascent, p_font_rid, p_size, ret);
808 return ret;
809 }
810
811 void TextServerExtension::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
812 GDVIRTUAL_CALL(_font_set_descent, p_font_rid, p_size, p_descent);
813 }
814
815 double TextServerExtension::font_get_descent(const RID &p_font_rid, int64_t p_size) const {
816 double ret = 0;
817 GDVIRTUAL_CALL(_font_get_descent, p_font_rid, p_size, ret);
818 return ret;
819 }
820
821 void TextServerExtension::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
822 GDVIRTUAL_CALL(_font_set_underline_position, p_font_rid, p_size, p_underline_position);
823 }
824
825 double TextServerExtension::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
826 double ret = 0;
827 GDVIRTUAL_CALL(_font_get_underline_position, p_font_rid, p_size, ret);
828 return ret;
829 }
830
831 void TextServerExtension::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
832 GDVIRTUAL_CALL(_font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);
833 }
834
835 double TextServerExtension::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
836 double ret = 0;
837 GDVIRTUAL_CALL(_font_get_underline_thickness, p_font_rid, p_size, ret);
838 return ret;
839 }
840
841 void TextServerExtension::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
842 GDVIRTUAL_CALL(_font_set_scale, p_font_rid, p_size, p_scale);
843 }
844
845 double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size) const {
846 double ret = 0;
847 GDVIRTUAL_CALL(_font_get_scale, p_font_rid, p_size, ret);
848 return ret;
849 }
850
851 int64_t TextServerExtension::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
852 int64_t ret = 0;
853 GDVIRTUAL_CALL(_font_get_texture_count, p_font_rid, p_size, ret);
854 return ret;
855 }
856
857 void TextServerExtension::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
858 GDVIRTUAL_CALL(_font_clear_textures, p_font_rid, p_size);
859 }
860
861 void TextServerExtension::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
862 GDVIRTUAL_CALL(_font_remove_texture, p_font_rid, p_size, p_texture_index);
863 }
864
865 void TextServerExtension::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
866 GDVIRTUAL_CALL(_font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);
867 }
868
869 Ref<Image> TextServerExtension::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
870 Ref<Image> ret;
871 GDVIRTUAL_CALL(_font_get_texture_image, p_font_rid, p_size, p_texture_index, ret);
872 return ret;
873 }
874
875 void TextServerExtension::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
876 GDVIRTUAL_CALL(_font_set_texture_offsets, p_font_rid, p_size, p_texture_index, p_offset);
877 }
878
879 PackedInt32Array TextServerExtension::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
880 PackedInt32Array ret;
881 GDVIRTUAL_CALL(_font_get_texture_offsets, p_font_rid, p_size, p_texture_index, ret);
882 return ret;
883 }
884
885 PackedInt32Array TextServerExtension::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
886 PackedInt32Array ret;
887 GDVIRTUAL_CALL(_font_get_glyph_list, p_font_rid, p_size, ret);
888 return ret;
889 }
890
891 void TextServerExtension::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
892 GDVIRTUAL_CALL(_font_clear_glyphs, p_font_rid, p_size);
893 }
894
895 void TextServerExtension::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
896 GDVIRTUAL_CALL(_font_remove_glyph, p_font_rid, p_size, p_glyph);
897 }
898
899 Vector2 TextServerExtension::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
900 Vector2 ret;
901 GDVIRTUAL_CALL(_font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret);
902 return ret;
903 }
904
905 void TextServerExtension::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
906 GDVIRTUAL_CALL(_font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);
907 }
908
909 Vector2 TextServerExtension::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
910 Vector2 ret;
911 GDVIRTUAL_CALL(_font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret);
912 return ret;
913 }
914
915 void TextServerExtension::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
916 GDVIRTUAL_CALL(_font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);
917 }
918
919 Vector2 TextServerExtension::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
920 Vector2 ret;
921 GDVIRTUAL_CALL(_font_get_glyph_size, p_font_rid, p_size, p_glyph, ret);
922 return ret;
923 }
924
925 void TextServerExtension::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
926 GDVIRTUAL_CALL(_font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);
927 }
928
929 Rect2 TextServerExtension::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
930 Rect2 ret;
931 GDVIRTUAL_CALL(_font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret);
932 return ret;
933 }
934
935 void TextServerExtension::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
936 GDVIRTUAL_CALL(_font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);
937 }
938
939 int64_t TextServerExtension::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
940 int64_t ret = 0;
941 GDVIRTUAL_CALL(_font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret);
942 return ret;
943 }
944
945 void TextServerExtension::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
946 GDVIRTUAL_CALL(_font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);
947 }
948
949 RID TextServerExtension::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
950 RID ret;
951 GDVIRTUAL_CALL(_font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret);
952 return ret;
953 }
954
955 Size2 TextServerExtension::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
956 Size2 ret;
957 GDVIRTUAL_CALL(_font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret);
958 return ret;
959 }
960
961 Dictionary TextServerExtension::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
962 Dictionary ret;
963 GDVIRTUAL_CALL(_font_get_glyph_contours, p_font_rid, p_size, p_index, ret);
964 return ret;
965 }
966
967 TypedArray<Vector2i> TextServerExtension::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
968 TypedArray<Vector2i> ret;
969 GDVIRTUAL_CALL(_font_get_kerning_list, p_font_rid, p_size, ret);
970 return ret;
971 }
972
973 void TextServerExtension::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
974 GDVIRTUAL_CALL(_font_clear_kerning_map, p_font_rid, p_size);
975 }
976
977 void TextServerExtension::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
978 GDVIRTUAL_CALL(_font_remove_kerning, p_font_rid, p_size, p_glyph_pair);
979 }
980
981 void TextServerExtension::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
982 GDVIRTUAL_CALL(_font_set_kerning, p_font_rid, p_size, p_glyph_pair, p_kerning);
983 }
984
985 Vector2 TextServerExtension::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
986 Vector2 ret;
987 GDVIRTUAL_CALL(_font_get_kerning, p_font_rid, p_size, p_glyph_pair, ret);
988 return ret;
989 }
990
991 int64_t TextServerExtension::font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
992 int64_t ret = 0;
993 GDVIRTUAL_CALL(_font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret);
994 return ret;
995 }
996
997 int64_t TextServerExtension::font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const {
998 int64_t ret = 0;
999 GDVIRTUAL_CALL(_font_get_char_from_glyph_index, p_font_rid, p_size, p_glyph_index, ret);
1000 return ret;
1001 }
1002
1003 bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) const {
1004 bool ret = false;
1005 GDVIRTUAL_CALL(_font_has_char, p_font_rid, p_char, ret);
1006 return ret;
1007 }
1008
1009 String TextServerExtension::font_get_supported_chars(const RID &p_font_rid) const {
1010 String ret;
1011 GDVIRTUAL_CALL(_font_get_supported_chars, p_font_rid, ret);
1012 return ret;
1013 }
1014
1015 PackedInt32Array TextServerExtension::font_get_supported_glyphs(const RID &p_font_rid) const {
1016 PackedInt32Array ret;
1017 GDVIRTUAL_CALL(_font_get_supported_glyphs, p_font_rid, ret);
1018 return ret;
1019 }
1020
1021 void TextServerExtension::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
1022 GDVIRTUAL_CALL(_font_render_range, p_font_rid, p_size, p_start, p_end);
1023 }
1024
1025 void TextServerExtension::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
1026 GDVIRTUAL_CALL(_font_render_glyph, p_font_rid, p_size, p_index);
1027 }
1028
1029 void TextServerExtension::font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color, float p_oversampling) const {
1030 GDVIRTUAL_CALL(_font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color, p_oversampling);
1031 #ifndef DISABLE_DEPRECATED
1032 GDVIRTUAL_CALL(_font_draw_glyph_bind_compat_104872, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);
1033 #endif
1034 }
1035
1036 void TextServerExtension::font_draw_glyph_outline(const RID &p_font_rid, 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, float p_oversampling) const {
1037 GDVIRTUAL_CALL(_font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color, p_oversampling);
1038 #ifndef DISABLE_DEPRECATED
1039 GDVIRTUAL_CALL(_font_draw_glyph_outline_bind_compat_104872, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
1040 #endif
1041 }
1042
1043 bool TextServerExtension::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
1044 bool ret = false;
1045 GDVIRTUAL_CALL(_font_is_language_supported, p_font_rid, p_language, ret);
1046 return ret;
1047 }
1048
1049 void TextServerExtension::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
1050 GDVIRTUAL_CALL(_font_set_language_support_override, p_font_rid, p_language, p_supported);
1051 }
1052
1053 bool TextServerExtension::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
1054 bool ret = false;
1055 GDVIRTUAL_CALL(_font_get_language_support_override, p_font_rid, p_language, ret);
1056 return ret;
1057 }
1058
1059 void TextServerExtension::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
1060 GDVIRTUAL_CALL(_font_remove_language_support_override, p_font_rid, p_language);
1061 }
1062
1063 PackedStringArray TextServerExtension::font_get_language_support_overrides(const RID &p_font_rid) {
1064 PackedStringArray ret;
1065 GDVIRTUAL_CALL(_font_get_language_support_overrides, p_font_rid, ret);
1066 return ret;
1067 }
1068
1069 bool TextServerExtension::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
1070 bool ret = false;
1071 GDVIRTUAL_CALL(_font_is_script_supported, p_font_rid, p_script, ret);
1072 return ret;
1073 }
1074
1075 void TextServerExtension::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
1076 GDVIRTUAL_CALL(_font_set_script_support_override, p_font_rid, p_script, p_supported);
1077 }
1078
1079 bool TextServerExtension::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
1080 bool ret = false;
1081 GDVIRTUAL_CALL(_font_get_script_support_override, p_font_rid, p_script, ret);
1082 return ret;
1083 }
1084
1085 void TextServerExtension::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
1086 GDVIRTUAL_CALL(_font_remove_script_support_override, p_font_rid, p_script);
1087 }
1088
1089 PackedStringArray TextServerExtension::font_get_script_support_overrides(const RID &p_font_rid) {
1090 PackedStringArray ret;
1091 GDVIRTUAL_CALL(_font_get_script_support_overrides, p_font_rid, ret);
1092 return ret;
1093 }
1094
1095 void TextServerExtension::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
1096 GDVIRTUAL_CALL(_font_set_opentype_feature_overrides, p_font_rid, p_overrides);
1097 }
1098
1099 Dictionary TextServerExtension::font_get_opentype_feature_overrides(const RID &p_font_rid) const {
1100 Dictionary ret;
1101 GDVIRTUAL_CALL(_font_get_opentype_feature_overrides, p_font_rid, ret);
1102 return ret;
1103 }
1104
1105 Dictionary TextServerExtension::font_supported_feature_list(const RID &p_font_rid) const {
1106 Dictionary ret;
1107 GDVIRTUAL_CALL(_font_supported_feature_list, p_font_rid, ret);
1108 return ret;
1109 }
1110
1111 Dictionary TextServerExtension::font_supported_variation_list(const RID &p_font_rid) const {
1112 Dictionary ret;
1113 GDVIRTUAL_CALL(_font_supported_variation_list, p_font_rid, ret);
1114 return ret;
1115 }
1116
1117 #ifndef DISABLE_DEPRECATED
1118 double TextServerExtension::font_get_global_oversampling() const {
1119 return 1.0;
1120 }
1121
1122 void TextServerExtension::font_set_global_oversampling(double p_oversampling) {
1123 // NOP
1124 }
1125 #endif
1126
1127 void TextServerExtension::reference_oversampling_level(double p_oversampling) {
1128 GDVIRTUAL_CALL(_reference_oversampling_level, p_oversampling);
1129 }
1130
1131 void TextServerExtension::unreference_oversampling_level(double p_oversampling) {
1132 GDVIRTUAL_CALL(_unreference_oversampling_level, p_oversampling);
1133 }
1134
1135 Vector2 TextServerExtension::get_hex_code_box_size(int64_t p_size, int64_t p_index) const {
1136 Vector2 ret;
1137 if (GDVIRTUAL_CALL(_get_hex_code_box_size, p_size, p_index, ret)) {
1138 return ret;
1139 }
1140 return TextServer::get_hex_code_box_size(p_size, p_index);
1141 }
1142
1143 void TextServerExtension::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 {
1144 if (!GDVIRTUAL_CALL(_draw_hex_code_box, p_canvas, p_size, p_pos, p_index, p_color)) {
1145 TextServer::draw_hex_code_box(p_canvas, p_size, p_pos, p_index, p_color);
1146 }
1147 }
1148
1149 /*************************************************************************/
1150 /* Shaped text buffer interface */
1151 /*************************************************************************/
1152
1153 RID TextServerExtension::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
1154 RID ret;
1155 GDVIRTUAL_CALL(_create_shaped_text, p_direction, p_orientation, ret);
1156 return ret;
1157 }
1158
1159 void TextServerExtension::shaped_text_clear(const RID &p_shaped) {
1160 GDVIRTUAL_CALL(_shaped_text_clear, p_shaped);
1161 }
1162
1163 RID TextServerExtension::shaped_text_duplicate(const RID &p_shaped) {
1164 RID ret;
1165 GDVIRTUAL_CALL(_shaped_text_duplicate, p_shaped, ret);
1166 return ret;
1167 }
1168
1169 void TextServerExtension::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
1170 GDVIRTUAL_CALL(_shaped_text_set_direction, p_shaped, p_direction);
1171 }
1172
1173 TextServer::Direction TextServerExtension::shaped_text_get_direction(const RID &p_shaped) const {
1174 TextServer::Direction ret = TextServer::DIRECTION_AUTO;
1175 GDVIRTUAL_CALL(_shaped_text_get_direction, p_shaped, ret);
1176 return ret;
1177 }
1178
1179 TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(const RID &p_shaped) const {
1180 TextServer::Direction ret = TextServer::DIRECTION_LTR;
1181 GDVIRTUAL_CALL(_shaped_text_get_inferred_direction, p_shaped, ret);
1182 return ret;
1183 }
1184
1185 void TextServerExtension::shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {
1186 GDVIRTUAL_CALL(_shaped_text_set_orientation, p_shaped, p_orientation);
1187 }
1188
1189 TextServer::Orientation TextServerExtension::shaped_text_get_orientation(const RID &p_shaped) const {
1190 TextServer::Orientation ret = TextServer::ORIENTATION_HORIZONTAL;
1191 GDVIRTUAL_CALL(_shaped_text_get_orientation, p_shaped, ret);
1192 return ret;
1193 }
1194
1195 void TextServerExtension::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
1196 GDVIRTUAL_CALL(_shaped_text_set_bidi_override, p_shaped, p_override);
1197 }
1198
1199 void TextServerExtension::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
1200 GDVIRTUAL_CALL(_shaped_text_set_custom_punctuation, p_shaped, p_punct);
1201 }
1202
1203 String TextServerExtension::shaped_text_get_custom_punctuation(const RID &p_shaped) const {
1204 String ret;
1205 GDVIRTUAL_CALL(_shaped_text_get_custom_punctuation, p_shaped, ret);
1206 return ret;
1207 }
1208
1209 void TextServerExtension::shaped_text_set_custom_ellipsis(const RID &p_shaped, int64_t p_char) {
1210 GDVIRTUAL_CALL(_shaped_text_set_custom_ellipsis, p_shaped, p_char);
1211 }
1212
1213 int64_t TextServerExtension::shaped_text_get_custom_ellipsis(const RID &p_shaped) const {
1214 int64_t ret = 0;
1215 GDVIRTUAL_CALL(_shaped_text_get_custom_ellipsis, p_shaped, ret);
1216 return ret;
1217 }
1218
1219 void TextServerExtension::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
1220 GDVIRTUAL_CALL(_shaped_text_set_preserve_invalid, p_shaped, p_enabled);
1221 }
1222
1223 bool TextServerExtension::shaped_text_get_preserve_invalid(const RID &p_shaped) const {
1224 bool ret = false;
1225 GDVIRTUAL_CALL(_shaped_text_get_preserve_invalid, p_shaped, ret);
1226 return ret;
1227 }
1228
1229 void TextServerExtension::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
1230 GDVIRTUAL_CALL(_shaped_text_set_preserve_control, p_shaped, p_enabled);
1231 }
1232
1233 bool TextServerExtension::shaped_text_get_preserve_control(const RID &p_shaped) const {
1234 bool ret = false;
1235 GDVIRTUAL_CALL(_shaped_text_get_preserve_control, p_shaped, ret);
1236 return ret;
1237 }
1238
1239 void TextServerExtension::shaped_text_set_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing, int64_t p_value) {
1240 GDVIRTUAL_CALL(_shaped_text_set_spacing, p_shaped, p_spacing, p_value);
1241 }
1242
1243 int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing) const {
1244 int64_t ret = 0;
1245 GDVIRTUAL_CALL(_shaped_text_get_spacing, p_shaped, p_spacing, ret);
1246 return ret;
1247 }
1248
1249 bool TextServerExtension::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, const String &p_language, const Variant &p_meta) {
1250 bool ret = false;
1251 GDVIRTUAL_CALL(_shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret);
1252 return ret;
1253 }
1254
1255 bool TextServerExtension::shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length, double p_baseline) {
1256 bool ret = false;
1257 GDVIRTUAL_CALL(_shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, p_baseline, ret);
1258 return ret;
1259 }
1260
1261 bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, double p_baseline) {
1262 bool ret = false;
1263 GDVIRTUAL_CALL(_shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, p_baseline, ret);
1264 return ret;
1265 }
1266
1267 bool TextServerExtension::shaped_text_has_object(const RID &p_shaped, const Variant &p_key) const {
1268 bool ret = false;
1269 GDVIRTUAL_CALL(_shaped_text_has_object, p_shaped, p_key, ret);
1270 return ret;
1271 }
1272
1273 String TextServerExtension::shaped_get_text(const RID &p_shaped) const {
1274 String ret;
1275 GDVIRTUAL_CALL(_shaped_get_text, p_shaped, ret);
1276 return ret;
1277 }
1278
1279 int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {
1280 int64_t ret = 0;
1281 GDVIRTUAL_CALL(_shaped_get_span_count, p_shaped, ret);
1282 return ret;
1283 }
1284
1285 Variant TextServerExtension::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
1286 Variant ret;
1287 GDVIRTUAL_CALL(_shaped_get_span_meta, p_shaped, p_index, ret);
1288 return ret;
1289 }
1290
1291 Variant TextServerExtension::shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const {
1292 Variant ret;
1293 GDVIRTUAL_CALL(_shaped_get_span_embedded_object, p_shaped, p_index, ret);
1294 return ret;
1295 }
1296
1297 String TextServerExtension::shaped_get_span_text(const RID &p_shaped, int64_t p_index) const {
1298 String ret;
1299 GDVIRTUAL_CALL(_shaped_get_span_text, p_shaped, p_index, ret);
1300 return ret;
1301 }
1302
1303 Variant TextServerExtension::shaped_get_span_object(const RID &p_shaped, int64_t p_index) const {
1304 Variant ret = false;
1305 GDVIRTUAL_CALL(_shaped_get_span_object, p_shaped, p_index, ret);
1306 return ret;
1307 }
1308
1309 void TextServerExtension::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) {
1310 GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
1311 }
1312
1313 int64_t TextServerExtension::shaped_get_run_count(const RID &p_shaped) const {
1314 int64_t ret = 0;
1315 GDVIRTUAL_CALL(_shaped_get_run_count, p_shaped, ret);
1316 return ret;
1317 }
1318
1319 String TextServerExtension::shaped_get_run_text(const RID &p_shaped, int64_t p_index) const {
1320 String ret;
1321 GDVIRTUAL_CALL(_shaped_get_run_text, p_shaped, p_index, ret);
1322 return ret;
1323 }
1324
1325 Vector2i TextServerExtension::shaped_get_run_range(const RID &p_shaped, int64_t p_index) const {
1326 Vector2i ret;
1327 GDVIRTUAL_CALL(_shaped_get_run_range, p_shaped, p_index, ret);
1328 return ret;
1329 }
1330
1331 Vector2i TextServerExtension::shaped_get_run_glyph_range(const RID &p_shaped, int64_t p_index) const {
1332 Vector2i ret;
1333 GDVIRTUAL_CALL(_shaped_get_run_glyph_range, p_shaped, p_index, ret);
1334 return ret;
1335 }
1336
1337 RID TextServerExtension::shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const {
1338 RID ret;
1339 GDVIRTUAL_CALL(_shaped_get_run_font_rid, p_shaped, p_index, ret);
1340 return ret;
1341 }
1342
1343 int TextServerExtension::shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const {
1344 int ret = 0;
1345 GDVIRTUAL_CALL(_shaped_get_run_font_size, p_shaped, p_index, ret);
1346 return ret;
1347 }
1348
1349 String TextServerExtension::shaped_get_run_language(const RID &p_shaped, int64_t p_index) const {
1350 String ret;
1351 GDVIRTUAL_CALL(_shaped_get_run_language, p_shaped, p_index, ret);
1352 return ret;
1353 }
1354
1355 TextServer::Direction TextServerExtension::shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const {
1356 TextServer::Direction ret = TextServer::DIRECTION_LTR;
1357 GDVIRTUAL_CALL(_shaped_get_run_direction, p_shaped, p_index, ret);
1358 return ret;
1359 }
1360
1361 Variant TextServerExtension::shaped_get_run_object(const RID &p_shaped, int64_t p_index) const {
1362 Variant ret;
1363 GDVIRTUAL_CALL(_shaped_get_run_object, p_shaped, p_index, ret);
1364 return ret;
1365 }
1366
1367 RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
1368 RID ret;
1369 GDVIRTUAL_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret);
1370 return ret;
1371 }
1372
1373 RID TextServerExtension::shaped_text_get_parent(const RID &p_shaped) const {
1374 RID ret;
1375 GDVIRTUAL_CALL(_shaped_text_get_parent, p_shaped, ret);
1376 return ret;
1377 }
1378
1379 double TextServerExtension::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {
1380 double ret = 0;
1381 GDVIRTUAL_CALL(_shaped_text_fit_to_width, p_shaped, p_width, p_jst_flags, ret);
1382 return ret;
1383 }
1384
1385 double TextServerExtension::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
1386 double ret = 0;
1387 GDVIRTUAL_CALL(_shaped_text_tab_align, p_shaped, p_tab_stops, ret);
1388 return ret;
1389 }
1390
1391 bool TextServerExtension::shaped_text_shape(const RID &p_shaped) {
1392 bool ret = false;
1393 GDVIRTUAL_CALL(_shaped_text_shape, p_shaped, ret);
1394 return ret;
1395 }
1396
1397 bool TextServerExtension::shaped_text_update_breaks(const RID &p_shaped) {
1398 bool ret = false;
1399 GDVIRTUAL_CALL(_shaped_text_update_breaks, p_shaped, ret);
1400 return ret;
1401 }
1402
1403 bool TextServerExtension::shaped_text_update_justification_ops(const RID &p_shaped) {
1404 bool ret = false;
1405 GDVIRTUAL_CALL(_shaped_text_update_justification_ops, p_shaped, ret);
1406 return ret;
1407 }
1408
1409 bool TextServerExtension::shaped_text_is_ready(const RID &p_shaped) const {
1410 bool ret = false;
1411 GDVIRTUAL_CALL(_shaped_text_is_ready, p_shaped, ret);
1412 return ret;
1413 }
1414
1415 const Glyph *TextServerExtension::shaped_text_get_glyphs(const RID &p_shaped) const {
1416 GDExtensionConstPtr<const Glyph> ret;
1417 GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, ret);
1418 return ret;
1419 }
1420
1421 const Glyph *TextServerExtension::shaped_text_sort_logical(const RID &p_shaped) {
1422 GDExtensionConstPtr<const Glyph> ret;
1423 GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, ret);
1424 return ret;
1425 }
1426
1427 int64_t TextServerExtension::shaped_text_get_glyph_count(const RID &p_shaped) const {
1428 int64_t ret = 0;
1429 GDVIRTUAL_CALL(_shaped_text_get_glyph_count, p_shaped, ret);
1430 return ret;
1431 }
1432
1433 Vector2i TextServerExtension::shaped_text_get_range(const RID &p_shaped) const {
1434 Vector2i ret;
1435 GDVIRTUAL_CALL(_shaped_text_get_range, p_shaped, ret);
1436 return ret;
1437 }
1438
1439 PackedInt32Array TextServerExtension::shaped_text_get_line_breaks_adv(const RID &p_shaped, const PackedFloat32Array &p_width, int64_t p_start, bool p_once, BitField<TextServer::LineBreakFlag> p_break_flags) const {
1440 PackedInt32Array ret;
1441 if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks_adv, p_shaped, p_width, p_start, p_once, p_break_flags, ret)) {
1442 return ret;
1443 }
1444 return TextServer::shaped_text_get_line_breaks_adv(p_shaped, p_width, p_start, p_once, p_break_flags);
1445 }
1446
1447 PackedInt32Array TextServerExtension::shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start, BitField<TextServer::LineBreakFlag> p_break_flags) const {
1448 PackedInt32Array ret;
1449 if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks, p_shaped, p_width, p_start, p_break_flags, ret)) {
1450 return ret;
1451 }
1452 return TextServer::shaped_text_get_line_breaks(p_shaped, p_width, p_start, p_break_flags);
1453 }
1454
1455 PackedInt32Array TextServerExtension::shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags, BitField<TextServer::GraphemeFlag> p_skip_grapheme_flags) const {
1456 PackedInt32Array ret;
1457 if (GDVIRTUAL_CALL(_shaped_text_get_word_breaks, p_shaped, p_grapheme_flags, p_skip_grapheme_flags, ret)) {
1458 return ret;
1459 }
1460 return TextServer::shaped_text_get_word_breaks(p_shaped, p_grapheme_flags, p_skip_grapheme_flags);
1461 }
1462
1463 int64_t TextServerExtension::shaped_text_get_trim_pos(const RID &p_shaped) const {
1464 int64_t ret = -1;
1465 GDVIRTUAL_CALL(_shaped_text_get_trim_pos, p_shaped, ret);
1466 return ret;
1467 }
1468
1469 int64_t TextServerExtension::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
1470 int64_t ret = -1;
1471 GDVIRTUAL_CALL(_shaped_text_get_ellipsis_pos, p_shaped, ret);
1472 return ret;
1473 }
1474
1475 const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
1476 GDExtensionConstPtr<const Glyph> ret;
1477 GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret);
1478 return ret;
1479 }
1480
1481 int64_t TextServerExtension::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
1482 int64_t ret = -1;
1483 GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyph_count, p_shaped, ret);
1484 return ret;
1485 }
1486
1487 void TextServerExtension::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
1488 GDVIRTUAL_CALL(_shaped_text_overrun_trim_to_width, p_shaped_line, p_width, p_trim_flags);
1489 }
1490
1491 Array TextServerExtension::shaped_text_get_objects(const RID &p_shaped) const {
1492 Array ret;
1493 GDVIRTUAL_CALL(_shaped_text_get_objects, p_shaped, ret);
1494 return ret;
1495 }
1496
1497 Rect2 TextServerExtension::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
1498 Rect2 ret;
1499 GDVIRTUAL_CALL(_shaped_text_get_object_rect, p_shaped, p_key, ret);
1500 return ret;
1501 }
1502
1503 Vector2i TextServerExtension::shaped_text_get_object_range(const RID &p_shaped, const Variant &p_key) const {
1504 Vector2i ret;
1505 GDVIRTUAL_CALL(_shaped_text_get_object_range, p_shaped, p_key, ret);
1506 return ret;
1507 }
1508
1509 int64_t TextServerExtension::shaped_text_get_object_glyph(const RID &p_shaped, const Variant &p_key) const {
1510 int64_t ret = -1;
1511 GDVIRTUAL_CALL(_shaped_text_get_object_glyph, p_shaped, p_key, ret);
1512 return ret;
1513 }
1514
1515 Size2 TextServerExtension::shaped_text_get_size(const RID &p_shaped) const {
1516 Size2 ret;
1517 GDVIRTUAL_CALL(_shaped_text_get_size, p_shaped, ret);
1518 return ret;
1519 }
1520
1521 double TextServerExtension::shaped_text_get_ascent(const RID &p_shaped) const {
1522 double ret = 0;
1523 GDVIRTUAL_CALL(_shaped_text_get_ascent, p_shaped, ret);
1524 return ret;
1525 }
1526
1527 double TextServerExtension::shaped_text_get_descent(const RID &p_shaped) const {
1528 double ret = 0;
1529 GDVIRTUAL_CALL(_shaped_text_get_descent, p_shaped, ret);
1530 return ret;
1531 }
1532
1533 double TextServerExtension::shaped_text_get_width(const RID &p_shaped) const {
1534 double ret = 0;
1535 GDVIRTUAL_CALL(_shaped_text_get_width, p_shaped, ret);
1536 return ret;
1537 }
1538
1539 double TextServerExtension::shaped_text_get_underline_position(const RID &p_shaped) const {
1540 double ret = 0;
1541 GDVIRTUAL_CALL(_shaped_text_get_underline_position, p_shaped, ret);
1542 return ret;
1543 }
1544
1545 double TextServerExtension::shaped_text_get_underline_thickness(const RID &p_shaped) const {
1546 double ret = 0;
1547 GDVIRTUAL_CALL(_shaped_text_get_underline_thickness, p_shaped, ret);
1548 return ret;
1549 }
1550
1551 TextServer::Direction TextServerExtension::shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const {
1552 int64_t ret;
1553 if (GDVIRTUAL_CALL(_shaped_text_get_dominant_direction_in_range, p_shaped, p_start, p_end, ret)) {
1554 return (TextServer::Direction)ret;
1555 }
1556 return TextServer::shaped_text_get_dominant_direction_in_range(p_shaped, p_start, p_end);
1557 }
1558
1559 CaretInfo TextServerExtension::shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const {
1560 CaretInfo ret;
1561 if (GDVIRTUAL_CALL(_shaped_text_get_carets, p_shaped, p_position, &ret)) {
1562 return ret;
1563 }
1564 return TextServer::shaped_text_get_carets(p_shaped, p_position);
1565 }
1566
1567 Vector<Vector2> TextServerExtension::shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const {
1568 Vector<Vector2> ret;
1569 if (GDVIRTUAL_CALL(_shaped_text_get_selection, p_shaped, p_start, p_end, ret)) {
1570 return ret;
1571 }
1572 return TextServer::shaped_text_get_selection(p_shaped, p_start, p_end);
1573 }
1574
1575 int64_t TextServerExtension::shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const {
1576 int64_t ret;
1577 if (GDVIRTUAL_CALL(_shaped_text_hit_test_grapheme, p_shaped, p_coords, ret)) {
1578 return ret;
1579 }
1580 return TextServer::shaped_text_hit_test_grapheme(p_shaped, p_coords);
1581 }
1582
1583 int64_t TextServerExtension::shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const {
1584 int64_t ret;
1585 if (GDVIRTUAL_CALL(_shaped_text_hit_test_position, p_shaped, p_coords, ret)) {
1586 return ret;
1587 }
1588 return TextServer::shaped_text_hit_test_position(p_shaped, p_coords);
1589 }
1590
1591 void TextServerExtension::shaped_text_draw(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l, double p_clip_r, const Color &p_color, float p_oversampling) const {
1592 if (GDVIRTUAL_CALL(_shaped_text_draw, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling)) {
1593 return;
1594 }
1595 #ifndef DISABLE_DEPRECATED
1596 if (GDVIRTUAL_CALL(_shaped_text_draw_bind_compat_104872, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color)) {
1597 return;
1598 }
1599 #endif
1600 TextServer::shaped_text_draw(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling);
1601 }
1602
1603 void TextServerExtension::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l, double p_clip_r, int64_t p_outline_size, const Color &p_color, float p_oversampling) const {
1604 if (GDVIRTUAL_CALL(_shaped_text_draw_outline, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color, p_oversampling)) {
1605 return;
1606 }
1607 #ifndef DISABLE_DEPRECATED
1608 if (GDVIRTUAL_CALL(_shaped_text_draw_outline_bind_compat_104872, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color)) {
1609 return;
1610 }
1611 #endif
1612 TextServer::shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color, p_oversampling);
1613 }
1614
1615 Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const {
1616 Vector2 ret;
1617 if (GDVIRTUAL_CALL(_shaped_text_get_grapheme_bounds, p_shaped, p_pos, ret)) {
1618 return ret;
1619 }
1620 return TextServer::shaped_text_get_grapheme_bounds(p_shaped, p_pos);
1621 }
1622
1623 int64_t TextServerExtension::shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {
1624 int64_t ret;
1625 if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {
1626 return ret;
1627 }
1628 return TextServer::shaped_text_next_grapheme_pos(p_shaped, p_pos);
1629 }
1630
1631 int64_t TextServerExtension::shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {
1632 int64_t ret;
1633 if (GDVIRTUAL_CALL(_shaped_text_prev_grapheme_pos, p_shaped, p_pos, ret)) {
1634 return ret;
1635 }
1636 return TextServer::shaped_text_prev_grapheme_pos(p_shaped, p_pos);
1637 }
1638
1639 PackedInt32Array TextServerExtension::shaped_text_get_character_breaks(const RID &p_shaped) const {
1640 PackedInt32Array ret;
1641 if (GDVIRTUAL_CALL(_shaped_text_get_character_breaks, p_shaped, ret)) {
1642 return ret;
1643 }
1644 return PackedInt32Array();
1645 }
1646
1647 int64_t TextServerExtension::shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const {
1648 int64_t ret;
1649 if (GDVIRTUAL_CALL(_shaped_text_next_character_pos, p_shaped, p_pos, ret)) {
1650 return ret;
1651 }
1652 return TextServer::shaped_text_next_character_pos(p_shaped, p_pos);
1653 }
1654
1655 int64_t TextServerExtension::shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const {
1656 int64_t ret;
1657 if (GDVIRTUAL_CALL(_shaped_text_prev_character_pos, p_shaped, p_pos, ret)) {
1658 return ret;
1659 }
1660 return TextServer::shaped_text_prev_character_pos(p_shaped, p_pos);
1661 }
1662
1663 int64_t TextServerExtension::shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const {
1664 int64_t ret;
1665 if (GDVIRTUAL_CALL(_shaped_text_closest_character_pos, p_shaped, p_pos, ret)) {
1666 return ret;
1667 }
1668 return TextServer::shaped_text_closest_character_pos(p_shaped, p_pos);
1669 }
1670
1671 #ifndef DISABLE_DEPRECATED
1672 String TextServerExtension::format_number(const String &p_string, const String &p_language) const {
1673 String ret;
1674 if (GDVIRTUAL_CALL(_format_number, p_string, p_language, ret)) {
1675 return ret;
1676 }
1677 return TextServer::format_number(p_string, p_language);
1678 }
1679
1680 String TextServerExtension::parse_number(const String &p_string, const String &p_language) const {
1681 String ret;
1682 if (GDVIRTUAL_CALL(_parse_number, p_string, p_language, ret)) {
1683 return ret;
1684 }
1685 return TextServer::parse_number(p_string, p_language);
1686 }
1687
1688 String TextServerExtension::percent_sign(const String &p_language) const {
1689 String ret = "%";
1690 if (GDVIRTUAL_CALL(_percent_sign, p_language, ret)) {
1691 return ret;
1692 }
1693 return TextServer::percent_sign(p_language);
1694 }
1695 #endif // DISABLE_DEPRECATED
1696
1697 bool TextServerExtension::is_valid_identifier(const String &p_string) const {
1698 bool ret;
1699 if (GDVIRTUAL_CALL(_is_valid_identifier, p_string, ret)) {
1700 return ret;
1701 }
1702 return TextServer::is_valid_identifier(p_string);
1703 }
1704
1705 bool TextServerExtension::is_valid_letter(uint64_t p_unicode) const {
1706 bool ret;
1707 if (GDVIRTUAL_CALL(_is_valid_letter, p_unicode, ret)) {
1708 return ret;
1709 }
1710 return TextServer::is_valid_letter(p_unicode);
1711 }
1712
1713 String TextServerExtension::strip_diacritics(const String &p_string) const {
1714 String ret;
1715 if (GDVIRTUAL_CALL(_strip_diacritics, p_string, ret)) {
1716 return ret;
1717 }
1718 return TextServer::strip_diacritics(p_string);
1719 }
1720
1721 String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const {
1722 String ret;
1723 if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) {
1724 return ret;
1725 }
1726 return p_string;
1727 }
1728
1729 String TextServerExtension::string_to_title(const String &p_string, const String &p_language) const {
1730 String ret;
1731 if (GDVIRTUAL_CALL(_string_to_title, p_string, p_language, ret)) {
1732 return ret;
1733 }
1734 return p_string;
1735 }
1736
1737 String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const {
1738 String ret;
1739 if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) {
1740 return ret;
1741 }
1742 return p_string;
1743 }
1744
1745 TypedArray<Vector3i> TextServerExtension::parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {
1746 TypedArray<Vector3i> ret;
1747 if (GDVIRTUAL_CALL(_parse_structured_text, p_parser_type, p_args, p_text, ret)) {
1748 return ret;
1749 }
1750 return TextServer::parse_structured_text(p_parser_type, p_args, p_text);
1751 }
1752
1753 PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_string, const String &p_language, int64_t p_chars_per_line) const {
1754 PackedInt32Array ret;
1755 GDVIRTUAL_CALL(_string_get_word_breaks, p_string, p_language, p_chars_per_line, ret);
1756 return ret;
1757 }
1758
1759 PackedInt32Array TextServerExtension::string_get_character_breaks(const String &p_string, const String &p_language) const {
1760 PackedInt32Array ret;
1761 if (GDVIRTUAL_CALL(_string_get_character_breaks, p_string, p_language, ret)) {
1762 return ret;
1763 }
1764 return TextServer::string_get_character_breaks(p_string, p_language);
1765 }
1766
1767 int64_t TextServerExtension::is_confusable(const String &p_string, const PackedStringArray &p_dict) const {
1768 int64_t ret;
1769 if (GDVIRTUAL_CALL(_is_confusable, p_string, p_dict, ret)) {
1770 return ret;
1771 }
1772 return TextServer::is_confusable(p_string, p_dict);
1773 }
1774
1775 bool TextServerExtension::spoof_check(const String &p_string) const {
1776 bool ret;
1777 if (GDVIRTUAL_CALL(_spoof_check, p_string, ret)) {
1778 return ret;
1779 }
1780 return TextServer::spoof_check(p_string);
1781 }
1782
1783 void TextServerExtension::cleanup() {
1784 GDVIRTUAL_CALL(_cleanup);
1785 }
1786
1787 TextServerExtension::TextServerExtension() {
1788 //NOP
1789 }
1790
1791 TextServerExtension::~TextServerExtension() {
1792 //NOP
1793 }