text_server_extension.cpp 68 KB

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