Path: blob/master/servers/text/text_server_extension.cpp
10277 views
/**************************************************************************/1/* text_server_extension.cpp */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#include "text_server_extension.h"3132void TextServerExtension::_bind_methods() {33GDVIRTUAL_BIND(_has_feature, "feature");34GDVIRTUAL_BIND(_get_name);35GDVIRTUAL_BIND(_get_features);3637GDVIRTUAL_BIND(_free_rid, "rid");38GDVIRTUAL_BIND(_has, "rid");39GDVIRTUAL_BIND(_load_support_data, "filename");4041GDVIRTUAL_BIND(_get_support_data_filename);42GDVIRTUAL_BIND(_get_support_data_info);43GDVIRTUAL_BIND(_save_support_data, "filename");44GDVIRTUAL_BIND(_get_support_data);4546GDVIRTUAL_BIND(_is_locale_right_to_left, "locale");4748GDVIRTUAL_BIND(_name_to_tag, "name");49GDVIRTUAL_BIND(_tag_to_name, "tag");5051/* Font interface */5253GDVIRTUAL_BIND(_create_font);54GDVIRTUAL_BIND(_create_font_linked_variation, "font_rid");5556GDVIRTUAL_BIND(_font_set_data, "font_rid", "data");57GDVIRTUAL_BIND(_font_set_data_ptr, "font_rid", "data_ptr", "data_size");5859GDVIRTUAL_BIND(_font_set_face_index, "font_rid", "face_index");60GDVIRTUAL_BIND(_font_get_face_index, "font_rid");6162GDVIRTUAL_BIND(_font_get_face_count, "font_rid");6364GDVIRTUAL_BIND(_font_set_style, "font_rid", "style");65GDVIRTUAL_BIND(_font_get_style, "font_rid");6667GDVIRTUAL_BIND(_font_set_name, "font_rid", "name");68GDVIRTUAL_BIND(_font_get_name, "font_rid");69GDVIRTUAL_BIND(_font_get_ot_name_strings, "font_rid");7071GDVIRTUAL_BIND(_font_set_style_name, "font_rid", "name_style");72GDVIRTUAL_BIND(_font_get_style_name, "font_rid");7374GDVIRTUAL_BIND(_font_set_weight, "font_rid", "weight");75GDVIRTUAL_BIND(_font_get_weight, "font_rid");7677GDVIRTUAL_BIND(_font_set_stretch, "font_rid", "stretch");78GDVIRTUAL_BIND(_font_get_stretch, "font_rid");7980GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");81GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");8283GDVIRTUAL_BIND(_font_set_disable_embedded_bitmaps, "font_rid", "disable_embedded_bitmaps");84GDVIRTUAL_BIND(_font_get_disable_embedded_bitmaps, "font_rid");8586GDVIRTUAL_BIND(_font_set_generate_mipmaps, "font_rid", "generate_mipmaps");87GDVIRTUAL_BIND(_font_get_generate_mipmaps, "font_rid");8889GDVIRTUAL_BIND(_font_set_multichannel_signed_distance_field, "font_rid", "msdf");90GDVIRTUAL_BIND(_font_is_multichannel_signed_distance_field, "font_rid");9192GDVIRTUAL_BIND(_font_set_msdf_pixel_range, "font_rid", "msdf_pixel_range");93GDVIRTUAL_BIND(_font_get_msdf_pixel_range, "font_rid");9495GDVIRTUAL_BIND(_font_set_msdf_size, "font_rid", "msdf_size");96GDVIRTUAL_BIND(_font_get_msdf_size, "font_rid");9798GDVIRTUAL_BIND(_font_set_fixed_size, "font_rid", "fixed_size");99GDVIRTUAL_BIND(_font_get_fixed_size, "font_rid");100101GDVIRTUAL_BIND(_font_set_fixed_size_scale_mode, "font_rid", "fixed_size_scale_mode");102GDVIRTUAL_BIND(_font_get_fixed_size_scale_mode, "font_rid");103104GDVIRTUAL_BIND(_font_set_allow_system_fallback, "font_rid", "allow_system_fallback");105GDVIRTUAL_BIND(_font_is_allow_system_fallback, "font_rid");106GDVIRTUAL_BIND(_font_clear_system_fallback_cache);107108GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");109GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");110111GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");112GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");113114GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");115GDVIRTUAL_BIND(_font_get_hinting, "font_rid");116117GDVIRTUAL_BIND(_font_set_subpixel_positioning, "font_rid", "subpixel_positioning");118GDVIRTUAL_BIND(_font_get_subpixel_positioning, "font_rid");119120GDVIRTUAL_BIND(_font_set_keep_rounding_remainders, "font_rid", "keep_rounding_remainders");121GDVIRTUAL_BIND(_font_get_keep_rounding_remainders, "font_rid");122123GDVIRTUAL_BIND(_font_set_embolden, "font_rid", "strength");124GDVIRTUAL_BIND(_font_get_embolden, "font_rid");125126GDVIRTUAL_BIND(_font_set_spacing, "font_rid", "spacing", "value");127GDVIRTUAL_BIND(_font_get_spacing, "font_rid", "spacing");128129GDVIRTUAL_BIND(_font_set_baseline_offset, "font_rid", "baseline_offset");130GDVIRTUAL_BIND(_font_get_baseline_offset, "font_rid");131132GDVIRTUAL_BIND(_font_set_transform, "font_rid", "transform");133GDVIRTUAL_BIND(_font_get_transform, "font_rid");134135GDVIRTUAL_BIND(_font_set_variation_coordinates, "font_rid", "variation_coordinates");136GDVIRTUAL_BIND(_font_get_variation_coordinates, "font_rid");137138#ifndef DISABLE_DEPRECATED139GDVIRTUAL_BIND(_font_set_oversampling, "font_rid", "oversampling");140GDVIRTUAL_BIND(_font_get_oversampling, "font_rid");141#endif142143GDVIRTUAL_BIND(_font_get_size_cache_list, "font_rid");144GDVIRTUAL_BIND(_font_clear_size_cache, "font_rid");145GDVIRTUAL_BIND(_font_remove_size_cache, "font_rid", "size");146GDVIRTUAL_BIND(_font_get_size_cache_info, "font_rid");147148GDVIRTUAL_BIND(_font_set_ascent, "font_rid", "size", "ascent");149GDVIRTUAL_BIND(_font_get_ascent, "font_rid", "size");150151GDVIRTUAL_BIND(_font_set_descent, "font_rid", "size", "descent");152GDVIRTUAL_BIND(_font_get_descent, "font_rid", "size");153154GDVIRTUAL_BIND(_font_set_underline_position, "font_rid", "size", "underline_position");155GDVIRTUAL_BIND(_font_get_underline_position, "font_rid", "size");156157GDVIRTUAL_BIND(_font_set_underline_thickness, "font_rid", "size", "underline_thickness");158GDVIRTUAL_BIND(_font_get_underline_thickness, "font_rid", "size");159160GDVIRTUAL_BIND(_font_set_scale, "font_rid", "size", "scale");161GDVIRTUAL_BIND(_font_get_scale, "font_rid", "size");162163GDVIRTUAL_BIND(_font_get_texture_count, "font_rid", "size");164GDVIRTUAL_BIND(_font_clear_textures, "font_rid", "size");165GDVIRTUAL_BIND(_font_remove_texture, "font_rid", "size", "texture_index");166167GDVIRTUAL_BIND(_font_set_texture_image, "font_rid", "size", "texture_index", "image");168GDVIRTUAL_BIND(_font_get_texture_image, "font_rid", "size", "texture_index");169170GDVIRTUAL_BIND(_font_set_texture_offsets, "font_rid", "size", "texture_index", "offset");171GDVIRTUAL_BIND(_font_get_texture_offsets, "font_rid", "size", "texture_index");172173GDVIRTUAL_BIND(_font_get_glyph_list, "font_rid", "size");174GDVIRTUAL_BIND(_font_clear_glyphs, "font_rid", "size");175GDVIRTUAL_BIND(_font_remove_glyph, "font_rid", "size", "glyph");176177GDVIRTUAL_BIND(_font_get_glyph_advance, "font_rid", "size", "glyph");178GDVIRTUAL_BIND(_font_set_glyph_advance, "font_rid", "size", "glyph", "advance");179180GDVIRTUAL_BIND(_font_get_glyph_offset, "font_rid", "size", "glyph");181GDVIRTUAL_BIND(_font_set_glyph_offset, "font_rid", "size", "glyph", "offset");182183GDVIRTUAL_BIND(_font_get_glyph_size, "font_rid", "size", "glyph");184GDVIRTUAL_BIND(_font_set_glyph_size, "font_rid", "size", "glyph", "gl_size");185186GDVIRTUAL_BIND(_font_get_glyph_uv_rect, "font_rid", "size", "glyph");187GDVIRTUAL_BIND(_font_set_glyph_uv_rect, "font_rid", "size", "glyph", "uv_rect");188189GDVIRTUAL_BIND(_font_get_glyph_texture_idx, "font_rid", "size", "glyph");190GDVIRTUAL_BIND(_font_set_glyph_texture_idx, "font_rid", "size", "glyph", "texture_idx");191192GDVIRTUAL_BIND(_font_get_glyph_texture_rid, "font_rid", "size", "glyph");193GDVIRTUAL_BIND(_font_get_glyph_texture_size, "font_rid", "size", "glyph");194195GDVIRTUAL_BIND(_font_get_glyph_contours, "font_rid", "size", "index");196197GDVIRTUAL_BIND(_font_get_kerning_list, "font_rid", "size");198GDVIRTUAL_BIND(_font_clear_kerning_map, "font_rid", "size");199GDVIRTUAL_BIND(_font_remove_kerning, "font_rid", "size", "glyph_pair");200201GDVIRTUAL_BIND(_font_set_kerning, "font_rid", "size", "glyph_pair", "kerning");202GDVIRTUAL_BIND(_font_get_kerning, "font_rid", "size", "glyph_pair");203204GDVIRTUAL_BIND(_font_get_glyph_index, "font_rid", "size", "char", "variation_selector");205GDVIRTUAL_BIND(_font_get_char_from_glyph_index, "font_rid", "size", "glyph_index");206207GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");208GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");209GDVIRTUAL_BIND(_font_get_supported_glyphs, "font_rid");210211GDVIRTUAL_BIND(_font_render_range, "font_rid", "size", "start", "end");212GDVIRTUAL_BIND(_font_render_glyph, "font_rid", "size", "index");213214GDVIRTUAL_BIND(_font_draw_glyph, "font_rid", "canvas", "size", "pos", "index", "color", "oversampling");215GDVIRTUAL_BIND(_font_draw_glyph_outline, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color", "oversampling");216#ifndef DISABLE_DEPRECATED217GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_bind_compat_104872, "font_rid", "canvas", "size", "pos", "index", "color");218GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_outline_bind_compat_104872, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color");219#endif220221GDVIRTUAL_BIND(_font_is_language_supported, "font_rid", "language");222GDVIRTUAL_BIND(_font_set_language_support_override, "font_rid", "language", "supported");223GDVIRTUAL_BIND(_font_get_language_support_override, "font_rid", "language");224GDVIRTUAL_BIND(_font_remove_language_support_override, "font_rid", "language");225GDVIRTUAL_BIND(_font_get_language_support_overrides, "font_rid");226227GDVIRTUAL_BIND(_font_is_script_supported, "font_rid", "script");228GDVIRTUAL_BIND(_font_set_script_support_override, "font_rid", "script", "supported");229GDVIRTUAL_BIND(_font_get_script_support_override, "font_rid", "script");230GDVIRTUAL_BIND(_font_remove_script_support_override, "font_rid", "script");231GDVIRTUAL_BIND(_font_get_script_support_overrides, "font_rid");232233GDVIRTUAL_BIND(_font_set_opentype_feature_overrides, "font_rid", "overrides");234GDVIRTUAL_BIND(_font_get_opentype_feature_overrides, "font_rid");235236GDVIRTUAL_BIND(_font_supported_feature_list, "font_rid");237GDVIRTUAL_BIND(_font_supported_variation_list, "font_rid");238239#ifndef DISABLE_DEPRECATED240GDVIRTUAL_BIND(_font_get_global_oversampling);241GDVIRTUAL_BIND(_font_set_global_oversampling, "oversampling");242#endif243GDVIRTUAL_BIND(_reference_oversampling_level, "oversampling");244GDVIRTUAL_BIND(_unreference_oversampling_level, "oversampling");245246GDVIRTUAL_BIND(_get_hex_code_box_size, "size", "index");247GDVIRTUAL_BIND(_draw_hex_code_box, "canvas", "size", "pos", "index", "color");248249/* Shaped text buffer interface */250251GDVIRTUAL_BIND(_create_shaped_text, "direction", "orientation");252253GDVIRTUAL_BIND(_shaped_text_clear, "shaped");254255GDVIRTUAL_BIND(_shaped_text_set_direction, "shaped", "direction");256GDVIRTUAL_BIND(_shaped_text_get_direction, "shaped");257GDVIRTUAL_BIND(_shaped_text_get_inferred_direction, "shaped");258259GDVIRTUAL_BIND(_shaped_text_set_bidi_override, "shaped", "override");260261GDVIRTUAL_BIND(_shaped_text_set_custom_punctuation, "shaped", "punct");262GDVIRTUAL_BIND(_shaped_text_get_custom_punctuation, "shaped");263264GDVIRTUAL_BIND(_shaped_text_set_custom_ellipsis, "shaped", "char");265GDVIRTUAL_BIND(_shaped_text_get_custom_ellipsis, "shaped");266267GDVIRTUAL_BIND(_shaped_text_set_orientation, "shaped", "orientation");268GDVIRTUAL_BIND(_shaped_text_get_orientation, "shaped");269270GDVIRTUAL_BIND(_shaped_text_set_preserve_invalid, "shaped", "enabled");271GDVIRTUAL_BIND(_shaped_text_get_preserve_invalid, "shaped");272273GDVIRTUAL_BIND(_shaped_text_set_preserve_control, "shaped", "enabled");274GDVIRTUAL_BIND(_shaped_text_get_preserve_control, "shaped");275276GDVIRTUAL_BIND(_shaped_text_set_spacing, "shaped", "spacing", "value");277GDVIRTUAL_BIND(_shaped_text_get_spacing, "shaped", "spacing");278279GDVIRTUAL_BIND(_shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");280GDVIRTUAL_BIND(_shaped_text_add_object, "shaped", "key", "size", "inline_align", "length", "baseline");281GDVIRTUAL_BIND(_shaped_text_resize_object, "shaped", "key", "size", "inline_align", "baseline");282GDVIRTUAL_BIND(_shaped_get_text, "shaped");283284GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");285GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");286GDVIRTUAL_BIND(_shaped_get_span_embedded_object, "shaped", "index");287GDVIRTUAL_BIND(_shaped_get_span_text, "shaped", "index");288GDVIRTUAL_BIND(_shaped_get_span_object, "shaped", "index");289GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");290291GDVIRTUAL_BIND(_shaped_get_run_count, "shaped");292GDVIRTUAL_BIND(_shaped_get_run_text, "shaped", "index");293GDVIRTUAL_BIND(_shaped_get_run_range, "shaped", "index");294GDVIRTUAL_BIND(_shaped_get_run_font_rid, "shaped", "index");295GDVIRTUAL_BIND(_shaped_get_run_font_size, "shaped", "index");296GDVIRTUAL_BIND(_shaped_get_run_language, "shaped", "index");297GDVIRTUAL_BIND(_shaped_get_run_direction, "shaped", "index");298GDVIRTUAL_BIND(_shaped_get_run_object, "shaped", "index");299300GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");301GDVIRTUAL_BIND(_shaped_text_get_parent, "shaped");302303GDVIRTUAL_BIND(_shaped_text_fit_to_width, "shaped", "width", "justification_flags");304GDVIRTUAL_BIND(_shaped_text_tab_align, "shaped", "tab_stops");305306GDVIRTUAL_BIND(_shaped_text_shape, "shaped");307GDVIRTUAL_BIND(_shaped_text_update_breaks, "shaped");308GDVIRTUAL_BIND(_shaped_text_update_justification_ops, "shaped");309310GDVIRTUAL_BIND(_shaped_text_is_ready, "shaped");311312GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped");313GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped");314GDVIRTUAL_BIND(_shaped_text_get_glyph_count, "shaped");315316GDVIRTUAL_BIND(_shaped_text_get_range, "shaped");317318GDVIRTUAL_BIND(_shaped_text_get_line_breaks_adv, "shaped", "width", "start", "once", "break_flags");319GDVIRTUAL_BIND(_shaped_text_get_line_breaks, "shaped", "width", "start", "break_flags");320GDVIRTUAL_BIND(_shaped_text_get_word_breaks, "shaped", "grapheme_flags", "skip_grapheme_flags");321322GDVIRTUAL_BIND(_shaped_text_get_trim_pos, "shaped");323GDVIRTUAL_BIND(_shaped_text_get_ellipsis_pos, "shaped");324GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyph_count, "shaped");325GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped");326327GDVIRTUAL_BIND(_shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");328329GDVIRTUAL_BIND(_shaped_text_get_objects, "shaped");330GDVIRTUAL_BIND(_shaped_text_get_object_rect, "shaped", "key");331GDVIRTUAL_BIND(_shaped_text_get_object_range, "shaped", "key");332GDVIRTUAL_BIND(_shaped_text_get_object_glyph, "shaped", "key");333334GDVIRTUAL_BIND(_shaped_text_get_size, "shaped");335GDVIRTUAL_BIND(_shaped_text_get_ascent, "shaped");336GDVIRTUAL_BIND(_shaped_text_get_descent, "shaped");337GDVIRTUAL_BIND(_shaped_text_get_width, "shaped");338GDVIRTUAL_BIND(_shaped_text_get_underline_position, "shaped");339GDVIRTUAL_BIND(_shaped_text_get_underline_thickness, "shaped");340341GDVIRTUAL_BIND(_shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");342343GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "caret");344GDVIRTUAL_BIND(_shaped_text_get_selection, "shaped", "start", "end");345346GDVIRTUAL_BIND(_shaped_text_hit_test_grapheme, "shaped", "coord");347GDVIRTUAL_BIND(_shaped_text_hit_test_position, "shaped", "coord");348349GDVIRTUAL_BIND(_shaped_text_draw, "shaped", "canvas", "pos", "clip_l", "clip_r", "color", "oversampling");350GDVIRTUAL_BIND(_shaped_text_draw_outline, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color", "oversampling");351#ifndef DISABLE_DEPRECATED352GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "color");353GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_outline_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color");354#endif355356GDVIRTUAL_BIND(_shaped_text_get_grapheme_bounds, "shaped", "pos");357GDVIRTUAL_BIND(_shaped_text_next_grapheme_pos, "shaped", "pos");358GDVIRTUAL_BIND(_shaped_text_prev_grapheme_pos, "shaped", "pos");359360GDVIRTUAL_BIND(_shaped_text_get_character_breaks, "shaped");361GDVIRTUAL_BIND(_shaped_text_next_character_pos, "shaped", "pos");362GDVIRTUAL_BIND(_shaped_text_prev_character_pos, "shaped", "pos");363GDVIRTUAL_BIND(_shaped_text_closest_character_pos, "shaped", "pos");364365GDVIRTUAL_BIND(_format_number, "number", "language");366GDVIRTUAL_BIND(_parse_number, "number", "language");367GDVIRTUAL_BIND(_percent_sign, "language");368369GDVIRTUAL_BIND(_strip_diacritics, "string");370GDVIRTUAL_BIND(_is_valid_identifier, "string");371GDVIRTUAL_BIND(_is_valid_letter, "unicode");372373GDVIRTUAL_BIND(_string_get_word_breaks, "string", "language", "chars_per_line");374GDVIRTUAL_BIND(_string_get_character_breaks, "string", "language");375376GDVIRTUAL_BIND(_is_confusable, "string", "dict");377GDVIRTUAL_BIND(_spoof_check, "string");378379GDVIRTUAL_BIND(_string_to_upper, "string", "language");380GDVIRTUAL_BIND(_string_to_lower, "string", "language");381GDVIRTUAL_BIND(_string_to_title, "string", "language");382383GDVIRTUAL_BIND(_parse_structured_text, "parser_type", "args", "text");384385GDVIRTUAL_BIND(_cleanup);386}387388bool TextServerExtension::has_feature(Feature p_feature) const {389bool ret = false;390GDVIRTUAL_CALL(_has_feature, p_feature, ret);391return ret;392}393394String TextServerExtension::get_name() const {395String ret = "Unknown";396GDVIRTUAL_CALL(_get_name, ret);397return ret;398}399400int64_t TextServerExtension::get_features() const {401int64_t ret = 0;402GDVIRTUAL_CALL(_get_features, ret);403return ret;404}405406void TextServerExtension::free_rid(const RID &p_rid) {407GDVIRTUAL_CALL(_free_rid, p_rid);408}409410bool TextServerExtension::has(const RID &p_rid) {411bool ret = false;412GDVIRTUAL_CALL(_has, p_rid, ret);413return ret;414}415416bool TextServerExtension::load_support_data(const String &p_filename) {417bool ret = false;418GDVIRTUAL_CALL(_load_support_data, p_filename, ret);419return ret;420}421422String TextServerExtension::get_support_data_filename() const {423String ret;424GDVIRTUAL_CALL(_get_support_data_filename, ret);425return ret;426}427428String TextServerExtension::get_support_data_info() const {429String ret;430GDVIRTUAL_CALL(_get_support_data_info, ret);431return ret;432}433434bool TextServerExtension::save_support_data(const String &p_filename) const {435bool ret = false;436GDVIRTUAL_CALL(_save_support_data, p_filename, ret);437return ret;438}439440PackedByteArray TextServerExtension::get_support_data() const {441PackedByteArray ret;442GDVIRTUAL_CALL(_get_support_data, ret);443return ret;444}445446bool TextServerExtension::is_locale_right_to_left(const String &p_locale) const {447bool ret = false;448GDVIRTUAL_CALL(_is_locale_right_to_left, p_locale, ret);449return ret;450}451452int64_t TextServerExtension::name_to_tag(const String &p_name) const {453int64_t ret = 0;454if (GDVIRTUAL_CALL(_name_to_tag, p_name, ret)) {455return ret;456}457return TextServer::name_to_tag(p_name);458}459460String TextServerExtension::tag_to_name(int64_t p_tag) const {461String ret;462if (GDVIRTUAL_CALL(_tag_to_name, p_tag, ret)) {463return ret;464}465return TextServer::tag_to_name(p_tag);466}467468/*************************************************************************/469/* Font */470/*************************************************************************/471472RID TextServerExtension::create_font() {473RID ret;474GDVIRTUAL_CALL(_create_font, ret);475return ret;476}477478RID TextServerExtension::create_font_linked_variation(const RID &p_font_rid) {479RID ret;480GDVIRTUAL_CALL(_create_font_linked_variation, p_font_rid, ret);481return ret;482}483484void TextServerExtension::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {485GDVIRTUAL_CALL(_font_set_data, p_font_rid, p_data);486}487488void TextServerExtension::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {489GDVIRTUAL_CALL(_font_set_data_ptr, p_font_rid, p_data_ptr, p_data_size);490}491492void TextServerExtension::font_set_face_index(const RID &p_font_rid, int64_t p_index) {493GDVIRTUAL_CALL(_font_set_face_index, p_font_rid, p_index);494}495496int64_t TextServerExtension::font_get_face_index(const RID &p_font_rid) const {497int64_t ret = 0;498GDVIRTUAL_CALL(_font_get_face_index, p_font_rid, ret);499return ret;500}501502int64_t TextServerExtension::font_get_face_count(const RID &p_font_rid) const {503int64_t ret = 1;504GDVIRTUAL_CALL(_font_get_face_count, p_font_rid, ret);505return ret;506}507508void TextServerExtension::font_set_style(const RID &p_font_rid, BitField<TextServer::FontStyle> p_style) {509GDVIRTUAL_CALL(_font_set_style, p_font_rid, p_style);510}511512BitField<TextServer::FontStyle> TextServerExtension::font_get_style(const RID &p_font_rid) const {513BitField<TextServer::FontStyle> ret = 0;514GDVIRTUAL_CALL(_font_get_style, p_font_rid, ret);515return ret;516}517518void TextServerExtension::font_set_style_name(const RID &p_font_rid, const String &p_name) {519GDVIRTUAL_CALL(_font_set_style_name, p_font_rid, p_name);520}521522String TextServerExtension::font_get_style_name(const RID &p_font_rid) const {523String ret;524GDVIRTUAL_CALL(_font_get_style_name, p_font_rid, ret);525return ret;526}527528void TextServerExtension::font_set_weight(const RID &p_font_rid, int64_t p_weight) {529GDVIRTUAL_CALL(_font_set_weight, p_font_rid, p_weight);530}531532int64_t TextServerExtension::font_get_weight(const RID &p_font_rid) const {533int64_t ret = 400;534GDVIRTUAL_CALL(_font_get_weight, p_font_rid, ret);535return ret;536}537538void TextServerExtension::font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {539GDVIRTUAL_CALL(_font_set_stretch, p_font_rid, p_stretch);540}541542int64_t TextServerExtension::font_get_stretch(const RID &p_font_rid) const {543int64_t ret = 100;544GDVIRTUAL_CALL(_font_get_stretch, p_font_rid, ret);545return ret;546}547548void TextServerExtension::font_set_name(const RID &p_font_rid, const String &p_name) {549GDVIRTUAL_CALL(_font_set_name, p_font_rid, p_name);550}551552String TextServerExtension::font_get_name(const RID &p_font_rid) const {553String ret;554GDVIRTUAL_CALL(_font_get_name, p_font_rid, ret);555return ret;556}557558Dictionary TextServerExtension::font_get_ot_name_strings(const RID &p_font_rid) const {559Dictionary ret;560GDVIRTUAL_CALL(_font_get_ot_name_strings, p_font_rid, ret);561return ret;562}563564void TextServerExtension::font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {565GDVIRTUAL_CALL(_font_set_antialiasing, p_font_rid, p_antialiasing);566}567568TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(const RID &p_font_rid) const {569TextServer::FontAntialiasing ret = TextServer::FONT_ANTIALIASING_NONE;570GDVIRTUAL_CALL(_font_get_antialiasing, p_font_rid, ret);571return ret;572}573574void TextServerExtension::font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) {575GDVIRTUAL_CALL(_font_set_disable_embedded_bitmaps, p_font_rid, p_disable_embedded_bitmaps);576}577578bool TextServerExtension::font_get_disable_embedded_bitmaps(const RID &p_font_rid) const {579bool ret = false;580GDVIRTUAL_CALL(_font_get_disable_embedded_bitmaps, p_font_rid, ret);581return ret;582}583584void TextServerExtension::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {585GDVIRTUAL_CALL(_font_set_generate_mipmaps, p_font_rid, p_generate_mipmaps);586}587588bool TextServerExtension::font_get_generate_mipmaps(const RID &p_font_rid) const {589bool ret = false;590GDVIRTUAL_CALL(_font_get_generate_mipmaps, p_font_rid, ret);591return ret;592}593594void TextServerExtension::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {595GDVIRTUAL_CALL(_font_set_multichannel_signed_distance_field, p_font_rid, p_msdf);596}597598bool TextServerExtension::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {599bool ret = false;600GDVIRTUAL_CALL(_font_is_multichannel_signed_distance_field, p_font_rid, ret);601return ret;602}603604void TextServerExtension::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {605GDVIRTUAL_CALL(_font_set_msdf_pixel_range, p_font_rid, p_msdf_pixel_range);606}607608int64_t TextServerExtension::font_get_msdf_pixel_range(const RID &p_font_rid) const {609int64_t ret = 0;610GDVIRTUAL_CALL(_font_get_msdf_pixel_range, p_font_rid, ret);611return ret;612}613614void TextServerExtension::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {615GDVIRTUAL_CALL(_font_set_msdf_size, p_font_rid, p_msdf_size);616}617618int64_t TextServerExtension::font_get_msdf_size(const RID &p_font_rid) const {619int64_t ret = 0;620GDVIRTUAL_CALL(_font_get_msdf_size, p_font_rid, ret);621return ret;622}623624void TextServerExtension::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {625GDVIRTUAL_CALL(_font_set_fixed_size, p_font_rid, p_fixed_size);626}627628int64_t TextServerExtension::font_get_fixed_size(const RID &p_font_rid) const {629int64_t ret = 0;630GDVIRTUAL_CALL(_font_get_fixed_size, p_font_rid, ret);631return ret;632}633634void TextServerExtension::font_set_fixed_size_scale_mode(const RID &p_font_rid, TextServer::FixedSizeScaleMode p_fixed_size_scale_mode) {635GDVIRTUAL_CALL(_font_set_fixed_size_scale_mode, p_font_rid, p_fixed_size_scale_mode);636}637638TextServer::FixedSizeScaleMode TextServerExtension::font_get_fixed_size_scale_mode(const RID &p_font_rid) const {639FixedSizeScaleMode ret = FIXED_SIZE_SCALE_DISABLE;640GDVIRTUAL_CALL(_font_get_fixed_size_scale_mode, p_font_rid, ret);641return ret;642}643644void TextServerExtension::font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {645GDVIRTUAL_CALL(_font_set_allow_system_fallback, p_font_rid, p_allow_system_fallback);646}647648bool TextServerExtension::font_is_allow_system_fallback(const RID &p_font_rid) const {649bool ret = false;650GDVIRTUAL_CALL(_font_is_allow_system_fallback, p_font_rid, ret);651return ret;652}653654void TextServerExtension::font_clear_system_fallback_cache() {655GDVIRTUAL_CALL(_font_clear_system_fallback_cache);656}657658void TextServerExtension::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {659GDVIRTUAL_CALL(_font_set_force_autohinter, p_font_rid, p_force_autohinter);660}661662bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const {663bool ret = false;664GDVIRTUAL_CALL(_font_is_force_autohinter, p_font_rid, ret);665return ret;666}667668void TextServerExtension::font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) {669GDVIRTUAL_CALL(_font_set_modulate_color_glyphs, p_font_rid, p_modulate);670}671672bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) const {673bool ret = false;674GDVIRTUAL_CALL(_font_is_modulate_color_glyphs, p_font_rid, ret);675return ret;676}677678void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {679GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);680}681682TextServer::Hinting TextServerExtension::font_get_hinting(const RID &p_font_rid) const {683TextServer::Hinting ret = TextServer::HINTING_NONE;684GDVIRTUAL_CALL(_font_get_hinting, p_font_rid, ret);685return ret;686}687688void TextServerExtension::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {689GDVIRTUAL_CALL(_font_set_subpixel_positioning, p_font_rid, p_subpixel);690}691692TextServer::SubpixelPositioning TextServerExtension::font_get_subpixel_positioning(const RID &p_font_rid) const {693TextServer::SubpixelPositioning ret = TextServer::SUBPIXEL_POSITIONING_DISABLED;694GDVIRTUAL_CALL(_font_get_subpixel_positioning, p_font_rid, ret);695return ret;696}697698void TextServerExtension::font_set_keep_rounding_remainders(const RID &p_font_rid, bool p_keep_rounding_remainders) {699GDVIRTUAL_CALL(_font_set_keep_rounding_remainders, p_font_rid, p_keep_rounding_remainders);700}701702bool TextServerExtension::font_get_keep_rounding_remainders(const RID &p_font_rid) const {703bool ret = true;704GDVIRTUAL_CALL(_font_get_keep_rounding_remainders, p_font_rid, ret);705return ret;706}707708void TextServerExtension::font_set_embolden(const RID &p_font_rid, double p_strength) {709GDVIRTUAL_CALL(_font_set_embolden, p_font_rid, p_strength);710}711712double TextServerExtension::font_get_embolden(const RID &p_font_rid) const {713double ret = 0;714GDVIRTUAL_CALL(_font_get_embolden, p_font_rid, ret);715return ret;716}717718void TextServerExtension::font_set_spacing(const RID &p_font_rid, SpacingType p_spacing, int64_t p_value) {719GDVIRTUAL_CALL(_font_set_spacing, p_font_rid, p_spacing, p_value);720}721722int64_t TextServerExtension::font_get_spacing(const RID &p_font_rid, SpacingType p_spacing) const {723int64_t ret = 0;724GDVIRTUAL_CALL(_font_get_spacing, p_font_rid, p_spacing, ret);725return ret;726}727728void TextServerExtension::font_set_baseline_offset(const RID &p_font_rid, double p_baseline_offset) {729GDVIRTUAL_CALL(_font_set_baseline_offset, p_font_rid, p_baseline_offset);730}731732double TextServerExtension::font_get_baseline_offset(const RID &p_font_rid) const {733double ret = 0.0;734GDVIRTUAL_CALL(_font_get_baseline_offset, p_font_rid, ret);735return ret;736}737738void TextServerExtension::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {739GDVIRTUAL_CALL(_font_set_transform, p_font_rid, p_transform);740}741742Transform2D TextServerExtension::font_get_transform(const RID &p_font_rid) const {743Transform2D ret;744GDVIRTUAL_CALL(_font_get_transform, p_font_rid, ret);745return ret;746}747748void TextServerExtension::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {749GDVIRTUAL_CALL(_font_set_variation_coordinates, p_font_rid, p_variation_coordinates);750}751752Dictionary TextServerExtension::font_get_variation_coordinates(const RID &p_font_rid) const {753Dictionary ret;754GDVIRTUAL_CALL(_font_get_variation_coordinates, p_font_rid, ret);755return ret;756}757758void TextServerExtension::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {759GDVIRTUAL_CALL(_font_set_oversampling, p_font_rid, p_oversampling);760}761762double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {763double ret = -1.0;764GDVIRTUAL_CALL(_font_get_oversampling, p_font_rid, ret);765return ret;766}767768TypedArray<Vector2i> TextServerExtension::font_get_size_cache_list(const RID &p_font_rid) const {769TypedArray<Vector2i> ret;770GDVIRTUAL_CALL(_font_get_size_cache_list, p_font_rid, ret);771return ret;772}773774void TextServerExtension::font_clear_size_cache(const RID &p_font_rid) {775GDVIRTUAL_CALL(_font_clear_size_cache, p_font_rid);776}777778void TextServerExtension::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {779GDVIRTUAL_CALL(_font_remove_size_cache, p_font_rid, p_size);780}781782TypedArray<Dictionary> TextServerExtension::font_get_size_cache_info(const RID &p_font_rid) const {783TypedArray<Dictionary> ret;784GDVIRTUAL_CALL(_font_get_size_cache_info, p_font_rid, ret);785return ret;786}787788void TextServerExtension::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {789GDVIRTUAL_CALL(_font_set_ascent, p_font_rid, p_size, p_ascent);790}791792double TextServerExtension::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {793double ret = 0;794GDVIRTUAL_CALL(_font_get_ascent, p_font_rid, p_size, ret);795return ret;796}797798void TextServerExtension::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {799GDVIRTUAL_CALL(_font_set_descent, p_font_rid, p_size, p_descent);800}801802double TextServerExtension::font_get_descent(const RID &p_font_rid, int64_t p_size) const {803double ret = 0;804GDVIRTUAL_CALL(_font_get_descent, p_font_rid, p_size, ret);805return ret;806}807808void TextServerExtension::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {809GDVIRTUAL_CALL(_font_set_underline_position, p_font_rid, p_size, p_underline_position);810}811812double TextServerExtension::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {813double ret = 0;814GDVIRTUAL_CALL(_font_get_underline_position, p_font_rid, p_size, ret);815return ret;816}817818void TextServerExtension::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {819GDVIRTUAL_CALL(_font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);820}821822double TextServerExtension::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {823double ret = 0;824GDVIRTUAL_CALL(_font_get_underline_thickness, p_font_rid, p_size, ret);825return ret;826}827828void TextServerExtension::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {829GDVIRTUAL_CALL(_font_set_scale, p_font_rid, p_size, p_scale);830}831832double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size) const {833double ret = 0;834GDVIRTUAL_CALL(_font_get_scale, p_font_rid, p_size, ret);835return ret;836}837838int64_t TextServerExtension::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {839int64_t ret = 0;840GDVIRTUAL_CALL(_font_get_texture_count, p_font_rid, p_size, ret);841return ret;842}843844void TextServerExtension::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {845GDVIRTUAL_CALL(_font_clear_textures, p_font_rid, p_size);846}847848void TextServerExtension::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {849GDVIRTUAL_CALL(_font_remove_texture, p_font_rid, p_size, p_texture_index);850}851852void TextServerExtension::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {853GDVIRTUAL_CALL(_font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);854}855856Ref<Image> TextServerExtension::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {857Ref<Image> ret;858GDVIRTUAL_CALL(_font_get_texture_image, p_font_rid, p_size, p_texture_index, ret);859return ret;860}861862void TextServerExtension::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {863GDVIRTUAL_CALL(_font_set_texture_offsets, p_font_rid, p_size, p_texture_index, p_offset);864}865866PackedInt32Array TextServerExtension::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {867PackedInt32Array ret;868GDVIRTUAL_CALL(_font_get_texture_offsets, p_font_rid, p_size, p_texture_index, ret);869return ret;870}871872PackedInt32Array TextServerExtension::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {873PackedInt32Array ret;874GDVIRTUAL_CALL(_font_get_glyph_list, p_font_rid, p_size, ret);875return ret;876}877878void TextServerExtension::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {879GDVIRTUAL_CALL(_font_clear_glyphs, p_font_rid, p_size);880}881882void TextServerExtension::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {883GDVIRTUAL_CALL(_font_remove_glyph, p_font_rid, p_size, p_glyph);884}885886Vector2 TextServerExtension::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {887Vector2 ret;888GDVIRTUAL_CALL(_font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret);889return ret;890}891892void TextServerExtension::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {893GDVIRTUAL_CALL(_font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);894}895896Vector2 TextServerExtension::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {897Vector2 ret;898GDVIRTUAL_CALL(_font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret);899return ret;900}901902void TextServerExtension::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {903GDVIRTUAL_CALL(_font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);904}905906Vector2 TextServerExtension::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {907Vector2 ret;908GDVIRTUAL_CALL(_font_get_glyph_size, p_font_rid, p_size, p_glyph, ret);909return ret;910}911912void TextServerExtension::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {913GDVIRTUAL_CALL(_font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);914}915916Rect2 TextServerExtension::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {917Rect2 ret;918GDVIRTUAL_CALL(_font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret);919return ret;920}921922void TextServerExtension::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {923GDVIRTUAL_CALL(_font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);924}925926int64_t TextServerExtension::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {927int64_t ret = 0;928GDVIRTUAL_CALL(_font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret);929return ret;930}931932void TextServerExtension::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {933GDVIRTUAL_CALL(_font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);934}935936RID TextServerExtension::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {937RID ret;938GDVIRTUAL_CALL(_font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret);939return ret;940}941942Size2 TextServerExtension::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {943Size2 ret;944GDVIRTUAL_CALL(_font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret);945return ret;946}947948Dictionary TextServerExtension::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {949Dictionary ret;950GDVIRTUAL_CALL(_font_get_glyph_contours, p_font_rid, p_size, p_index, ret);951return ret;952}953954TypedArray<Vector2i> TextServerExtension::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {955TypedArray<Vector2i> ret;956GDVIRTUAL_CALL(_font_get_kerning_list, p_font_rid, p_size, ret);957return ret;958}959960void TextServerExtension::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {961GDVIRTUAL_CALL(_font_clear_kerning_map, p_font_rid, p_size);962}963964void TextServerExtension::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {965GDVIRTUAL_CALL(_font_remove_kerning, p_font_rid, p_size, p_glyph_pair);966}967968void TextServerExtension::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {969GDVIRTUAL_CALL(_font_set_kerning, p_font_rid, p_size, p_glyph_pair, p_kerning);970}971972Vector2 TextServerExtension::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {973Vector2 ret;974GDVIRTUAL_CALL(_font_get_kerning, p_font_rid, p_size, p_glyph_pair, ret);975return ret;976}977978int64_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 {979int64_t ret = 0;980GDVIRTUAL_CALL(_font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret);981return ret;982}983984int64_t TextServerExtension::font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const {985int64_t ret = 0;986GDVIRTUAL_CALL(_font_get_char_from_glyph_index, p_font_rid, p_size, p_glyph_index, ret);987return ret;988}989990bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) const {991bool ret = false;992GDVIRTUAL_CALL(_font_has_char, p_font_rid, p_char, ret);993return ret;994}995996String TextServerExtension::font_get_supported_chars(const RID &p_font_rid) const {997String ret;998GDVIRTUAL_CALL(_font_get_supported_chars, p_font_rid, ret);999return ret;1000}10011002PackedInt32Array TextServerExtension::font_get_supported_glyphs(const RID &p_font_rid) const {1003PackedInt32Array ret;1004GDVIRTUAL_CALL(_font_get_supported_glyphs, p_font_rid, ret);1005return ret;1006}10071008void TextServerExtension::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {1009GDVIRTUAL_CALL(_font_render_range, p_font_rid, p_size, p_start, p_end);1010}10111012void TextServerExtension::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {1013GDVIRTUAL_CALL(_font_render_glyph, p_font_rid, p_size, p_index);1014}10151016void 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 {1017GDVIRTUAL_CALL(_font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color, p_oversampling);1018#ifndef DISABLE_DEPRECATED1019GDVIRTUAL_CALL(_font_draw_glyph_bind_compat_104872, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);1020#endif1021}10221023void 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 {1024GDVIRTUAL_CALL(_font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color, p_oversampling);1025#ifndef DISABLE_DEPRECATED1026GDVIRTUAL_CALL(_font_draw_glyph_outline_bind_compat_104872, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);1027#endif1028}10291030bool TextServerExtension::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {1031bool ret = false;1032GDVIRTUAL_CALL(_font_is_language_supported, p_font_rid, p_language, ret);1033return ret;1034}10351036void TextServerExtension::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {1037GDVIRTUAL_CALL(_font_set_language_support_override, p_font_rid, p_language, p_supported);1038}10391040bool TextServerExtension::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {1041bool ret = false;1042GDVIRTUAL_CALL(_font_get_language_support_override, p_font_rid, p_language, ret);1043return ret;1044}10451046void TextServerExtension::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {1047GDVIRTUAL_CALL(_font_remove_language_support_override, p_font_rid, p_language);1048}10491050PackedStringArray TextServerExtension::font_get_language_support_overrides(const RID &p_font_rid) {1051PackedStringArray ret;1052GDVIRTUAL_CALL(_font_get_language_support_overrides, p_font_rid, ret);1053return ret;1054}10551056bool TextServerExtension::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {1057bool ret = false;1058GDVIRTUAL_CALL(_font_is_script_supported, p_font_rid, p_script, ret);1059return ret;1060}10611062void TextServerExtension::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {1063GDVIRTUAL_CALL(_font_set_script_support_override, p_font_rid, p_script, p_supported);1064}10651066bool TextServerExtension::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {1067bool ret = false;1068GDVIRTUAL_CALL(_font_get_script_support_override, p_font_rid, p_script, ret);1069return ret;1070}10711072void TextServerExtension::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {1073GDVIRTUAL_CALL(_font_remove_script_support_override, p_font_rid, p_script);1074}10751076PackedStringArray TextServerExtension::font_get_script_support_overrides(const RID &p_font_rid) {1077PackedStringArray ret;1078GDVIRTUAL_CALL(_font_get_script_support_overrides, p_font_rid, ret);1079return ret;1080}10811082void TextServerExtension::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {1083GDVIRTUAL_CALL(_font_set_opentype_feature_overrides, p_font_rid, p_overrides);1084}10851086Dictionary TextServerExtension::font_get_opentype_feature_overrides(const RID &p_font_rid) const {1087Dictionary ret;1088GDVIRTUAL_CALL(_font_get_opentype_feature_overrides, p_font_rid, ret);1089return ret;1090}10911092Dictionary TextServerExtension::font_supported_feature_list(const RID &p_font_rid) const {1093Dictionary ret;1094GDVIRTUAL_CALL(_font_supported_feature_list, p_font_rid, ret);1095return ret;1096}10971098Dictionary TextServerExtension::font_supported_variation_list(const RID &p_font_rid) const {1099Dictionary ret;1100GDVIRTUAL_CALL(_font_supported_variation_list, p_font_rid, ret);1101return ret;1102}11031104#ifndef DISABLE_DEPRECATED1105double TextServerExtension::font_get_global_oversampling() const {1106return 1.0;1107}11081109void TextServerExtension::font_set_global_oversampling(double p_oversampling) {1110// NOP1111}1112#endif11131114void TextServerExtension::reference_oversampling_level(double p_oversampling) {1115GDVIRTUAL_CALL(_reference_oversampling_level, p_oversampling);1116}11171118void TextServerExtension::unreference_oversampling_level(double p_oversampling) {1119GDVIRTUAL_CALL(_unreference_oversampling_level, p_oversampling);1120}11211122Vector2 TextServerExtension::get_hex_code_box_size(int64_t p_size, int64_t p_index) const {1123Vector2 ret;1124if (GDVIRTUAL_CALL(_get_hex_code_box_size, p_size, p_index, ret)) {1125return ret;1126}1127return TextServer::get_hex_code_box_size(p_size, p_index);1128}11291130void 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 {1131if (!GDVIRTUAL_CALL(_draw_hex_code_box, p_canvas, p_size, p_pos, p_index, p_color)) {1132TextServer::draw_hex_code_box(p_canvas, p_size, p_pos, p_index, p_color);1133}1134}11351136/*************************************************************************/1137/* Shaped text buffer interface */1138/*************************************************************************/11391140RID TextServerExtension::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {1141RID ret;1142GDVIRTUAL_CALL(_create_shaped_text, p_direction, p_orientation, ret);1143return ret;1144}11451146void TextServerExtension::shaped_text_clear(const RID &p_shaped) {1147GDVIRTUAL_CALL(_shaped_text_clear, p_shaped);1148}11491150void TextServerExtension::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {1151GDVIRTUAL_CALL(_shaped_text_set_direction, p_shaped, p_direction);1152}11531154TextServer::Direction TextServerExtension::shaped_text_get_direction(const RID &p_shaped) const {1155TextServer::Direction ret = TextServer::DIRECTION_AUTO;1156GDVIRTUAL_CALL(_shaped_text_get_direction, p_shaped, ret);1157return ret;1158}11591160TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(const RID &p_shaped) const {1161TextServer::Direction ret = TextServer::DIRECTION_LTR;1162GDVIRTUAL_CALL(_shaped_text_get_inferred_direction, p_shaped, ret);1163return ret;1164}11651166void TextServerExtension::shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {1167GDVIRTUAL_CALL(_shaped_text_set_orientation, p_shaped, p_orientation);1168}11691170TextServer::Orientation TextServerExtension::shaped_text_get_orientation(const RID &p_shaped) const {1171TextServer::Orientation ret = TextServer::ORIENTATION_HORIZONTAL;1172GDVIRTUAL_CALL(_shaped_text_get_orientation, p_shaped, ret);1173return ret;1174}11751176void TextServerExtension::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {1177GDVIRTUAL_CALL(_shaped_text_set_bidi_override, p_shaped, p_override);1178}11791180void TextServerExtension::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {1181GDVIRTUAL_CALL(_shaped_text_set_custom_punctuation, p_shaped, p_punct);1182}11831184String TextServerExtension::shaped_text_get_custom_punctuation(const RID &p_shaped) const {1185String ret;1186GDVIRTUAL_CALL(_shaped_text_get_custom_punctuation, p_shaped, ret);1187return ret;1188}11891190void TextServerExtension::shaped_text_set_custom_ellipsis(const RID &p_shaped, int64_t p_char) {1191GDVIRTUAL_CALL(_shaped_text_set_custom_ellipsis, p_shaped, p_char);1192}11931194int64_t TextServerExtension::shaped_text_get_custom_ellipsis(const RID &p_shaped) const {1195int64_t ret = 0;1196GDVIRTUAL_CALL(_shaped_text_get_custom_ellipsis, p_shaped, ret);1197return ret;1198}11991200void TextServerExtension::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {1201GDVIRTUAL_CALL(_shaped_text_set_preserve_invalid, p_shaped, p_enabled);1202}12031204bool TextServerExtension::shaped_text_get_preserve_invalid(const RID &p_shaped) const {1205bool ret = false;1206GDVIRTUAL_CALL(_shaped_text_get_preserve_invalid, p_shaped, ret);1207return ret;1208}12091210void TextServerExtension::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {1211GDVIRTUAL_CALL(_shaped_text_set_preserve_control, p_shaped, p_enabled);1212}12131214bool TextServerExtension::shaped_text_get_preserve_control(const RID &p_shaped) const {1215bool ret = false;1216GDVIRTUAL_CALL(_shaped_text_get_preserve_control, p_shaped, ret);1217return ret;1218}12191220void TextServerExtension::shaped_text_set_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing, int64_t p_value) {1221GDVIRTUAL_CALL(_shaped_text_set_spacing, p_shaped, p_spacing, p_value);1222}12231224int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing) const {1225int64_t ret = 0;1226GDVIRTUAL_CALL(_shaped_text_get_spacing, p_shaped, p_spacing, ret);1227return ret;1228}12291230bool 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) {1231bool ret = false;1232GDVIRTUAL_CALL(_shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret);1233return ret;1234}12351236bool 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) {1237bool ret = false;1238GDVIRTUAL_CALL(_shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, p_baseline, ret);1239return ret;1240}12411242bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, double p_baseline) {1243bool ret = false;1244GDVIRTUAL_CALL(_shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, p_baseline, ret);1245return ret;1246}12471248String TextServerExtension::shaped_get_text(const RID &p_shaped) const {1249String ret;1250GDVIRTUAL_CALL(_shaped_get_text, p_shaped, ret);1251return ret;1252}12531254int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {1255int64_t ret = 0;1256GDVIRTUAL_CALL(_shaped_get_span_count, p_shaped, ret);1257return ret;1258}12591260Variant TextServerExtension::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {1261Variant ret;1262GDVIRTUAL_CALL(_shaped_get_span_meta, p_shaped, p_index, ret);1263return ret;1264}12651266Variant TextServerExtension::shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const {1267Variant ret;1268GDVIRTUAL_CALL(_shaped_get_span_embedded_object, p_shaped, p_index, ret);1269return ret;1270}12711272String TextServerExtension::shaped_get_span_text(const RID &p_shaped, int64_t p_index) const {1273String ret;1274GDVIRTUAL_CALL(_shaped_get_span_text, p_shaped, p_index, ret);1275return ret;1276}12771278Variant TextServerExtension::shaped_get_span_object(const RID &p_shaped, int64_t p_index) const {1279Variant ret = false;1280GDVIRTUAL_CALL(_shaped_get_span_object, p_shaped, p_index, ret);1281return ret;1282}12831284void 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) {1285GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);1286}12871288int64_t TextServerExtension::shaped_get_run_count(const RID &p_shaped) const {1289int64_t ret = 0;1290GDVIRTUAL_CALL(_shaped_get_run_count, p_shaped, ret);1291return ret;1292}12931294String TextServerExtension::shaped_get_run_text(const RID &p_shaped, int64_t p_index) const {1295String ret;1296GDVIRTUAL_CALL(_shaped_get_run_text, p_shaped, p_index, ret);1297return ret;1298}12991300Vector2i TextServerExtension::shaped_get_run_range(const RID &p_shaped, int64_t p_index) const {1301Vector2i ret;1302GDVIRTUAL_CALL(_shaped_get_run_range, p_shaped, p_index, ret);1303return ret;1304}13051306RID TextServerExtension::shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const {1307RID ret;1308GDVIRTUAL_CALL(_shaped_get_run_font_rid, p_shaped, p_index, ret);1309return ret;1310}13111312int TextServerExtension::shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const {1313int ret = 0;1314GDVIRTUAL_CALL(_shaped_get_run_font_size, p_shaped, p_index, ret);1315return ret;1316}13171318String TextServerExtension::shaped_get_run_language(const RID &p_shaped, int64_t p_index) const {1319String ret;1320GDVIRTUAL_CALL(_shaped_get_run_language, p_shaped, p_index, ret);1321return ret;1322}13231324TextServer::Direction TextServerExtension::shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const {1325TextServer::Direction ret = TextServer::DIRECTION_LTR;1326GDVIRTUAL_CALL(_shaped_get_run_direction, p_shaped, p_index, ret);1327return ret;1328}13291330Variant TextServerExtension::shaped_get_run_object(const RID &p_shaped, int64_t p_index) const {1331Variant ret;1332GDVIRTUAL_CALL(_shaped_get_run_object, p_shaped, p_index, ret);1333return ret;1334}13351336RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {1337RID ret;1338GDVIRTUAL_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret);1339return ret;1340}13411342RID TextServerExtension::shaped_text_get_parent(const RID &p_shaped) const {1343RID ret;1344GDVIRTUAL_CALL(_shaped_text_get_parent, p_shaped, ret);1345return ret;1346}13471348double TextServerExtension::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {1349double ret = 0;1350GDVIRTUAL_CALL(_shaped_text_fit_to_width, p_shaped, p_width, p_jst_flags, ret);1351return ret;1352}13531354double TextServerExtension::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {1355double ret = 0;1356GDVIRTUAL_CALL(_shaped_text_tab_align, p_shaped, p_tab_stops, ret);1357return ret;1358}13591360bool TextServerExtension::shaped_text_shape(const RID &p_shaped) {1361bool ret = false;1362GDVIRTUAL_CALL(_shaped_text_shape, p_shaped, ret);1363return ret;1364}13651366bool TextServerExtension::shaped_text_update_breaks(const RID &p_shaped) {1367bool ret = false;1368GDVIRTUAL_CALL(_shaped_text_update_breaks, p_shaped, ret);1369return ret;1370}13711372bool TextServerExtension::shaped_text_update_justification_ops(const RID &p_shaped) {1373bool ret = false;1374GDVIRTUAL_CALL(_shaped_text_update_justification_ops, p_shaped, ret);1375return ret;1376}13771378bool TextServerExtension::shaped_text_is_ready(const RID &p_shaped) const {1379bool ret = false;1380GDVIRTUAL_CALL(_shaped_text_is_ready, p_shaped, ret);1381return ret;1382}13831384const Glyph *TextServerExtension::shaped_text_get_glyphs(const RID &p_shaped) const {1385GDExtensionConstPtr<const Glyph> ret;1386GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, ret);1387return ret;1388}13891390const Glyph *TextServerExtension::shaped_text_sort_logical(const RID &p_shaped) {1391GDExtensionConstPtr<const Glyph> ret;1392GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, ret);1393return ret;1394}13951396int64_t TextServerExtension::shaped_text_get_glyph_count(const RID &p_shaped) const {1397int64_t ret = 0;1398GDVIRTUAL_CALL(_shaped_text_get_glyph_count, p_shaped, ret);1399return ret;1400}14011402Vector2i TextServerExtension::shaped_text_get_range(const RID &p_shaped) const {1403Vector2i ret;1404GDVIRTUAL_CALL(_shaped_text_get_range, p_shaped, ret);1405return ret;1406}14071408PackedInt32Array 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 {1409PackedInt32Array ret;1410if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks_adv, p_shaped, p_width, p_start, p_once, p_break_flags, ret)) {1411return ret;1412}1413return TextServer::shaped_text_get_line_breaks_adv(p_shaped, p_width, p_start, p_once, p_break_flags);1414}14151416PackedInt32Array TextServerExtension::shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start, BitField<TextServer::LineBreakFlag> p_break_flags) const {1417PackedInt32Array ret;1418if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks, p_shaped, p_width, p_start, p_break_flags, ret)) {1419return ret;1420}1421return TextServer::shaped_text_get_line_breaks(p_shaped, p_width, p_start, p_break_flags);1422}14231424PackedInt32Array TextServerExtension::shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags, BitField<TextServer::GraphemeFlag> p_skip_grapheme_flags) const {1425PackedInt32Array ret;1426if (GDVIRTUAL_CALL(_shaped_text_get_word_breaks, p_shaped, p_grapheme_flags, p_skip_grapheme_flags, ret)) {1427return ret;1428}1429return TextServer::shaped_text_get_word_breaks(p_shaped, p_grapheme_flags, p_skip_grapheme_flags);1430}14311432int64_t TextServerExtension::shaped_text_get_trim_pos(const RID &p_shaped) const {1433int64_t ret = -1;1434GDVIRTUAL_CALL(_shaped_text_get_trim_pos, p_shaped, ret);1435return ret;1436}14371438int64_t TextServerExtension::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {1439int64_t ret = -1;1440GDVIRTUAL_CALL(_shaped_text_get_ellipsis_pos, p_shaped, ret);1441return ret;1442}14431444const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {1445GDExtensionConstPtr<const Glyph> ret;1446GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret);1447return ret;1448}14491450int64_t TextServerExtension::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {1451int64_t ret = -1;1452GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyph_count, p_shaped, ret);1453return ret;1454}14551456void TextServerExtension::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {1457GDVIRTUAL_CALL(_shaped_text_overrun_trim_to_width, p_shaped_line, p_width, p_trim_flags);1458}14591460Array TextServerExtension::shaped_text_get_objects(const RID &p_shaped) const {1461Array ret;1462GDVIRTUAL_CALL(_shaped_text_get_objects, p_shaped, ret);1463return ret;1464}14651466Rect2 TextServerExtension::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {1467Rect2 ret;1468GDVIRTUAL_CALL(_shaped_text_get_object_rect, p_shaped, p_key, ret);1469return ret;1470}14711472Vector2i TextServerExtension::shaped_text_get_object_range(const RID &p_shaped, const Variant &p_key) const {1473Vector2i ret;1474GDVIRTUAL_CALL(_shaped_text_get_object_range, p_shaped, p_key, ret);1475return ret;1476}14771478int64_t TextServerExtension::shaped_text_get_object_glyph(const RID &p_shaped, const Variant &p_key) const {1479int64_t ret = -1;1480GDVIRTUAL_CALL(_shaped_text_get_object_glyph, p_shaped, p_key, ret);1481return ret;1482}14831484Size2 TextServerExtension::shaped_text_get_size(const RID &p_shaped) const {1485Size2 ret;1486GDVIRTUAL_CALL(_shaped_text_get_size, p_shaped, ret);1487return ret;1488}14891490double TextServerExtension::shaped_text_get_ascent(const RID &p_shaped) const {1491double ret = 0;1492GDVIRTUAL_CALL(_shaped_text_get_ascent, p_shaped, ret);1493return ret;1494}14951496double TextServerExtension::shaped_text_get_descent(const RID &p_shaped) const {1497double ret = 0;1498GDVIRTUAL_CALL(_shaped_text_get_descent, p_shaped, ret);1499return ret;1500}15011502double TextServerExtension::shaped_text_get_width(const RID &p_shaped) const {1503double ret = 0;1504GDVIRTUAL_CALL(_shaped_text_get_width, p_shaped, ret);1505return ret;1506}15071508double TextServerExtension::shaped_text_get_underline_position(const RID &p_shaped) const {1509double ret = 0;1510GDVIRTUAL_CALL(_shaped_text_get_underline_position, p_shaped, ret);1511return ret;1512}15131514double TextServerExtension::shaped_text_get_underline_thickness(const RID &p_shaped) const {1515double ret = 0;1516GDVIRTUAL_CALL(_shaped_text_get_underline_thickness, p_shaped, ret);1517return ret;1518}15191520TextServer::Direction TextServerExtension::shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const {1521int64_t ret;1522if (GDVIRTUAL_CALL(_shaped_text_get_dominant_direction_in_range, p_shaped, p_start, p_end, ret)) {1523return (TextServer::Direction)ret;1524}1525return TextServer::shaped_text_get_dominant_direction_in_range(p_shaped, p_start, p_end);1526}15271528CaretInfo TextServerExtension::shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const {1529CaretInfo ret;1530if (GDVIRTUAL_CALL(_shaped_text_get_carets, p_shaped, p_position, &ret)) {1531return ret;1532}1533return TextServer::shaped_text_get_carets(p_shaped, p_position);1534}15351536Vector<Vector2> TextServerExtension::shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const {1537Vector<Vector2> ret;1538if (GDVIRTUAL_CALL(_shaped_text_get_selection, p_shaped, p_start, p_end, ret)) {1539return ret;1540}1541return TextServer::shaped_text_get_selection(p_shaped, p_start, p_end);1542}15431544int64_t TextServerExtension::shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const {1545int64_t ret;1546if (GDVIRTUAL_CALL(_shaped_text_hit_test_grapheme, p_shaped, p_coords, ret)) {1547return ret;1548}1549return TextServer::shaped_text_hit_test_grapheme(p_shaped, p_coords);1550}15511552int64_t TextServerExtension::shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const {1553int64_t ret;1554if (GDVIRTUAL_CALL(_shaped_text_hit_test_position, p_shaped, p_coords, ret)) {1555return ret;1556}1557return TextServer::shaped_text_hit_test_position(p_shaped, p_coords);1558}15591560void 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 {1561if (GDVIRTUAL_CALL(_shaped_text_draw, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling)) {1562return;1563}1564#ifndef DISABLE_DEPRECATED1565if (GDVIRTUAL_CALL(_shaped_text_draw_bind_compat_104872, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color)) {1566return;1567}1568#endif1569TextServer::shaped_text_draw(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling);1570}15711572void 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 {1573if (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)) {1574return;1575}1576#ifndef DISABLE_DEPRECATED1577if (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)) {1578return;1579}1580#endif1581TextServer::shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color, p_oversampling);1582}15831584Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const {1585Vector2 ret;1586if (GDVIRTUAL_CALL(_shaped_text_get_grapheme_bounds, p_shaped, p_pos, ret)) {1587return ret;1588}1589return TextServer::shaped_text_get_grapheme_bounds(p_shaped, p_pos);1590}15911592int64_t TextServerExtension::shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {1593int64_t ret;1594if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {1595return ret;1596}1597return TextServer::shaped_text_next_grapheme_pos(p_shaped, p_pos);1598}15991600int64_t TextServerExtension::shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {1601int64_t ret;1602if (GDVIRTUAL_CALL(_shaped_text_prev_grapheme_pos, p_shaped, p_pos, ret)) {1603return ret;1604}1605return TextServer::shaped_text_prev_grapheme_pos(p_shaped, p_pos);1606}16071608PackedInt32Array TextServerExtension::shaped_text_get_character_breaks(const RID &p_shaped) const {1609PackedInt32Array ret;1610if (GDVIRTUAL_CALL(_shaped_text_get_character_breaks, p_shaped, ret)) {1611return ret;1612}1613return PackedInt32Array();1614}16151616int64_t TextServerExtension::shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const {1617int64_t ret;1618if (GDVIRTUAL_CALL(_shaped_text_next_character_pos, p_shaped, p_pos, ret)) {1619return ret;1620}1621return TextServer::shaped_text_next_character_pos(p_shaped, p_pos);1622}16231624int64_t TextServerExtension::shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const {1625int64_t ret;1626if (GDVIRTUAL_CALL(_shaped_text_prev_character_pos, p_shaped, p_pos, ret)) {1627return ret;1628}1629return TextServer::shaped_text_prev_character_pos(p_shaped, p_pos);1630}16311632int64_t TextServerExtension::shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const {1633int64_t ret;1634if (GDVIRTUAL_CALL(_shaped_text_closest_character_pos, p_shaped, p_pos, ret)) {1635return ret;1636}1637return TextServer::shaped_text_closest_character_pos(p_shaped, p_pos);1638}16391640String TextServerExtension::format_number(const String &p_string, const String &p_language) const {1641String ret;1642if (GDVIRTUAL_CALL(_format_number, p_string, p_language, ret)) {1643return ret;1644}1645return p_string;1646}16471648String TextServerExtension::parse_number(const String &p_string, const String &p_language) const {1649String ret;1650if (GDVIRTUAL_CALL(_parse_number, p_string, p_language, ret)) {1651return ret;1652}1653return p_string;1654}16551656String TextServerExtension::percent_sign(const String &p_language) const {1657String ret = "%";1658GDVIRTUAL_CALL(_percent_sign, p_language, ret);1659return ret;1660}16611662bool TextServerExtension::is_valid_identifier(const String &p_string) const {1663bool ret;1664if (GDVIRTUAL_CALL(_is_valid_identifier, p_string, ret)) {1665return ret;1666}1667return TextServer::is_valid_identifier(p_string);1668}16691670bool TextServerExtension::is_valid_letter(uint64_t p_unicode) const {1671bool ret;1672if (GDVIRTUAL_CALL(_is_valid_letter, p_unicode, ret)) {1673return ret;1674}1675return TextServer::is_valid_letter(p_unicode);1676}16771678String TextServerExtension::strip_diacritics(const String &p_string) const {1679String ret;1680if (GDVIRTUAL_CALL(_strip_diacritics, p_string, ret)) {1681return ret;1682}1683return TextServer::strip_diacritics(p_string);1684}16851686String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const {1687String ret;1688if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) {1689return ret;1690}1691return p_string;1692}16931694String TextServerExtension::string_to_title(const String &p_string, const String &p_language) const {1695String ret;1696if (GDVIRTUAL_CALL(_string_to_title, p_string, p_language, ret)) {1697return ret;1698}1699return p_string;1700}17011702String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const {1703String ret;1704if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) {1705return ret;1706}1707return p_string;1708}17091710TypedArray<Vector3i> TextServerExtension::parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {1711TypedArray<Vector3i> ret;1712if (GDVIRTUAL_CALL(_parse_structured_text, p_parser_type, p_args, p_text, ret)) {1713return ret;1714}1715return TextServer::parse_structured_text(p_parser_type, p_args, p_text);1716}17171718PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_string, const String &p_language, int64_t p_chars_per_line) const {1719PackedInt32Array ret;1720GDVIRTUAL_CALL(_string_get_word_breaks, p_string, p_language, p_chars_per_line, ret);1721return ret;1722}17231724PackedInt32Array TextServerExtension::string_get_character_breaks(const String &p_string, const String &p_language) const {1725PackedInt32Array ret;1726if (GDVIRTUAL_CALL(_string_get_character_breaks, p_string, p_language, ret)) {1727return ret;1728}1729return TextServer::string_get_character_breaks(p_string, p_language);1730}17311732int64_t TextServerExtension::is_confusable(const String &p_string, const PackedStringArray &p_dict) const {1733int64_t ret;1734if (GDVIRTUAL_CALL(_is_confusable, p_string, p_dict, ret)) {1735return ret;1736}1737return TextServer::is_confusable(p_string, p_dict);1738}17391740bool TextServerExtension::spoof_check(const String &p_string) const {1741bool ret;1742if (GDVIRTUAL_CALL(_spoof_check, p_string, ret)) {1743return ret;1744}1745return TextServer::spoof_check(p_string);1746}17471748void TextServerExtension::cleanup() {1749GDVIRTUAL_CALL(_cleanup);1750}17511752TextServerExtension::TextServerExtension() {1753//NOP1754}17551756TextServerExtension::~TextServerExtension() {1757//NOP1758}175917601761