text_server_extension.cpp 67 KB

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