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