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