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