Path: blob/master/servers/text/text_server_extension.cpp
20850 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);45GDVIRTUAL_BIND(_is_locale_using_support_data, "locale");4647GDVIRTUAL_BIND(_is_locale_right_to_left, "locale");4849GDVIRTUAL_BIND(_name_to_tag, "name");50GDVIRTUAL_BIND(_tag_to_name, "tag");5152/* Font interface */5354GDVIRTUAL_BIND(_create_font);55GDVIRTUAL_BIND(_create_font_linked_variation, "font_rid");5657GDVIRTUAL_BIND(_font_set_data, "font_rid", "data");58GDVIRTUAL_BIND(_font_set_data_ptr, "font_rid", "data_ptr", "data_size");5960GDVIRTUAL_BIND(_font_set_face_index, "font_rid", "face_index");61GDVIRTUAL_BIND(_font_get_face_index, "font_rid");6263GDVIRTUAL_BIND(_font_get_face_count, "font_rid");6465GDVIRTUAL_BIND(_font_set_style, "font_rid", "style");66GDVIRTUAL_BIND(_font_get_style, "font_rid");6768GDVIRTUAL_BIND(_font_set_name, "font_rid", "name");69GDVIRTUAL_BIND(_font_get_name, "font_rid");70GDVIRTUAL_BIND(_font_get_ot_name_strings, "font_rid");7172GDVIRTUAL_BIND(_font_set_style_name, "font_rid", "name_style");73GDVIRTUAL_BIND(_font_get_style_name, "font_rid");7475GDVIRTUAL_BIND(_font_set_weight, "font_rid", "weight");76GDVIRTUAL_BIND(_font_get_weight, "font_rid");7778GDVIRTUAL_BIND(_font_set_stretch, "font_rid", "stretch");79GDVIRTUAL_BIND(_font_get_stretch, "font_rid");8081GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");82GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");8384GDVIRTUAL_BIND(_font_set_disable_embedded_bitmaps, "font_rid", "disable_embedded_bitmaps");85GDVIRTUAL_BIND(_font_get_disable_embedded_bitmaps, "font_rid");8687GDVIRTUAL_BIND(_font_set_generate_mipmaps, "font_rid", "generate_mipmaps");88GDVIRTUAL_BIND(_font_get_generate_mipmaps, "font_rid");8990GDVIRTUAL_BIND(_font_set_multichannel_signed_distance_field, "font_rid", "msdf");91GDVIRTUAL_BIND(_font_is_multichannel_signed_distance_field, "font_rid");9293GDVIRTUAL_BIND(_font_set_msdf_pixel_range, "font_rid", "msdf_pixel_range");94GDVIRTUAL_BIND(_font_get_msdf_pixel_range, "font_rid");9596GDVIRTUAL_BIND(_font_set_msdf_size, "font_rid", "msdf_size");97GDVIRTUAL_BIND(_font_get_msdf_size, "font_rid");9899GDVIRTUAL_BIND(_font_set_fixed_size, "font_rid", "fixed_size");100GDVIRTUAL_BIND(_font_get_fixed_size, "font_rid");101102GDVIRTUAL_BIND(_font_set_fixed_size_scale_mode, "font_rid", "fixed_size_scale_mode");103GDVIRTUAL_BIND(_font_get_fixed_size_scale_mode, "font_rid");104105GDVIRTUAL_BIND(_font_set_allow_system_fallback, "font_rid", "allow_system_fallback");106GDVIRTUAL_BIND(_font_is_allow_system_fallback, "font_rid");107GDVIRTUAL_BIND(_font_clear_system_fallback_cache);108109GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");110GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");111112GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");113GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");114115GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");116GDVIRTUAL_BIND(_font_get_hinting, "font_rid");117118GDVIRTUAL_BIND(_font_set_subpixel_positioning, "font_rid", "subpixel_positioning");119GDVIRTUAL_BIND(_font_get_subpixel_positioning, "font_rid");120121GDVIRTUAL_BIND(_font_set_keep_rounding_remainders, "font_rid", "keep_rounding_remainders");122GDVIRTUAL_BIND(_font_get_keep_rounding_remainders, "font_rid");123124GDVIRTUAL_BIND(_font_set_embolden, "font_rid", "strength");125GDVIRTUAL_BIND(_font_get_embolden, "font_rid");126127GDVIRTUAL_BIND(_font_set_spacing, "font_rid", "spacing", "value");128GDVIRTUAL_BIND(_font_get_spacing, "font_rid", "spacing");129130GDVIRTUAL_BIND(_font_set_baseline_offset, "font_rid", "baseline_offset");131GDVIRTUAL_BIND(_font_get_baseline_offset, "font_rid");132133GDVIRTUAL_BIND(_font_set_transform, "font_rid", "transform");134GDVIRTUAL_BIND(_font_get_transform, "font_rid");135136GDVIRTUAL_BIND(_font_set_variation_coordinates, "font_rid", "variation_coordinates");137GDVIRTUAL_BIND(_font_get_variation_coordinates, "font_rid");138139#ifndef DISABLE_DEPRECATED140GDVIRTUAL_BIND(_font_set_oversampling, "font_rid", "oversampling");141GDVIRTUAL_BIND(_font_get_oversampling, "font_rid");142#endif143144GDVIRTUAL_BIND(_font_get_size_cache_list, "font_rid");145GDVIRTUAL_BIND(_font_clear_size_cache, "font_rid");146GDVIRTUAL_BIND(_font_remove_size_cache, "font_rid", "size");147GDVIRTUAL_BIND(_font_get_size_cache_info, "font_rid");148149GDVIRTUAL_BIND(_font_set_ascent, "font_rid", "size", "ascent");150GDVIRTUAL_BIND(_font_get_ascent, "font_rid", "size");151152GDVIRTUAL_BIND(_font_set_descent, "font_rid", "size", "descent");153GDVIRTUAL_BIND(_font_get_descent, "font_rid", "size");154155GDVIRTUAL_BIND(_font_set_underline_position, "font_rid", "size", "underline_position");156GDVIRTUAL_BIND(_font_get_underline_position, "font_rid", "size");157158GDVIRTUAL_BIND(_font_set_underline_thickness, "font_rid", "size", "underline_thickness");159GDVIRTUAL_BIND(_font_get_underline_thickness, "font_rid", "size");160161GDVIRTUAL_BIND(_font_set_scale, "font_rid", "size", "scale");162GDVIRTUAL_BIND(_font_get_scale, "font_rid", "size");163164GDVIRTUAL_BIND(_font_get_texture_count, "font_rid", "size");165GDVIRTUAL_BIND(_font_clear_textures, "font_rid", "size");166GDVIRTUAL_BIND(_font_remove_texture, "font_rid", "size", "texture_index");167168GDVIRTUAL_BIND(_font_set_texture_image, "font_rid", "size", "texture_index", "image");169GDVIRTUAL_BIND(_font_get_texture_image, "font_rid", "size", "texture_index");170171GDVIRTUAL_BIND(_font_set_texture_offsets, "font_rid", "size", "texture_index", "offset");172GDVIRTUAL_BIND(_font_get_texture_offsets, "font_rid", "size", "texture_index");173174GDVIRTUAL_BIND(_font_get_glyph_list, "font_rid", "size");175GDVIRTUAL_BIND(_font_clear_glyphs, "font_rid", "size");176GDVIRTUAL_BIND(_font_remove_glyph, "font_rid", "size", "glyph");177178GDVIRTUAL_BIND(_font_get_glyph_advance, "font_rid", "size", "glyph");179GDVIRTUAL_BIND(_font_set_glyph_advance, "font_rid", "size", "glyph", "advance");180181GDVIRTUAL_BIND(_font_get_glyph_offset, "font_rid", "size", "glyph");182GDVIRTUAL_BIND(_font_set_glyph_offset, "font_rid", "size", "glyph", "offset");183184GDVIRTUAL_BIND(_font_get_glyph_size, "font_rid", "size", "glyph");185GDVIRTUAL_BIND(_font_set_glyph_size, "font_rid", "size", "glyph", "gl_size");186187GDVIRTUAL_BIND(_font_get_glyph_uv_rect, "font_rid", "size", "glyph");188GDVIRTUAL_BIND(_font_set_glyph_uv_rect, "font_rid", "size", "glyph", "uv_rect");189190GDVIRTUAL_BIND(_font_get_glyph_texture_idx, "font_rid", "size", "glyph");191GDVIRTUAL_BIND(_font_set_glyph_texture_idx, "font_rid", "size", "glyph", "texture_idx");192193GDVIRTUAL_BIND(_font_get_glyph_texture_rid, "font_rid", "size", "glyph");194GDVIRTUAL_BIND(_font_get_glyph_texture_size, "font_rid", "size", "glyph");195196GDVIRTUAL_BIND(_font_get_glyph_contours, "font_rid", "size", "index");197198GDVIRTUAL_BIND(_font_get_kerning_list, "font_rid", "size");199GDVIRTUAL_BIND(_font_clear_kerning_map, "font_rid", "size");200GDVIRTUAL_BIND(_font_remove_kerning, "font_rid", "size", "glyph_pair");201202GDVIRTUAL_BIND(_font_set_kerning, "font_rid", "size", "glyph_pair", "kerning");203GDVIRTUAL_BIND(_font_get_kerning, "font_rid", "size", "glyph_pair");204205GDVIRTUAL_BIND(_font_get_glyph_index, "font_rid", "size", "char", "variation_selector");206GDVIRTUAL_BIND(_font_get_char_from_glyph_index, "font_rid", "size", "glyph_index");207208GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");209GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");210GDVIRTUAL_BIND(_font_get_supported_glyphs, "font_rid");211212GDVIRTUAL_BIND(_font_render_range, "font_rid", "size", "start", "end");213GDVIRTUAL_BIND(_font_render_glyph, "font_rid", "size", "index");214215GDVIRTUAL_BIND(_font_draw_glyph, "font_rid", "canvas", "size", "pos", "index", "color", "oversampling");216GDVIRTUAL_BIND(_font_draw_glyph_outline, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color", "oversampling");217#ifndef DISABLE_DEPRECATED218GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_bind_compat_104872, "font_rid", "canvas", "size", "pos", "index", "color");219GDVIRTUAL_BIND_COMPAT(_font_draw_glyph_outline_bind_compat_104872, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color");220#endif221222GDVIRTUAL_BIND(_font_is_language_supported, "font_rid", "language");223GDVIRTUAL_BIND(_font_set_language_support_override, "font_rid", "language", "supported");224GDVIRTUAL_BIND(_font_get_language_support_override, "font_rid", "language");225GDVIRTUAL_BIND(_font_remove_language_support_override, "font_rid", "language");226GDVIRTUAL_BIND(_font_get_language_support_overrides, "font_rid");227228GDVIRTUAL_BIND(_font_is_script_supported, "font_rid", "script");229GDVIRTUAL_BIND(_font_set_script_support_override, "font_rid", "script", "supported");230GDVIRTUAL_BIND(_font_get_script_support_override, "font_rid", "script");231GDVIRTUAL_BIND(_font_remove_script_support_override, "font_rid", "script");232GDVIRTUAL_BIND(_font_get_script_support_overrides, "font_rid");233234GDVIRTUAL_BIND(_font_set_opentype_feature_overrides, "font_rid", "overrides");235GDVIRTUAL_BIND(_font_get_opentype_feature_overrides, "font_rid");236237GDVIRTUAL_BIND(_font_supported_feature_list, "font_rid");238GDVIRTUAL_BIND(_font_supported_variation_list, "font_rid");239240#ifndef DISABLE_DEPRECATED241GDVIRTUAL_BIND(_font_get_global_oversampling);242GDVIRTUAL_BIND(_font_set_global_oversampling, "oversampling");243#endif244GDVIRTUAL_BIND(_reference_oversampling_level, "oversampling");245GDVIRTUAL_BIND(_unreference_oversampling_level, "oversampling");246247GDVIRTUAL_BIND(_get_hex_code_box_size, "size", "index");248GDVIRTUAL_BIND(_draw_hex_code_box, "canvas", "size", "pos", "index", "color");249250/* Shaped text buffer interface */251252GDVIRTUAL_BIND(_create_shaped_text, "direction", "orientation");253254GDVIRTUAL_BIND(_shaped_text_clear, "shaped");255GDVIRTUAL_BIND(_shaped_text_duplicate, "shaped");256257GDVIRTUAL_BIND(_shaped_text_set_direction, "shaped", "direction");258GDVIRTUAL_BIND(_shaped_text_get_direction, "shaped");259GDVIRTUAL_BIND(_shaped_text_get_inferred_direction, "shaped");260261GDVIRTUAL_BIND(_shaped_text_set_bidi_override, "shaped", "override");262263GDVIRTUAL_BIND(_shaped_text_set_custom_punctuation, "shaped", "punct");264GDVIRTUAL_BIND(_shaped_text_get_custom_punctuation, "shaped");265266GDVIRTUAL_BIND(_shaped_text_set_custom_ellipsis, "shaped", "char");267GDVIRTUAL_BIND(_shaped_text_get_custom_ellipsis, "shaped");268269GDVIRTUAL_BIND(_shaped_text_set_orientation, "shaped", "orientation");270GDVIRTUAL_BIND(_shaped_text_get_orientation, "shaped");271272GDVIRTUAL_BIND(_shaped_text_set_preserve_invalid, "shaped", "enabled");273GDVIRTUAL_BIND(_shaped_text_get_preserve_invalid, "shaped");274275GDVIRTUAL_BIND(_shaped_text_set_preserve_control, "shaped", "enabled");276GDVIRTUAL_BIND(_shaped_text_get_preserve_control, "shaped");277278GDVIRTUAL_BIND(_shaped_text_set_spacing, "shaped", "spacing", "value");279GDVIRTUAL_BIND(_shaped_text_get_spacing, "shaped", "spacing");280281GDVIRTUAL_BIND(_shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");282GDVIRTUAL_BIND(_shaped_text_add_object, "shaped", "key", "size", "inline_align", "length", "baseline");283GDVIRTUAL_BIND(_shaped_text_resize_object, "shaped", "key", "size", "inline_align", "baseline");284GDVIRTUAL_BIND(_shaped_text_has_object, "shaped", "key");285GDVIRTUAL_BIND(_shaped_get_text, "shaped");286287GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");288GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");289GDVIRTUAL_BIND(_shaped_get_span_embedded_object, "shaped", "index");290GDVIRTUAL_BIND(_shaped_get_span_text, "shaped", "index");291GDVIRTUAL_BIND(_shaped_get_span_object, "shaped", "index");292GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");293294GDVIRTUAL_BIND(_shaped_get_run_count, "shaped");295GDVIRTUAL_BIND(_shaped_get_run_text, "shaped", "index");296GDVIRTUAL_BIND(_shaped_get_run_range, "shaped", "index");297GDVIRTUAL_BIND(_shaped_get_run_font_rid, "shaped", "index");298GDVIRTUAL_BIND(_shaped_get_run_font_size, "shaped", "index");299GDVIRTUAL_BIND(_shaped_get_run_language, "shaped", "index");300GDVIRTUAL_BIND(_shaped_get_run_direction, "shaped", "index");301GDVIRTUAL_BIND(_shaped_get_run_object, "shaped", "index");302303GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");304GDVIRTUAL_BIND(_shaped_text_get_parent, "shaped");305306GDVIRTUAL_BIND(_shaped_text_fit_to_width, "shaped", "width", "justification_flags");307GDVIRTUAL_BIND(_shaped_text_tab_align, "shaped", "tab_stops");308309GDVIRTUAL_BIND(_shaped_text_shape, "shaped");310GDVIRTUAL_BIND(_shaped_text_update_breaks, "shaped");311GDVIRTUAL_BIND(_shaped_text_update_justification_ops, "shaped");312313GDVIRTUAL_BIND(_shaped_text_is_ready, "shaped");314315GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped");316GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped");317GDVIRTUAL_BIND(_shaped_text_get_glyph_count, "shaped");318319GDVIRTUAL_BIND(_shaped_text_get_range, "shaped");320321GDVIRTUAL_BIND(_shaped_text_get_line_breaks_adv, "shaped", "width", "start", "once", "break_flags");322GDVIRTUAL_BIND(_shaped_text_get_line_breaks, "shaped", "width", "start", "break_flags");323GDVIRTUAL_BIND(_shaped_text_get_word_breaks, "shaped", "grapheme_flags", "skip_grapheme_flags");324325GDVIRTUAL_BIND(_shaped_text_get_trim_pos, "shaped");326GDVIRTUAL_BIND(_shaped_text_get_ellipsis_pos, "shaped");327GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyph_count, "shaped");328GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped");329330GDVIRTUAL_BIND(_shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");331332GDVIRTUAL_BIND(_shaped_text_get_objects, "shaped");333GDVIRTUAL_BIND(_shaped_text_get_object_rect, "shaped", "key");334GDVIRTUAL_BIND(_shaped_text_get_object_range, "shaped", "key");335GDVIRTUAL_BIND(_shaped_text_get_object_glyph, "shaped", "key");336337GDVIRTUAL_BIND(_shaped_text_get_size, "shaped");338GDVIRTUAL_BIND(_shaped_text_get_ascent, "shaped");339GDVIRTUAL_BIND(_shaped_text_get_descent, "shaped");340GDVIRTUAL_BIND(_shaped_text_get_width, "shaped");341GDVIRTUAL_BIND(_shaped_text_get_underline_position, "shaped");342GDVIRTUAL_BIND(_shaped_text_get_underline_thickness, "shaped");343344GDVIRTUAL_BIND(_shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");345346GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "caret");347GDVIRTUAL_BIND(_shaped_text_get_selection, "shaped", "start", "end");348349GDVIRTUAL_BIND(_shaped_text_hit_test_grapheme, "shaped", "coord");350GDVIRTUAL_BIND(_shaped_text_hit_test_position, "shaped", "coord");351352GDVIRTUAL_BIND(_shaped_text_draw, "shaped", "canvas", "pos", "clip_l", "clip_r", "color", "oversampling");353GDVIRTUAL_BIND(_shaped_text_draw_outline, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color", "oversampling");354#ifndef DISABLE_DEPRECATED355GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "color");356GDVIRTUAL_BIND_COMPAT(_shaped_text_draw_outline_bind_compat_104872, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color");357#endif358359GDVIRTUAL_BIND(_shaped_text_get_grapheme_bounds, "shaped", "pos");360GDVIRTUAL_BIND(_shaped_text_next_grapheme_pos, "shaped", "pos");361GDVIRTUAL_BIND(_shaped_text_prev_grapheme_pos, "shaped", "pos");362363GDVIRTUAL_BIND(_shaped_text_get_character_breaks, "shaped");364GDVIRTUAL_BIND(_shaped_text_next_character_pos, "shaped", "pos");365GDVIRTUAL_BIND(_shaped_text_prev_character_pos, "shaped", "pos");366GDVIRTUAL_BIND(_shaped_text_closest_character_pos, "shaped", "pos");367368#ifndef DISABLE_DEPRECATED369GDVIRTUAL_BIND(_format_number, "number", "language");370GDVIRTUAL_BIND(_parse_number, "number", "language");371GDVIRTUAL_BIND(_percent_sign, "language");372#endif373374GDVIRTUAL_BIND(_strip_diacritics, "string");375GDVIRTUAL_BIND(_is_valid_identifier, "string");376GDVIRTUAL_BIND(_is_valid_letter, "unicode");377378GDVIRTUAL_BIND(_string_get_word_breaks, "string", "language", "chars_per_line");379GDVIRTUAL_BIND(_string_get_character_breaks, "string", "language");380381GDVIRTUAL_BIND(_is_confusable, "string", "dict");382GDVIRTUAL_BIND(_spoof_check, "string");383384GDVIRTUAL_BIND(_string_to_upper, "string", "language");385GDVIRTUAL_BIND(_string_to_lower, "string", "language");386GDVIRTUAL_BIND(_string_to_title, "string", "language");387388GDVIRTUAL_BIND(_parse_structured_text, "parser_type", "args", "text");389390GDVIRTUAL_BIND(_cleanup);391}392393bool TextServerExtension::has_feature(Feature p_feature) const {394bool ret = false;395GDVIRTUAL_CALL(_has_feature, p_feature, ret);396return ret;397}398399String TextServerExtension::get_name() const {400String ret = "Unknown";401GDVIRTUAL_CALL(_get_name, ret);402return ret;403}404405int64_t TextServerExtension::get_features() const {406int64_t ret = 0;407GDVIRTUAL_CALL(_get_features, ret);408return ret;409}410411void TextServerExtension::free_rid(const RID &p_rid) {412GDVIRTUAL_CALL(_free_rid, p_rid);413}414415bool TextServerExtension::has(const RID &p_rid) {416bool ret = false;417GDVIRTUAL_CALL(_has, p_rid, ret);418return ret;419}420421bool TextServerExtension::load_support_data(const String &p_filename) {422bool ret = false;423GDVIRTUAL_CALL(_load_support_data, p_filename, ret);424return ret;425}426427String TextServerExtension::get_support_data_filename() const {428String ret;429GDVIRTUAL_CALL(_get_support_data_filename, ret);430return ret;431}432433String TextServerExtension::get_support_data_info() const {434String ret;435GDVIRTUAL_CALL(_get_support_data_info, ret);436return ret;437}438439bool TextServerExtension::save_support_data(const String &p_filename) const {440bool ret = false;441GDVIRTUAL_CALL(_save_support_data, p_filename, ret);442return ret;443}444445PackedByteArray TextServerExtension::get_support_data() const {446PackedByteArray ret;447GDVIRTUAL_CALL(_get_support_data, ret);448return ret;449}450451bool TextServerExtension::is_locale_using_support_data(const String &p_locale) const {452bool ret = false;453GDVIRTUAL_CALL(_is_locale_using_support_data, p_locale, ret);454return ret;455}456457bool TextServerExtension::is_locale_right_to_left(const String &p_locale) const {458bool ret = false;459GDVIRTUAL_CALL(_is_locale_right_to_left, p_locale, ret);460return ret;461}462463int64_t TextServerExtension::name_to_tag(const String &p_name) const {464int64_t ret = 0;465if (GDVIRTUAL_CALL(_name_to_tag, p_name, ret)) {466return ret;467}468return TextServer::name_to_tag(p_name);469}470471String TextServerExtension::tag_to_name(int64_t p_tag) const {472String ret;473if (GDVIRTUAL_CALL(_tag_to_name, p_tag, ret)) {474return ret;475}476return TextServer::tag_to_name(p_tag);477}478479/*************************************************************************/480/* Font */481/*************************************************************************/482483RID TextServerExtension::create_font() {484RID ret;485GDVIRTUAL_CALL(_create_font, ret);486return ret;487}488489RID TextServerExtension::create_font_linked_variation(const RID &p_font_rid) {490RID ret;491GDVIRTUAL_CALL(_create_font_linked_variation, p_font_rid, ret);492return ret;493}494495void TextServerExtension::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {496GDVIRTUAL_CALL(_font_set_data, p_font_rid, p_data);497}498499void TextServerExtension::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {500GDVIRTUAL_CALL(_font_set_data_ptr, p_font_rid, p_data_ptr, p_data_size);501}502503void TextServerExtension::font_set_face_index(const RID &p_font_rid, int64_t p_index) {504GDVIRTUAL_CALL(_font_set_face_index, p_font_rid, p_index);505}506507int64_t TextServerExtension::font_get_face_index(const RID &p_font_rid) const {508int64_t ret = 0;509GDVIRTUAL_CALL(_font_get_face_index, p_font_rid, ret);510return ret;511}512513int64_t TextServerExtension::font_get_face_count(const RID &p_font_rid) const {514int64_t ret = 1;515GDVIRTUAL_CALL(_font_get_face_count, p_font_rid, ret);516return ret;517}518519void TextServerExtension::font_set_style(const RID &p_font_rid, BitField<TextServer::FontStyle> p_style) {520GDVIRTUAL_CALL(_font_set_style, p_font_rid, p_style);521}522523BitField<TextServer::FontStyle> TextServerExtension::font_get_style(const RID &p_font_rid) const {524BitField<TextServer::FontStyle> ret = 0;525GDVIRTUAL_CALL(_font_get_style, p_font_rid, ret);526return ret;527}528529void TextServerExtension::font_set_style_name(const RID &p_font_rid, const String &p_name) {530GDVIRTUAL_CALL(_font_set_style_name, p_font_rid, p_name);531}532533String TextServerExtension::font_get_style_name(const RID &p_font_rid) const {534String ret;535GDVIRTUAL_CALL(_font_get_style_name, p_font_rid, ret);536return ret;537}538539void TextServerExtension::font_set_weight(const RID &p_font_rid, int64_t p_weight) {540GDVIRTUAL_CALL(_font_set_weight, p_font_rid, p_weight);541}542543int64_t TextServerExtension::font_get_weight(const RID &p_font_rid) const {544int64_t ret = 400;545GDVIRTUAL_CALL(_font_get_weight, p_font_rid, ret);546return ret;547}548549void TextServerExtension::font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {550GDVIRTUAL_CALL(_font_set_stretch, p_font_rid, p_stretch);551}552553int64_t TextServerExtension::font_get_stretch(const RID &p_font_rid) const {554int64_t ret = 100;555GDVIRTUAL_CALL(_font_get_stretch, p_font_rid, ret);556return ret;557}558559void TextServerExtension::font_set_name(const RID &p_font_rid, const String &p_name) {560GDVIRTUAL_CALL(_font_set_name, p_font_rid, p_name);561}562563String TextServerExtension::font_get_name(const RID &p_font_rid) const {564String ret;565GDVIRTUAL_CALL(_font_get_name, p_font_rid, ret);566return ret;567}568569Dictionary TextServerExtension::font_get_ot_name_strings(const RID &p_font_rid) const {570Dictionary ret;571GDVIRTUAL_CALL(_font_get_ot_name_strings, p_font_rid, ret);572return ret;573}574575void TextServerExtension::font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {576GDVIRTUAL_CALL(_font_set_antialiasing, p_font_rid, p_antialiasing);577}578579TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(const RID &p_font_rid) const {580TextServer::FontAntialiasing ret = TextServer::FONT_ANTIALIASING_NONE;581GDVIRTUAL_CALL(_font_get_antialiasing, p_font_rid, ret);582return ret;583}584585void TextServerExtension::font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) {586GDVIRTUAL_CALL(_font_set_disable_embedded_bitmaps, p_font_rid, p_disable_embedded_bitmaps);587}588589bool TextServerExtension::font_get_disable_embedded_bitmaps(const RID &p_font_rid) const {590bool ret = false;591GDVIRTUAL_CALL(_font_get_disable_embedded_bitmaps, p_font_rid, ret);592return ret;593}594595void TextServerExtension::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {596GDVIRTUAL_CALL(_font_set_generate_mipmaps, p_font_rid, p_generate_mipmaps);597}598599bool TextServerExtension::font_get_generate_mipmaps(const RID &p_font_rid) const {600bool ret = false;601GDVIRTUAL_CALL(_font_get_generate_mipmaps, p_font_rid, ret);602return ret;603}604605void TextServerExtension::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {606GDVIRTUAL_CALL(_font_set_multichannel_signed_distance_field, p_font_rid, p_msdf);607}608609bool TextServerExtension::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {610bool ret = false;611GDVIRTUAL_CALL(_font_is_multichannel_signed_distance_field, p_font_rid, ret);612return ret;613}614615void TextServerExtension::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {616GDVIRTUAL_CALL(_font_set_msdf_pixel_range, p_font_rid, p_msdf_pixel_range);617}618619int64_t TextServerExtension::font_get_msdf_pixel_range(const RID &p_font_rid) const {620int64_t ret = 0;621GDVIRTUAL_CALL(_font_get_msdf_pixel_range, p_font_rid, ret);622return ret;623}624625void TextServerExtension::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {626GDVIRTUAL_CALL(_font_set_msdf_size, p_font_rid, p_msdf_size);627}628629int64_t TextServerExtension::font_get_msdf_size(const RID &p_font_rid) const {630int64_t ret = 0;631GDVIRTUAL_CALL(_font_get_msdf_size, p_font_rid, ret);632return ret;633}634635void TextServerExtension::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {636GDVIRTUAL_CALL(_font_set_fixed_size, p_font_rid, p_fixed_size);637}638639int64_t TextServerExtension::font_get_fixed_size(const RID &p_font_rid) const {640int64_t ret = 0;641GDVIRTUAL_CALL(_font_get_fixed_size, p_font_rid, ret);642return ret;643}644645void TextServerExtension::font_set_fixed_size_scale_mode(const RID &p_font_rid, TextServer::FixedSizeScaleMode p_fixed_size_scale_mode) {646GDVIRTUAL_CALL(_font_set_fixed_size_scale_mode, p_font_rid, p_fixed_size_scale_mode);647}648649TextServer::FixedSizeScaleMode TextServerExtension::font_get_fixed_size_scale_mode(const RID &p_font_rid) const {650FixedSizeScaleMode ret = FIXED_SIZE_SCALE_DISABLE;651GDVIRTUAL_CALL(_font_get_fixed_size_scale_mode, p_font_rid, ret);652return ret;653}654655void TextServerExtension::font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {656GDVIRTUAL_CALL(_font_set_allow_system_fallback, p_font_rid, p_allow_system_fallback);657}658659bool TextServerExtension::font_is_allow_system_fallback(const RID &p_font_rid) const {660bool ret = false;661GDVIRTUAL_CALL(_font_is_allow_system_fallback, p_font_rid, ret);662return ret;663}664665void TextServerExtension::font_clear_system_fallback_cache() {666GDVIRTUAL_CALL(_font_clear_system_fallback_cache);667}668669void TextServerExtension::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {670GDVIRTUAL_CALL(_font_set_force_autohinter, p_font_rid, p_force_autohinter);671}672673bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const {674bool ret = false;675GDVIRTUAL_CALL(_font_is_force_autohinter, p_font_rid, ret);676return ret;677}678679void TextServerExtension::font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) {680GDVIRTUAL_CALL(_font_set_modulate_color_glyphs, p_font_rid, p_modulate);681}682683bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) const {684bool ret = false;685GDVIRTUAL_CALL(_font_is_modulate_color_glyphs, p_font_rid, ret);686return ret;687}688689void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {690GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);691}692693TextServer::Hinting TextServerExtension::font_get_hinting(const RID &p_font_rid) const {694TextServer::Hinting ret = TextServer::HINTING_NONE;695GDVIRTUAL_CALL(_font_get_hinting, p_font_rid, ret);696return ret;697}698699void TextServerExtension::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {700GDVIRTUAL_CALL(_font_set_subpixel_positioning, p_font_rid, p_subpixel);701}702703TextServer::SubpixelPositioning TextServerExtension::font_get_subpixel_positioning(const RID &p_font_rid) const {704TextServer::SubpixelPositioning ret = TextServer::SUBPIXEL_POSITIONING_DISABLED;705GDVIRTUAL_CALL(_font_get_subpixel_positioning, p_font_rid, ret);706return ret;707}708709void TextServerExtension::font_set_keep_rounding_remainders(const RID &p_font_rid, bool p_keep_rounding_remainders) {710GDVIRTUAL_CALL(_font_set_keep_rounding_remainders, p_font_rid, p_keep_rounding_remainders);711}712713bool TextServerExtension::font_get_keep_rounding_remainders(const RID &p_font_rid) const {714bool ret = true;715GDVIRTUAL_CALL(_font_get_keep_rounding_remainders, p_font_rid, ret);716return ret;717}718719void TextServerExtension::font_set_embolden(const RID &p_font_rid, double p_strength) {720GDVIRTUAL_CALL(_font_set_embolden, p_font_rid, p_strength);721}722723double TextServerExtension::font_get_embolden(const RID &p_font_rid) const {724double ret = 0;725GDVIRTUAL_CALL(_font_get_embolden, p_font_rid, ret);726return ret;727}728729void TextServerExtension::font_set_spacing(const RID &p_font_rid, SpacingType p_spacing, int64_t p_value) {730GDVIRTUAL_CALL(_font_set_spacing, p_font_rid, p_spacing, p_value);731}732733int64_t TextServerExtension::font_get_spacing(const RID &p_font_rid, SpacingType p_spacing) const {734int64_t ret = 0;735GDVIRTUAL_CALL(_font_get_spacing, p_font_rid, p_spacing, ret);736return ret;737}738739void TextServerExtension::font_set_baseline_offset(const RID &p_font_rid, double p_baseline_offset) {740GDVIRTUAL_CALL(_font_set_baseline_offset, p_font_rid, p_baseline_offset);741}742743double TextServerExtension::font_get_baseline_offset(const RID &p_font_rid) const {744double ret = 0.0;745GDVIRTUAL_CALL(_font_get_baseline_offset, p_font_rid, ret);746return ret;747}748749void TextServerExtension::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {750GDVIRTUAL_CALL(_font_set_transform, p_font_rid, p_transform);751}752753Transform2D TextServerExtension::font_get_transform(const RID &p_font_rid) const {754Transform2D ret;755GDVIRTUAL_CALL(_font_get_transform, p_font_rid, ret);756return ret;757}758759void TextServerExtension::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {760GDVIRTUAL_CALL(_font_set_variation_coordinates, p_font_rid, p_variation_coordinates);761}762763Dictionary TextServerExtension::font_get_variation_coordinates(const RID &p_font_rid) const {764Dictionary ret;765GDVIRTUAL_CALL(_font_get_variation_coordinates, p_font_rid, ret);766return ret;767}768769void TextServerExtension::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {770GDVIRTUAL_CALL(_font_set_oversampling, p_font_rid, p_oversampling);771}772773double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {774double ret = -1.0;775GDVIRTUAL_CALL(_font_get_oversampling, p_font_rid, ret);776return ret;777}778779TypedArray<Vector2i> TextServerExtension::font_get_size_cache_list(const RID &p_font_rid) const {780TypedArray<Vector2i> ret;781GDVIRTUAL_CALL(_font_get_size_cache_list, p_font_rid, ret);782return ret;783}784785void TextServerExtension::font_clear_size_cache(const RID &p_font_rid) {786GDVIRTUAL_CALL(_font_clear_size_cache, p_font_rid);787}788789void TextServerExtension::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {790GDVIRTUAL_CALL(_font_remove_size_cache, p_font_rid, p_size);791}792793TypedArray<Dictionary> TextServerExtension::font_get_size_cache_info(const RID &p_font_rid) const {794TypedArray<Dictionary> ret;795GDVIRTUAL_CALL(_font_get_size_cache_info, p_font_rid, ret);796return ret;797}798799void TextServerExtension::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {800GDVIRTUAL_CALL(_font_set_ascent, p_font_rid, p_size, p_ascent);801}802803double TextServerExtension::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {804double ret = 0;805GDVIRTUAL_CALL(_font_get_ascent, p_font_rid, p_size, ret);806return ret;807}808809void TextServerExtension::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {810GDVIRTUAL_CALL(_font_set_descent, p_font_rid, p_size, p_descent);811}812813double TextServerExtension::font_get_descent(const RID &p_font_rid, int64_t p_size) const {814double ret = 0;815GDVIRTUAL_CALL(_font_get_descent, p_font_rid, p_size, ret);816return ret;817}818819void TextServerExtension::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {820GDVIRTUAL_CALL(_font_set_underline_position, p_font_rid, p_size, p_underline_position);821}822823double TextServerExtension::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {824double ret = 0;825GDVIRTUAL_CALL(_font_get_underline_position, p_font_rid, p_size, ret);826return ret;827}828829void TextServerExtension::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {830GDVIRTUAL_CALL(_font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);831}832833double TextServerExtension::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {834double ret = 0;835GDVIRTUAL_CALL(_font_get_underline_thickness, p_font_rid, p_size, ret);836return ret;837}838839void TextServerExtension::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {840GDVIRTUAL_CALL(_font_set_scale, p_font_rid, p_size, p_scale);841}842843double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size) const {844double ret = 0;845GDVIRTUAL_CALL(_font_get_scale, p_font_rid, p_size, ret);846return ret;847}848849int64_t TextServerExtension::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {850int64_t ret = 0;851GDVIRTUAL_CALL(_font_get_texture_count, p_font_rid, p_size, ret);852return ret;853}854855void TextServerExtension::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {856GDVIRTUAL_CALL(_font_clear_textures, p_font_rid, p_size);857}858859void TextServerExtension::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {860GDVIRTUAL_CALL(_font_remove_texture, p_font_rid, p_size, p_texture_index);861}862863void TextServerExtension::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {864GDVIRTUAL_CALL(_font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);865}866867Ref<Image> TextServerExtension::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {868Ref<Image> ret;869GDVIRTUAL_CALL(_font_get_texture_image, p_font_rid, p_size, p_texture_index, ret);870return ret;871}872873void TextServerExtension::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {874GDVIRTUAL_CALL(_font_set_texture_offsets, p_font_rid, p_size, p_texture_index, p_offset);875}876877PackedInt32Array TextServerExtension::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {878PackedInt32Array ret;879GDVIRTUAL_CALL(_font_get_texture_offsets, p_font_rid, p_size, p_texture_index, ret);880return ret;881}882883PackedInt32Array TextServerExtension::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {884PackedInt32Array ret;885GDVIRTUAL_CALL(_font_get_glyph_list, p_font_rid, p_size, ret);886return ret;887}888889void TextServerExtension::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {890GDVIRTUAL_CALL(_font_clear_glyphs, p_font_rid, p_size);891}892893void TextServerExtension::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {894GDVIRTUAL_CALL(_font_remove_glyph, p_font_rid, p_size, p_glyph);895}896897Vector2 TextServerExtension::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {898Vector2 ret;899GDVIRTUAL_CALL(_font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret);900return ret;901}902903void TextServerExtension::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {904GDVIRTUAL_CALL(_font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);905}906907Vector2 TextServerExtension::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {908Vector2 ret;909GDVIRTUAL_CALL(_font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret);910return ret;911}912913void TextServerExtension::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {914GDVIRTUAL_CALL(_font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);915}916917Vector2 TextServerExtension::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {918Vector2 ret;919GDVIRTUAL_CALL(_font_get_glyph_size, p_font_rid, p_size, p_glyph, ret);920return ret;921}922923void TextServerExtension::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {924GDVIRTUAL_CALL(_font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);925}926927Rect2 TextServerExtension::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {928Rect2 ret;929GDVIRTUAL_CALL(_font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret);930return ret;931}932933void TextServerExtension::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {934GDVIRTUAL_CALL(_font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);935}936937int64_t TextServerExtension::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {938int64_t ret = 0;939GDVIRTUAL_CALL(_font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret);940return ret;941}942943void TextServerExtension::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {944GDVIRTUAL_CALL(_font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);945}946947RID TextServerExtension::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {948RID ret;949GDVIRTUAL_CALL(_font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret);950return ret;951}952953Size2 TextServerExtension::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {954Size2 ret;955GDVIRTUAL_CALL(_font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret);956return ret;957}958959Dictionary TextServerExtension::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {960Dictionary ret;961GDVIRTUAL_CALL(_font_get_glyph_contours, p_font_rid, p_size, p_index, ret);962return ret;963}964965TypedArray<Vector2i> TextServerExtension::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {966TypedArray<Vector2i> ret;967GDVIRTUAL_CALL(_font_get_kerning_list, p_font_rid, p_size, ret);968return ret;969}970971void TextServerExtension::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {972GDVIRTUAL_CALL(_font_clear_kerning_map, p_font_rid, p_size);973}974975void TextServerExtension::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {976GDVIRTUAL_CALL(_font_remove_kerning, p_font_rid, p_size, p_glyph_pair);977}978979void TextServerExtension::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {980GDVIRTUAL_CALL(_font_set_kerning, p_font_rid, p_size, p_glyph_pair, p_kerning);981}982983Vector2 TextServerExtension::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {984Vector2 ret;985GDVIRTUAL_CALL(_font_get_kerning, p_font_rid, p_size, p_glyph_pair, ret);986return ret;987}988989int64_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 {990int64_t ret = 0;991GDVIRTUAL_CALL(_font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret);992return ret;993}994995int64_t TextServerExtension::font_get_char_from_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_glyph_index) const {996int64_t ret = 0;997GDVIRTUAL_CALL(_font_get_char_from_glyph_index, p_font_rid, p_size, p_glyph_index, ret);998return ret;999}10001001bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) const {1002bool ret = false;1003GDVIRTUAL_CALL(_font_has_char, p_font_rid, p_char, ret);1004return ret;1005}10061007String TextServerExtension::font_get_supported_chars(const RID &p_font_rid) const {1008String ret;1009GDVIRTUAL_CALL(_font_get_supported_chars, p_font_rid, ret);1010return ret;1011}10121013PackedInt32Array TextServerExtension::font_get_supported_glyphs(const RID &p_font_rid) const {1014PackedInt32Array ret;1015GDVIRTUAL_CALL(_font_get_supported_glyphs, p_font_rid, ret);1016return ret;1017}10181019void TextServerExtension::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {1020GDVIRTUAL_CALL(_font_render_range, p_font_rid, p_size, p_start, p_end);1021}10221023void TextServerExtension::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {1024GDVIRTUAL_CALL(_font_render_glyph, p_font_rid, p_size, p_index);1025}10261027void 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 {1028GDVIRTUAL_CALL(_font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color, p_oversampling);1029#ifndef DISABLE_DEPRECATED1030GDVIRTUAL_CALL(_font_draw_glyph_bind_compat_104872, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);1031#endif1032}10331034void 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 {1035GDVIRTUAL_CALL(_font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color, p_oversampling);1036#ifndef DISABLE_DEPRECATED1037GDVIRTUAL_CALL(_font_draw_glyph_outline_bind_compat_104872, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);1038#endif1039}10401041bool TextServerExtension::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {1042bool ret = false;1043GDVIRTUAL_CALL(_font_is_language_supported, p_font_rid, p_language, ret);1044return ret;1045}10461047void TextServerExtension::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {1048GDVIRTUAL_CALL(_font_set_language_support_override, p_font_rid, p_language, p_supported);1049}10501051bool TextServerExtension::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {1052bool ret = false;1053GDVIRTUAL_CALL(_font_get_language_support_override, p_font_rid, p_language, ret);1054return ret;1055}10561057void TextServerExtension::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {1058GDVIRTUAL_CALL(_font_remove_language_support_override, p_font_rid, p_language);1059}10601061PackedStringArray TextServerExtension::font_get_language_support_overrides(const RID &p_font_rid) {1062PackedStringArray ret;1063GDVIRTUAL_CALL(_font_get_language_support_overrides, p_font_rid, ret);1064return ret;1065}10661067bool TextServerExtension::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {1068bool ret = false;1069GDVIRTUAL_CALL(_font_is_script_supported, p_font_rid, p_script, ret);1070return ret;1071}10721073void TextServerExtension::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {1074GDVIRTUAL_CALL(_font_set_script_support_override, p_font_rid, p_script, p_supported);1075}10761077bool TextServerExtension::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {1078bool ret = false;1079GDVIRTUAL_CALL(_font_get_script_support_override, p_font_rid, p_script, ret);1080return ret;1081}10821083void TextServerExtension::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {1084GDVIRTUAL_CALL(_font_remove_script_support_override, p_font_rid, p_script);1085}10861087PackedStringArray TextServerExtension::font_get_script_support_overrides(const RID &p_font_rid) {1088PackedStringArray ret;1089GDVIRTUAL_CALL(_font_get_script_support_overrides, p_font_rid, ret);1090return ret;1091}10921093void TextServerExtension::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {1094GDVIRTUAL_CALL(_font_set_opentype_feature_overrides, p_font_rid, p_overrides);1095}10961097Dictionary TextServerExtension::font_get_opentype_feature_overrides(const RID &p_font_rid) const {1098Dictionary ret;1099GDVIRTUAL_CALL(_font_get_opentype_feature_overrides, p_font_rid, ret);1100return ret;1101}11021103Dictionary TextServerExtension::font_supported_feature_list(const RID &p_font_rid) const {1104Dictionary ret;1105GDVIRTUAL_CALL(_font_supported_feature_list, p_font_rid, ret);1106return ret;1107}11081109Dictionary TextServerExtension::font_supported_variation_list(const RID &p_font_rid) const {1110Dictionary ret;1111GDVIRTUAL_CALL(_font_supported_variation_list, p_font_rid, ret);1112return ret;1113}11141115#ifndef DISABLE_DEPRECATED1116double TextServerExtension::font_get_global_oversampling() const {1117return 1.0;1118}11191120void TextServerExtension::font_set_global_oversampling(double p_oversampling) {1121// NOP1122}1123#endif11241125void TextServerExtension::reference_oversampling_level(double p_oversampling) {1126GDVIRTUAL_CALL(_reference_oversampling_level, p_oversampling);1127}11281129void TextServerExtension::unreference_oversampling_level(double p_oversampling) {1130GDVIRTUAL_CALL(_unreference_oversampling_level, p_oversampling);1131}11321133Vector2 TextServerExtension::get_hex_code_box_size(int64_t p_size, int64_t p_index) const {1134Vector2 ret;1135if (GDVIRTUAL_CALL(_get_hex_code_box_size, p_size, p_index, ret)) {1136return ret;1137}1138return TextServer::get_hex_code_box_size(p_size, p_index);1139}11401141void 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 {1142if (!GDVIRTUAL_CALL(_draw_hex_code_box, p_canvas, p_size, p_pos, p_index, p_color)) {1143TextServer::draw_hex_code_box(p_canvas, p_size, p_pos, p_index, p_color);1144}1145}11461147/*************************************************************************/1148/* Shaped text buffer interface */1149/*************************************************************************/11501151RID TextServerExtension::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {1152RID ret;1153GDVIRTUAL_CALL(_create_shaped_text, p_direction, p_orientation, ret);1154return ret;1155}11561157void TextServerExtension::shaped_text_clear(const RID &p_shaped) {1158GDVIRTUAL_CALL(_shaped_text_clear, p_shaped);1159}11601161RID TextServerExtension::shaped_text_duplicate(const RID &p_shaped) {1162RID ret;1163GDVIRTUAL_CALL(_shaped_text_duplicate, p_shaped, ret);1164return ret;1165}11661167void TextServerExtension::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {1168GDVIRTUAL_CALL(_shaped_text_set_direction, p_shaped, p_direction);1169}11701171TextServer::Direction TextServerExtension::shaped_text_get_direction(const RID &p_shaped) const {1172TextServer::Direction ret = TextServer::DIRECTION_AUTO;1173GDVIRTUAL_CALL(_shaped_text_get_direction, p_shaped, ret);1174return ret;1175}11761177TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(const RID &p_shaped) const {1178TextServer::Direction ret = TextServer::DIRECTION_LTR;1179GDVIRTUAL_CALL(_shaped_text_get_inferred_direction, p_shaped, ret);1180return ret;1181}11821183void TextServerExtension::shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {1184GDVIRTUAL_CALL(_shaped_text_set_orientation, p_shaped, p_orientation);1185}11861187TextServer::Orientation TextServerExtension::shaped_text_get_orientation(const RID &p_shaped) const {1188TextServer::Orientation ret = TextServer::ORIENTATION_HORIZONTAL;1189GDVIRTUAL_CALL(_shaped_text_get_orientation, p_shaped, ret);1190return ret;1191}11921193void TextServerExtension::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {1194GDVIRTUAL_CALL(_shaped_text_set_bidi_override, p_shaped, p_override);1195}11961197void TextServerExtension::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {1198GDVIRTUAL_CALL(_shaped_text_set_custom_punctuation, p_shaped, p_punct);1199}12001201String TextServerExtension::shaped_text_get_custom_punctuation(const RID &p_shaped) const {1202String ret;1203GDVIRTUAL_CALL(_shaped_text_get_custom_punctuation, p_shaped, ret);1204return ret;1205}12061207void TextServerExtension::shaped_text_set_custom_ellipsis(const RID &p_shaped, int64_t p_char) {1208GDVIRTUAL_CALL(_shaped_text_set_custom_ellipsis, p_shaped, p_char);1209}12101211int64_t TextServerExtension::shaped_text_get_custom_ellipsis(const RID &p_shaped) const {1212int64_t ret = 0;1213GDVIRTUAL_CALL(_shaped_text_get_custom_ellipsis, p_shaped, ret);1214return ret;1215}12161217void TextServerExtension::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {1218GDVIRTUAL_CALL(_shaped_text_set_preserve_invalid, p_shaped, p_enabled);1219}12201221bool TextServerExtension::shaped_text_get_preserve_invalid(const RID &p_shaped) const {1222bool ret = false;1223GDVIRTUAL_CALL(_shaped_text_get_preserve_invalid, p_shaped, ret);1224return ret;1225}12261227void TextServerExtension::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {1228GDVIRTUAL_CALL(_shaped_text_set_preserve_control, p_shaped, p_enabled);1229}12301231bool TextServerExtension::shaped_text_get_preserve_control(const RID &p_shaped) const {1232bool ret = false;1233GDVIRTUAL_CALL(_shaped_text_get_preserve_control, p_shaped, ret);1234return ret;1235}12361237void TextServerExtension::shaped_text_set_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing, int64_t p_value) {1238GDVIRTUAL_CALL(_shaped_text_set_spacing, p_shaped, p_spacing, p_value);1239}12401241int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing) const {1242int64_t ret = 0;1243GDVIRTUAL_CALL(_shaped_text_get_spacing, p_shaped, p_spacing, ret);1244return ret;1245}12461247bool 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) {1248bool ret = false;1249GDVIRTUAL_CALL(_shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret);1250return ret;1251}12521253bool 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) {1254bool ret = false;1255GDVIRTUAL_CALL(_shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, p_baseline, ret);1256return ret;1257}12581259bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, double p_baseline) {1260bool ret = false;1261GDVIRTUAL_CALL(_shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, p_baseline, ret);1262return ret;1263}12641265bool TextServerExtension::shaped_text_has_object(const RID &p_shaped, const Variant &p_key) const {1266bool ret = false;1267GDVIRTUAL_CALL(_shaped_text_has_object, p_shaped, p_key, ret);1268return ret;1269}12701271String TextServerExtension::shaped_get_text(const RID &p_shaped) const {1272String ret;1273GDVIRTUAL_CALL(_shaped_get_text, p_shaped, ret);1274return ret;1275}12761277int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {1278int64_t ret = 0;1279GDVIRTUAL_CALL(_shaped_get_span_count, p_shaped, ret);1280return ret;1281}12821283Variant TextServerExtension::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {1284Variant ret;1285GDVIRTUAL_CALL(_shaped_get_span_meta, p_shaped, p_index, ret);1286return ret;1287}12881289Variant TextServerExtension::shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const {1290Variant ret;1291GDVIRTUAL_CALL(_shaped_get_span_embedded_object, p_shaped, p_index, ret);1292return ret;1293}12941295String TextServerExtension::shaped_get_span_text(const RID &p_shaped, int64_t p_index) const {1296String ret;1297GDVIRTUAL_CALL(_shaped_get_span_text, p_shaped, p_index, ret);1298return ret;1299}13001301Variant TextServerExtension::shaped_get_span_object(const RID &p_shaped, int64_t p_index) const {1302Variant ret = false;1303GDVIRTUAL_CALL(_shaped_get_span_object, p_shaped, p_index, ret);1304return ret;1305}13061307void 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) {1308GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);1309}13101311int64_t TextServerExtension::shaped_get_run_count(const RID &p_shaped) const {1312int64_t ret = 0;1313GDVIRTUAL_CALL(_shaped_get_run_count, p_shaped, ret);1314return ret;1315}13161317String TextServerExtension::shaped_get_run_text(const RID &p_shaped, int64_t p_index) const {1318String ret;1319GDVIRTUAL_CALL(_shaped_get_run_text, p_shaped, p_index, ret);1320return ret;1321}13221323Vector2i TextServerExtension::shaped_get_run_range(const RID &p_shaped, int64_t p_index) const {1324Vector2i ret;1325GDVIRTUAL_CALL(_shaped_get_run_range, p_shaped, p_index, ret);1326return ret;1327}13281329RID TextServerExtension::shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const {1330RID ret;1331GDVIRTUAL_CALL(_shaped_get_run_font_rid, p_shaped, p_index, ret);1332return ret;1333}13341335int TextServerExtension::shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const {1336int ret = 0;1337GDVIRTUAL_CALL(_shaped_get_run_font_size, p_shaped, p_index, ret);1338return ret;1339}13401341String TextServerExtension::shaped_get_run_language(const RID &p_shaped, int64_t p_index) const {1342String ret;1343GDVIRTUAL_CALL(_shaped_get_run_language, p_shaped, p_index, ret);1344return ret;1345}13461347TextServer::Direction TextServerExtension::shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const {1348TextServer::Direction ret = TextServer::DIRECTION_LTR;1349GDVIRTUAL_CALL(_shaped_get_run_direction, p_shaped, p_index, ret);1350return ret;1351}13521353Variant TextServerExtension::shaped_get_run_object(const RID &p_shaped, int64_t p_index) const {1354Variant ret;1355GDVIRTUAL_CALL(_shaped_get_run_object, p_shaped, p_index, ret);1356return ret;1357}13581359RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {1360RID ret;1361GDVIRTUAL_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret);1362return ret;1363}13641365RID TextServerExtension::shaped_text_get_parent(const RID &p_shaped) const {1366RID ret;1367GDVIRTUAL_CALL(_shaped_text_get_parent, p_shaped, ret);1368return ret;1369}13701371double TextServerExtension::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {1372double ret = 0;1373GDVIRTUAL_CALL(_shaped_text_fit_to_width, p_shaped, p_width, p_jst_flags, ret);1374return ret;1375}13761377double TextServerExtension::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {1378double ret = 0;1379GDVIRTUAL_CALL(_shaped_text_tab_align, p_shaped, p_tab_stops, ret);1380return ret;1381}13821383bool TextServerExtension::shaped_text_shape(const RID &p_shaped) {1384bool ret = false;1385GDVIRTUAL_CALL(_shaped_text_shape, p_shaped, ret);1386return ret;1387}13881389bool TextServerExtension::shaped_text_update_breaks(const RID &p_shaped) {1390bool ret = false;1391GDVIRTUAL_CALL(_shaped_text_update_breaks, p_shaped, ret);1392return ret;1393}13941395bool TextServerExtension::shaped_text_update_justification_ops(const RID &p_shaped) {1396bool ret = false;1397GDVIRTUAL_CALL(_shaped_text_update_justification_ops, p_shaped, ret);1398return ret;1399}14001401bool TextServerExtension::shaped_text_is_ready(const RID &p_shaped) const {1402bool ret = false;1403GDVIRTUAL_CALL(_shaped_text_is_ready, p_shaped, ret);1404return ret;1405}14061407const Glyph *TextServerExtension::shaped_text_get_glyphs(const RID &p_shaped) const {1408GDExtensionConstPtr<const Glyph> ret;1409GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, ret);1410return ret;1411}14121413const Glyph *TextServerExtension::shaped_text_sort_logical(const RID &p_shaped) {1414GDExtensionConstPtr<const Glyph> ret;1415GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, ret);1416return ret;1417}14181419int64_t TextServerExtension::shaped_text_get_glyph_count(const RID &p_shaped) const {1420int64_t ret = 0;1421GDVIRTUAL_CALL(_shaped_text_get_glyph_count, p_shaped, ret);1422return ret;1423}14241425Vector2i TextServerExtension::shaped_text_get_range(const RID &p_shaped) const {1426Vector2i ret;1427GDVIRTUAL_CALL(_shaped_text_get_range, p_shaped, ret);1428return ret;1429}14301431PackedInt32Array 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 {1432PackedInt32Array ret;1433if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks_adv, p_shaped, p_width, p_start, p_once, p_break_flags, ret)) {1434return ret;1435}1436return TextServer::shaped_text_get_line_breaks_adv(p_shaped, p_width, p_start, p_once, p_break_flags);1437}14381439PackedInt32Array TextServerExtension::shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start, BitField<TextServer::LineBreakFlag> p_break_flags) const {1440PackedInt32Array ret;1441if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks, p_shaped, p_width, p_start, p_break_flags, ret)) {1442return ret;1443}1444return TextServer::shaped_text_get_line_breaks(p_shaped, p_width, p_start, p_break_flags);1445}14461447PackedInt32Array TextServerExtension::shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags, BitField<TextServer::GraphemeFlag> p_skip_grapheme_flags) const {1448PackedInt32Array ret;1449if (GDVIRTUAL_CALL(_shaped_text_get_word_breaks, p_shaped, p_grapheme_flags, p_skip_grapheme_flags, ret)) {1450return ret;1451}1452return TextServer::shaped_text_get_word_breaks(p_shaped, p_grapheme_flags, p_skip_grapheme_flags);1453}14541455int64_t TextServerExtension::shaped_text_get_trim_pos(const RID &p_shaped) const {1456int64_t ret = -1;1457GDVIRTUAL_CALL(_shaped_text_get_trim_pos, p_shaped, ret);1458return ret;1459}14601461int64_t TextServerExtension::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {1462int64_t ret = -1;1463GDVIRTUAL_CALL(_shaped_text_get_ellipsis_pos, p_shaped, ret);1464return ret;1465}14661467const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {1468GDExtensionConstPtr<const Glyph> ret;1469GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret);1470return ret;1471}14721473int64_t TextServerExtension::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {1474int64_t ret = -1;1475GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyph_count, p_shaped, ret);1476return ret;1477}14781479void TextServerExtension::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {1480GDVIRTUAL_CALL(_shaped_text_overrun_trim_to_width, p_shaped_line, p_width, p_trim_flags);1481}14821483Array TextServerExtension::shaped_text_get_objects(const RID &p_shaped) const {1484Array ret;1485GDVIRTUAL_CALL(_shaped_text_get_objects, p_shaped, ret);1486return ret;1487}14881489Rect2 TextServerExtension::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {1490Rect2 ret;1491GDVIRTUAL_CALL(_shaped_text_get_object_rect, p_shaped, p_key, ret);1492return ret;1493}14941495Vector2i TextServerExtension::shaped_text_get_object_range(const RID &p_shaped, const Variant &p_key) const {1496Vector2i ret;1497GDVIRTUAL_CALL(_shaped_text_get_object_range, p_shaped, p_key, ret);1498return ret;1499}15001501int64_t TextServerExtension::shaped_text_get_object_glyph(const RID &p_shaped, const Variant &p_key) const {1502int64_t ret = -1;1503GDVIRTUAL_CALL(_shaped_text_get_object_glyph, p_shaped, p_key, ret);1504return ret;1505}15061507Size2 TextServerExtension::shaped_text_get_size(const RID &p_shaped) const {1508Size2 ret;1509GDVIRTUAL_CALL(_shaped_text_get_size, p_shaped, ret);1510return ret;1511}15121513double TextServerExtension::shaped_text_get_ascent(const RID &p_shaped) const {1514double ret = 0;1515GDVIRTUAL_CALL(_shaped_text_get_ascent, p_shaped, ret);1516return ret;1517}15181519double TextServerExtension::shaped_text_get_descent(const RID &p_shaped) const {1520double ret = 0;1521GDVIRTUAL_CALL(_shaped_text_get_descent, p_shaped, ret);1522return ret;1523}15241525double TextServerExtension::shaped_text_get_width(const RID &p_shaped) const {1526double ret = 0;1527GDVIRTUAL_CALL(_shaped_text_get_width, p_shaped, ret);1528return ret;1529}15301531double TextServerExtension::shaped_text_get_underline_position(const RID &p_shaped) const {1532double ret = 0;1533GDVIRTUAL_CALL(_shaped_text_get_underline_position, p_shaped, ret);1534return ret;1535}15361537double TextServerExtension::shaped_text_get_underline_thickness(const RID &p_shaped) const {1538double ret = 0;1539GDVIRTUAL_CALL(_shaped_text_get_underline_thickness, p_shaped, ret);1540return ret;1541}15421543TextServer::Direction TextServerExtension::shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const {1544int64_t ret;1545if (GDVIRTUAL_CALL(_shaped_text_get_dominant_direction_in_range, p_shaped, p_start, p_end, ret)) {1546return (TextServer::Direction)ret;1547}1548return TextServer::shaped_text_get_dominant_direction_in_range(p_shaped, p_start, p_end);1549}15501551CaretInfo TextServerExtension::shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const {1552CaretInfo ret;1553if (GDVIRTUAL_CALL(_shaped_text_get_carets, p_shaped, p_position, &ret)) {1554return ret;1555}1556return TextServer::shaped_text_get_carets(p_shaped, p_position);1557}15581559Vector<Vector2> TextServerExtension::shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const {1560Vector<Vector2> ret;1561if (GDVIRTUAL_CALL(_shaped_text_get_selection, p_shaped, p_start, p_end, ret)) {1562return ret;1563}1564return TextServer::shaped_text_get_selection(p_shaped, p_start, p_end);1565}15661567int64_t TextServerExtension::shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const {1568int64_t ret;1569if (GDVIRTUAL_CALL(_shaped_text_hit_test_grapheme, p_shaped, p_coords, ret)) {1570return ret;1571}1572return TextServer::shaped_text_hit_test_grapheme(p_shaped, p_coords);1573}15741575int64_t TextServerExtension::shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const {1576int64_t ret;1577if (GDVIRTUAL_CALL(_shaped_text_hit_test_position, p_shaped, p_coords, ret)) {1578return ret;1579}1580return TextServer::shaped_text_hit_test_position(p_shaped, p_coords);1581}15821583void 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 {1584if (GDVIRTUAL_CALL(_shaped_text_draw, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling)) {1585return;1586}1587#ifndef DISABLE_DEPRECATED1588if (GDVIRTUAL_CALL(_shaped_text_draw_bind_compat_104872, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color)) {1589return;1590}1591#endif1592TextServer::shaped_text_draw(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color, p_oversampling);1593}15941595void 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 {1596if (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)) {1597return;1598}1599#ifndef DISABLE_DEPRECATED1600if (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)) {1601return;1602}1603#endif1604TextServer::shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color, p_oversampling);1605}16061607Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const {1608Vector2 ret;1609if (GDVIRTUAL_CALL(_shaped_text_get_grapheme_bounds, p_shaped, p_pos, ret)) {1610return ret;1611}1612return TextServer::shaped_text_get_grapheme_bounds(p_shaped, p_pos);1613}16141615int64_t TextServerExtension::shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {1616int64_t ret;1617if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {1618return ret;1619}1620return TextServer::shaped_text_next_grapheme_pos(p_shaped, p_pos);1621}16221623int64_t TextServerExtension::shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {1624int64_t ret;1625if (GDVIRTUAL_CALL(_shaped_text_prev_grapheme_pos, p_shaped, p_pos, ret)) {1626return ret;1627}1628return TextServer::shaped_text_prev_grapheme_pos(p_shaped, p_pos);1629}16301631PackedInt32Array TextServerExtension::shaped_text_get_character_breaks(const RID &p_shaped) const {1632PackedInt32Array ret;1633if (GDVIRTUAL_CALL(_shaped_text_get_character_breaks, p_shaped, ret)) {1634return ret;1635}1636return PackedInt32Array();1637}16381639int64_t TextServerExtension::shaped_text_next_character_pos(const RID &p_shaped, int64_t p_pos) const {1640int64_t ret;1641if (GDVIRTUAL_CALL(_shaped_text_next_character_pos, p_shaped, p_pos, ret)) {1642return ret;1643}1644return TextServer::shaped_text_next_character_pos(p_shaped, p_pos);1645}16461647int64_t TextServerExtension::shaped_text_prev_character_pos(const RID &p_shaped, int64_t p_pos) const {1648int64_t ret;1649if (GDVIRTUAL_CALL(_shaped_text_prev_character_pos, p_shaped, p_pos, ret)) {1650return ret;1651}1652return TextServer::shaped_text_prev_character_pos(p_shaped, p_pos);1653}16541655int64_t TextServerExtension::shaped_text_closest_character_pos(const RID &p_shaped, int64_t p_pos) const {1656int64_t ret;1657if (GDVIRTUAL_CALL(_shaped_text_closest_character_pos, p_shaped, p_pos, ret)) {1658return ret;1659}1660return TextServer::shaped_text_closest_character_pos(p_shaped, p_pos);1661}16621663#ifndef DISABLE_DEPRECATED1664String TextServerExtension::format_number(const String &p_string, const String &p_language) const {1665String ret;1666if (GDVIRTUAL_CALL(_format_number, p_string, p_language, ret)) {1667return ret;1668}1669return TextServer::format_number(p_string, p_language);1670}16711672String TextServerExtension::parse_number(const String &p_string, const String &p_language) const {1673String ret;1674if (GDVIRTUAL_CALL(_parse_number, p_string, p_language, ret)) {1675return ret;1676}1677return TextServer::parse_number(p_string, p_language);1678}16791680String TextServerExtension::percent_sign(const String &p_language) const {1681String ret = "%";1682if (GDVIRTUAL_CALL(_percent_sign, p_language, ret)) {1683return ret;1684}1685return TextServer::percent_sign(p_language);1686}1687#endif // DISABLE_DEPRECATED16881689bool TextServerExtension::is_valid_identifier(const String &p_string) const {1690bool ret;1691if (GDVIRTUAL_CALL(_is_valid_identifier, p_string, ret)) {1692return ret;1693}1694return TextServer::is_valid_identifier(p_string);1695}16961697bool TextServerExtension::is_valid_letter(uint64_t p_unicode) const {1698bool ret;1699if (GDVIRTUAL_CALL(_is_valid_letter, p_unicode, ret)) {1700return ret;1701}1702return TextServer::is_valid_letter(p_unicode);1703}17041705String TextServerExtension::strip_diacritics(const String &p_string) const {1706String ret;1707if (GDVIRTUAL_CALL(_strip_diacritics, p_string, ret)) {1708return ret;1709}1710return TextServer::strip_diacritics(p_string);1711}17121713String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const {1714String ret;1715if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) {1716return ret;1717}1718return p_string;1719}17201721String TextServerExtension::string_to_title(const String &p_string, const String &p_language) const {1722String ret;1723if (GDVIRTUAL_CALL(_string_to_title, p_string, p_language, ret)) {1724return ret;1725}1726return p_string;1727}17281729String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const {1730String ret;1731if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) {1732return ret;1733}1734return p_string;1735}17361737TypedArray<Vector3i> TextServerExtension::parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {1738TypedArray<Vector3i> ret;1739if (GDVIRTUAL_CALL(_parse_structured_text, p_parser_type, p_args, p_text, ret)) {1740return ret;1741}1742return TextServer::parse_structured_text(p_parser_type, p_args, p_text);1743}17441745PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_string, const String &p_language, int64_t p_chars_per_line) const {1746PackedInt32Array ret;1747GDVIRTUAL_CALL(_string_get_word_breaks, p_string, p_language, p_chars_per_line, ret);1748return ret;1749}17501751PackedInt32Array TextServerExtension::string_get_character_breaks(const String &p_string, const String &p_language) const {1752PackedInt32Array ret;1753if (GDVIRTUAL_CALL(_string_get_character_breaks, p_string, p_language, ret)) {1754return ret;1755}1756return TextServer::string_get_character_breaks(p_string, p_language);1757}17581759int64_t TextServerExtension::is_confusable(const String &p_string, const PackedStringArray &p_dict) const {1760int64_t ret;1761if (GDVIRTUAL_CALL(_is_confusable, p_string, p_dict, ret)) {1762return ret;1763}1764return TextServer::is_confusable(p_string, p_dict);1765}17661767bool TextServerExtension::spoof_check(const String &p_string) const {1768bool ret;1769if (GDVIRTUAL_CALL(_spoof_check, p_string, ret)) {1770return ret;1771}1772return TextServer::spoof_check(p_string);1773}17741775void TextServerExtension::cleanup() {1776GDVIRTUAL_CALL(_cleanup);1777}17781779TextServerExtension::TextServerExtension() {1780//NOP1781}17821783TextServerExtension::~TextServerExtension() {1784//NOP1785}178617871788