class_textserver.rst 222 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServer.xml.
  6. .. _class_TextServer:
  7. TextServer
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
  11. Interface for the fonts and complex text layouts.
  12. Description
  13. -----------
  14. ``TextServer`` is the API backend for managing fonts, and rendering complex text.
  15. Methods
  16. -------
  17. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>` **(** **)** |
  19. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  21. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| |
  23. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  25. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
  27. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
  29. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  31. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  33. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  35. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  37. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  39. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  41. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  43. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Array<class_Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Array<class_Array>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`Array<class_Array>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`bool<class_bool>` | :ref:`font_is_antialiased<class_TextServer_method_font_is_antialiased>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | void | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | void | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | void | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | void | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`font_render_range<class_TextServer_method_font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`font_set_antialiased<class_TextServer_method_font_set_antialiased>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` antialiased **)** |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`font_set_descent<class_TextServer_method_font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`font_set_scale<class_TextServer_method_font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | void | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | void | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | void | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`Array<class_Array>` | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | void | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`Array<class_Array>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1 **)** |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`Array<class_Array>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | void | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | void | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)** |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)** |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5 **)** |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | void | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | void | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | void | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | void | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | void | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | void | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | void | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`Array<class_Array>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. Enumerations
  381. ------------
  382. .. _enum_TextServer_Direction:
  383. .. _class_TextServer_constant_DIRECTION_AUTO:
  384. .. _class_TextServer_constant_DIRECTION_LTR:
  385. .. _class_TextServer_constant_DIRECTION_RTL:
  386. enum **Direction**:
  387. - **DIRECTION_AUTO** = **0** --- Text direction is determined based on contents and current locale.
  388. - **DIRECTION_LTR** = **1** --- Text is written from left to right.
  389. - **DIRECTION_RTL** = **2** --- Text is written from right to left.
  390. ----
  391. .. _enum_TextServer_Orientation:
  392. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  393. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  394. enum **Orientation**:
  395. - **ORIENTATION_HORIZONTAL** = **0** --- Text is written horizontally.
  396. - **ORIENTATION_VERTICAL** = **1** --- Left to right text is written vertically from top to bottom.
  397. Right to left text is written vertically from bottom to top.
  398. ----
  399. .. _enum_TextServer_JustificationFlag:
  400. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  401. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  402. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  403. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  404. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  405. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  406. flags **JustificationFlag**:
  407. - **JUSTIFICATION_NONE** = **0** --- Do not justify text.
  408. - **JUSTIFICATION_KASHIDA** = **1** --- Justify text by adding and removing kashidas.
  409. - **JUSTIFICATION_WORD_BOUND** = **2** --- Justify text by changing width of the spaces between the words.
  410. - **JUSTIFICATION_TRIM_EDGE_SPACES** = **4** --- Remove trailing and leading spaces from the justified text.
  411. - **JUSTIFICATION_AFTER_LAST_TAB** = **8** --- Only apply justification to the part of the text after the last tab.
  412. - **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = **16** --- Apply justification to the trimmed line with ellipsis.
  413. ----
  414. .. _enum_TextServer_AutowrapMode:
  415. .. _class_TextServer_constant_AUTOWRAP_OFF:
  416. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  417. .. _class_TextServer_constant_AUTOWRAP_WORD:
  418. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  419. enum **AutowrapMode**:
  420. - **AUTOWRAP_OFF** = **0** --- Autowrap is disabled.
  421. - **AUTOWRAP_ARBITRARY** = **1** --- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
  422. - **AUTOWRAP_WORD** = **2** --- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  423. - **AUTOWRAP_WORD_SMART** = **3** --- Behaves similarly to :ref:`AUTOWRAP_WORD<class_TextServer_constant_AUTOWRAP_WORD>`, but force-breaks a word if that single word does not fit in one line.
  424. ----
  425. .. _enum_TextServer_LineBreakFlag:
  426. .. _class_TextServer_constant_BREAK_NONE:
  427. .. _class_TextServer_constant_BREAK_MANDATORY:
  428. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  429. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  430. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  431. flags **LineBreakFlag**:
  432. - **BREAK_NONE** = **0** --- Do not break the line.
  433. - **BREAK_MANDATORY** = **1** --- Break the line at the line mandatory break characters (e.g. ``"\n"``).
  434. - **BREAK_WORD_BOUND** = **2** --- Break the line between the words.
  435. - **BREAK_GRAPHEME_BOUND** = **4** --- Break the line between any unconnected graphemes.
  436. - **BREAK_ADAPTIVE** = **8**
  437. ----
  438. .. _enum_TextServer_VisibleCharactersBehavior:
  439. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  440. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  441. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  442. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  443. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  444. enum **VisibleCharactersBehavior**:
  445. - **VC_CHARS_BEFORE_SHAPING** = **0** --- Trims text before the shaping. e.g, increasing :ref:`Label.visible_characters<class_Label_property_visible_characters>` or :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` value is visually identical to typing the text.
  446. - **VC_CHARS_AFTER_SHAPING** = **1** --- Displays glyphs that are mapped to the first :ref:`Label.visible_characters<class_Label_property_visible_characters>` or :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` characters from the beginning of the text.
  447. - **VC_GLYPHS_AUTO** = **2** --- Displays :ref:`Label.percent_visible<class_Label_property_percent_visible>` or :ref:`RichTextLabel.percent_visible<class_RichTextLabel_property_percent_visible>` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction<class_Control_property_layout_direction>` value.
  448. - **VC_GLYPHS_LTR** = **3** --- Displays :ref:`Label.percent_visible<class_Label_property_percent_visible>` or :ref:`RichTextLabel.percent_visible<class_RichTextLabel_property_percent_visible>` glyphs, starting from the left.
  449. - **VC_GLYPHS_RTL** = **4** --- Displays :ref:`Label.percent_visible<class_Label_property_percent_visible>` or :ref:`RichTextLabel.percent_visible<class_RichTextLabel_property_percent_visible>` glyphs, starting from the right.
  450. ----
  451. .. _enum_TextServer_OverrunBehavior:
  452. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  453. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  454. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  455. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  456. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  457. enum **OverrunBehavior**:
  458. - **OVERRUN_NO_TRIMMING** = **0** --- No text trimming is performed.
  459. - **OVERRUN_TRIM_CHAR** = **1** --- Trims the text per character.
  460. - **OVERRUN_TRIM_WORD** = **2** --- Trims the text per word.
  461. - **OVERRUN_TRIM_ELLIPSIS** = **3** --- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  462. - **OVERRUN_TRIM_WORD_ELLIPSIS** = **4** --- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  463. ----
  464. .. _enum_TextServer_TextOverrunFlag:
  465. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  466. .. _class_TextServer_constant_OVERRUN_TRIM:
  467. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  468. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  469. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  470. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  471. flags **TextOverrunFlag**:
  472. - **OVERRUN_NO_TRIM** = **0** --- No trimming is performed.
  473. - **OVERRUN_TRIM** = **1** --- Trims the text when it exceeds the given width.
  474. - **OVERRUN_TRIM_WORD_ONLY** = **2** --- Trims the text per word instead of per grapheme.
  475. - **OVERRUN_ADD_ELLIPSIS** = **4** --- Determines whether an ellipsis should be added at the end of the text.
  476. - **OVERRUN_ENFORCE_ELLIPSIS** = **8** --- Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  477. - **OVERRUN_JUSTIFICATION_AWARE** = **16**
  478. ----
  479. .. _enum_TextServer_GraphemeFlag:
  480. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  481. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  482. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  483. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  484. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  485. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  486. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  487. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  488. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  489. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  490. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  491. flags **GraphemeFlag**:
  492. - **GRAPHEME_IS_VALID** = **1** --- Grapheme is supported by the font, and can be drawn.
  493. - **GRAPHEME_IS_RTL** = **2** --- Grapheme is part of right-to-left or bottom-to-top run.
  494. - **GRAPHEME_IS_VIRTUAL** = **4** --- Grapheme is not part of source text, it was added by justification process.
  495. - **GRAPHEME_IS_SPACE** = **8** --- Grapheme is whitespace.
  496. - **GRAPHEME_IS_BREAK_HARD** = **16** --- Grapheme is mandatory break point (e.g. ``"\n"``).
  497. - **GRAPHEME_IS_BREAK_SOFT** = **32** --- Grapheme is optional break point (e.g. space).
  498. - **GRAPHEME_IS_TAB** = **64** --- Grapheme is the tabulation character.
  499. - **GRAPHEME_IS_ELONGATION** = **128** --- Grapheme is kashida.
  500. - **GRAPHEME_IS_PUNCTUATION** = **256** --- Grapheme is punctuation character.
  501. - **GRAPHEME_IS_UNDERSCORE** = **512** --- Grapheme is underscore character.
  502. - **GRAPHEME_IS_CONNECTED** = **1024** --- Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  503. ----
  504. .. _enum_TextServer_Hinting:
  505. .. _class_TextServer_constant_HINTING_NONE:
  506. .. _class_TextServer_constant_HINTING_LIGHT:
  507. .. _class_TextServer_constant_HINTING_NORMAL:
  508. enum **Hinting**:
  509. - **HINTING_NONE** = **0** --- Disables font hinting (smoother but less crisp).
  510. - **HINTING_LIGHT** = **1** --- Use the light font hinting mode.
  511. - **HINTING_NORMAL** = **2** --- Use the default font hinting mode (crisper but less smooth).
  512. ----
  513. .. _enum_TextServer_SubpixelPositioning:
  514. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  515. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  516. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  517. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  518. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  519. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  520. enum **SubpixelPositioning**:
  521. - **SUBPIXEL_POSITIONING_DISABLED** = **0** --- Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  522. - **SUBPIXEL_POSITIONING_AUTO** = **1** --- Glyph horizontal position is rounded based on font size.
  523. - To one quarter of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE<class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE>`.
  524. - To one half of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE<class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE>`.
  525. - To the whole pixel size for larger fonts.
  526. - **SUBPIXEL_POSITIONING_ONE_HALF** = **2** --- Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  527. - **SUBPIXEL_POSITIONING_ONE_QUARTER** = **3** --- Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  528. - **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = **20** --- Maximum font size which will use one half of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` mode.
  529. - **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = **16** --- Maximum font size which will use one quarter of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` mode.
  530. ----
  531. .. _enum_TextServer_Feature:
  532. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  533. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  534. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  535. .. _class_TextServer_constant_FEATURE_SHAPING:
  536. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  537. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  538. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  539. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  540. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  541. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  542. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  543. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  544. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  545. enum **Feature**:
  546. - **FEATURE_SIMPLE_LAYOUT** = **1** --- TextServer supports simple text layouts.
  547. - **FEATURE_BIDI_LAYOUT** = **2** --- TextServer supports bidirectional text layouts.
  548. - **FEATURE_VERTICAL_LAYOUT** = **4** --- TextServer supports vertical layouts.
  549. - **FEATURE_SHAPING** = **8** --- TextServer supports complex text shaping.
  550. - **FEATURE_KASHIDA_JUSTIFICATION** = **16** --- TextServer supports justification using kashidas.
  551. - **FEATURE_BREAK_ITERATORS** = **32** --- TextServer supports complex line/word breaking rules (e.g. dictionary based).
  552. - **FEATURE_FONT_BITMAP** = **64** --- TextServer supports loading bitmap fonts.
  553. - **FEATURE_FONT_DYNAMIC** = **128** --- TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  554. - **FEATURE_FONT_MSDF** = **256** --- TextServer supports multichannel signed distance field dynamic font rendering.
  555. - **FEATURE_FONT_SYSTEM** = **512** --- TextServer supports loading system fonts.
  556. - **FEATURE_FONT_VARIABLE** = **1024** --- TextServer supports variable fonts.
  557. - **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = **2048** --- TextServer supports locale dependent and context sensitive case conversion.
  558. - **FEATURE_USE_SUPPORT_DATA** = **4096** --- TextServer require external data file for some features.
  559. ----
  560. .. _enum_TextServer_ContourPointTag:
  561. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  562. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  563. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  564. enum **ContourPointTag**:
  565. - **CONTOUR_CURVE_TAG_ON** = **1** --- Contour point is on the curve.
  566. - **CONTOUR_CURVE_TAG_OFF_CONIC** = **0** --- Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  567. - **CONTOUR_CURVE_TAG_OFF_CUBIC** = **2** --- Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  568. ----
  569. .. _enum_TextServer_SpacingType:
  570. .. _class_TextServer_constant_SPACING_GLYPH:
  571. .. _class_TextServer_constant_SPACING_SPACE:
  572. .. _class_TextServer_constant_SPACING_TOP:
  573. .. _class_TextServer_constant_SPACING_BOTTOM:
  574. .. _class_TextServer_constant_SPACING_MAX:
  575. enum **SpacingType**:
  576. - **SPACING_GLYPH** = **0** --- Spacing for each glyph.
  577. - **SPACING_SPACE** = **1** --- Spacing for the space character.
  578. - **SPACING_TOP** = **2** --- Spacing at the top of the line.
  579. - **SPACING_BOTTOM** = **3** --- Spacing at the bottom of the line.
  580. - **SPACING_MAX** = **4**
  581. ----
  582. .. _enum_TextServer_FontStyle:
  583. .. _class_TextServer_constant_FONT_BOLD:
  584. .. _class_TextServer_constant_FONT_ITALIC:
  585. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  586. flags **FontStyle**:
  587. - **FONT_BOLD** = **1** --- Font is bold.
  588. - **FONT_ITALIC** = **2** --- Font is italic or oblique.
  589. - **FONT_FIXED_WIDTH** = **4** --- Font have fixed-width characters.
  590. ----
  591. .. _enum_TextServer_StructuredTextParser:
  592. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  593. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  594. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  595. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  596. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  597. .. _class_TextServer_constant_STRUCTURED_TEXT_NONE:
  598. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  599. enum **StructuredTextParser**:
  600. - **STRUCTURED_TEXT_DEFAULT** = **0** --- Use default behavior. Same as ``STRUCTURED_TEXT_NONE`` unless specified otherwise in the control description.
  601. - **STRUCTURED_TEXT_URI** = **1** --- BiDi override for URI.
  602. - **STRUCTURED_TEXT_FILE** = **2** --- BiDi override for file path.
  603. - **STRUCTURED_TEXT_EMAIL** = **3** --- BiDi override for email.
  604. - **STRUCTURED_TEXT_LIST** = **4** --- BiDi override for lists.
  605. Structured text options: list separator ``String``.
  606. - **STRUCTURED_TEXT_NONE** = **5** --- Use default Unicode BiDi algorithm.
  607. - **STRUCTURED_TEXT_CUSTOM** = **6** --- User defined structured text BiDi override function.
  608. Method Descriptions
  609. -------------------
  610. .. _class_TextServer_method_create_font:
  611. - :ref:`RID<class_RID>` **create_font** **(** **)**
  612. Creates new, empty font cache entry resource. To free the resulting resourec, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
  613. ----
  614. .. _class_TextServer_method_create_shaped_text:
  615. - :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  616. Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
  617. \ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  618. \ **Note:** Orientation is ignored if server does not support :ref:`FEATURE_VERTICAL_LAYOUT<class_TextServer_constant_FEATURE_VERTICAL_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  619. ----
  620. .. _class_TextServer_method_draw_hex_code_box:
  621. - void **draw_hex_code_box** **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const|
  622. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  623. ----
  624. .. _class_TextServer_method_font_clear_glyphs:
  625. - void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  626. Removes all rendered glyphs information from the cache entry.
  627. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` to remove them manually.
  628. ----
  629. .. _class_TextServer_method_font_clear_kerning_map:
  630. - void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  631. Removes all kerning overrides.
  632. ----
  633. .. _class_TextServer_method_font_clear_size_cache:
  634. - void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  635. Removes all font sizes from the cache entry.
  636. ----
  637. .. _class_TextServer_method_font_clear_textures:
  638. - void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  639. Removes all textures from font cache entry.
  640. \ **Note:** This function will not remove glyphs associated with the texture, use :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` to remove them manually.
  641. ----
  642. .. _class_TextServer_method_font_draw_glyph:
  643. - void **font_draw_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  644. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  645. \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` or :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  646. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  647. ----
  648. .. _class_TextServer_method_font_draw_glyph_outline:
  649. - void **font_draw_glyph_outline** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  650. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  651. \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` or :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  652. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  653. ----
  654. .. _class_TextServer_method_font_get_ascent:
  655. - :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  656. Returns the font ascent (number of pixels above the baseline).
  657. ----
  658. .. _class_TextServer_method_font_get_descent:
  659. - :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  660. Returns the font descent (number of pixels below the baseline).
  661. ----
  662. .. _class_TextServer_method_font_get_embolden:
  663. - :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  664. Returns font embolden strength.
  665. ----
  666. .. _class_TextServer_method_font_get_face_count:
  667. - :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  668. Returns number of faces in the TrueType / OpenType collection.
  669. ----
  670. .. _class_TextServer_method_font_get_face_index:
  671. - :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  672. Recturns an active face index in the TrueType / OpenType collection.
  673. ----
  674. .. _class_TextServer_method_font_get_fixed_size:
  675. - :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  676. Returns bitmap font fixed size.
  677. ----
  678. .. _class_TextServer_method_font_get_generate_mipmaps:
  679. - :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  680. Returns ``true`` if font texture mipmap generation is enabled.
  681. ----
  682. .. _class_TextServer_method_font_get_global_oversampling:
  683. - :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  684. Returns the font oversampling factor, shared by all fonts in the TextServer.
  685. ----
  686. .. _class_TextServer_method_font_get_glyph_advance:
  687. - :ref:`Vector2<class_Vector2>` **font_get_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const|
  688. Returns glyph advance (offset of the next glyph).
  689. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  690. ----
  691. .. _class_TextServer_method_font_get_glyph_contours:
  692. - :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  693. Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
  694. \ ``points`` - :ref:`PackedVector3Array<class_PackedVector3Array>`, containing outline points. ``x`` and ``y`` are point coordinates. ``z`` is the type of the point, using the :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` values.
  695. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  696. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  697. ----
  698. .. _class_TextServer_method_font_get_glyph_index:
  699. - :ref:`int<class_int>` **font_get_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const|
  700. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``.
  701. ----
  702. .. _class_TextServer_method_font_get_glyph_list:
  703. - :ref:`Array<class_Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  704. Returns list of rendered glyphs in the cache entry.
  705. ----
  706. .. _class_TextServer_method_font_get_glyph_offset:
  707. - :ref:`Vector2<class_Vector2>` **font_get_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  708. Returns glyph offset from the baseline.
  709. ----
  710. .. _class_TextServer_method_font_get_glyph_size:
  711. - :ref:`Vector2<class_Vector2>` **font_get_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  712. Returns size of the glyph.
  713. ----
  714. .. _class_TextServer_method_font_get_glyph_texture_idx:
  715. - :ref:`int<class_int>` **font_get_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  716. Returns index of the cache texture containing the glyph.
  717. ----
  718. .. _class_TextServer_method_font_get_glyph_texture_rid:
  719. - :ref:`RID<class_RID>` **font_get_glyph_texture_rid** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  720. Returns resource id of the cache texture containing the glyph.
  721. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  722. ----
  723. .. _class_TextServer_method_font_get_glyph_texture_size:
  724. - :ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  725. Returns size of the cache texture containing the glyph.
  726. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  727. ----
  728. .. _class_TextServer_method_font_get_glyph_uv_rect:
  729. - :ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  730. Returns rectangle in the cache texture containing the glyph.
  731. ----
  732. .. _class_TextServer_method_font_get_hinting:
  733. - :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  734. Returns the font hinting mode. Used by dynamic fonts only.
  735. ----
  736. .. _class_TextServer_method_font_get_kerning:
  737. - :ref:`Vector2<class_Vector2>` **font_get_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const|
  738. Returns kerning for the pair of glyphs.
  739. ----
  740. .. _class_TextServer_method_font_get_kerning_list:
  741. - :ref:`Array<class_Array>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  742. Returns list of the kerning overrides.
  743. ----
  744. .. _class_TextServer_method_font_get_language_support_override:
  745. - :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  746. Returns ``true`` if support override is enabled for the ``language``.
  747. ----
  748. .. _class_TextServer_method_font_get_language_support_overrides:
  749. - :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  750. Returns list of language support overrides.
  751. ----
  752. .. _class_TextServer_method_font_get_msdf_pixel_range:
  753. - :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  754. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  755. ----
  756. .. _class_TextServer_method_font_get_msdf_size:
  757. - :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  758. Returns source font size used to generate MSDF textures.
  759. ----
  760. .. _class_TextServer_method_font_get_name:
  761. - :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  762. Returns font family name.
  763. ----
  764. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  765. - :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  766. Returns font OpenType feature set override.
  767. ----
  768. .. _class_TextServer_method_font_get_oversampling:
  769. - :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  770. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  771. ----
  772. .. _class_TextServer_method_font_get_scale:
  773. - :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  774. Returns scaling factor of the color bitmap font.
  775. ----
  776. .. _class_TextServer_method_font_get_script_support_override:
  777. - :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  778. Returns ``true`` if support override is enabled for the ``script``.
  779. ----
  780. .. _class_TextServer_method_font_get_script_support_overrides:
  781. - :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  782. Returns list of script support overrides.
  783. ----
  784. .. _class_TextServer_method_font_get_size_cache_list:
  785. - :ref:`Array<class_Array>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  786. Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
  787. ----
  788. .. _class_TextServer_method_font_get_style:
  789. - :ref:`FontStyle<enum_TextServer_FontStyle>` **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  790. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  791. ----
  792. .. _class_TextServer_method_font_get_style_name:
  793. - :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  794. Returns font style name.
  795. ----
  796. .. _class_TextServer_method_font_get_subpixel_positioning:
  797. - :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  798. Returns font sub-pixel glyph positioning mode.
  799. ----
  800. .. _class_TextServer_method_font_get_supported_chars:
  801. - :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  802. Returns a string containing all the characters available in the font.
  803. ----
  804. .. _class_TextServer_method_font_get_texture_count:
  805. - :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  806. Returns number of textures used by font cache entry.
  807. ----
  808. .. _class_TextServer_method_font_get_texture_image:
  809. - :ref:`Image<class_Image>` **font_get_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  810. Returns font cache texture image data.
  811. ----
  812. .. _class_TextServer_method_font_get_texture_offsets:
  813. - :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  814. Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
  815. ----
  816. .. _class_TextServer_method_font_get_transform:
  817. - :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  818. Returns 2D transform applied to the font outlines.
  819. ----
  820. .. _class_TextServer_method_font_get_underline_position:
  821. - :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  822. Returns pixel offset of the underline below the baseline.
  823. ----
  824. .. _class_TextServer_method_font_get_underline_thickness:
  825. - :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  826. Returns thickness of the underline in pixels.
  827. ----
  828. .. _class_TextServer_method_font_get_variation_coordinates:
  829. - :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  830. Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` for more info.
  831. ----
  832. .. _class_TextServer_method_font_has_char:
  833. - :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  834. Returns ``true`` if a Unicode ``char`` is available in the font.
  835. ----
  836. .. _class_TextServer_method_font_is_antialiased:
  837. - :ref:`bool<class_bool>` **font_is_antialiased** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  838. Returns ``true`` if font 8-bit anitialiased glyph rendering is supported and enabled.
  839. ----
  840. .. _class_TextServer_method_font_is_force_autohinter:
  841. - :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  842. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  843. ----
  844. .. _class_TextServer_method_font_is_language_supported:
  845. - :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  846. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  847. ----
  848. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  849. - :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  850. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  851. ----
  852. .. _class_TextServer_method_font_is_script_supported:
  853. - :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  854. Returns ``true``, if font supports given script (ISO 15924 code).
  855. ----
  856. .. _class_TextServer_method_font_remove_glyph:
  857. - void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  858. Removes specified rendered glyph information from the cache entry.
  859. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` to remove them manually.
  860. ----
  861. .. _class_TextServer_method_font_remove_kerning:
  862. - void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  863. Removes kerning override for the pair of glyphs.
  864. ----
  865. .. _class_TextServer_method_font_remove_language_support_override:
  866. - void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  867. Remove language support override.
  868. ----
  869. .. _class_TextServer_method_font_remove_script_support_override:
  870. - void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  871. Removes script support override.
  872. ----
  873. .. _class_TextServer_method_font_remove_size_cache:
  874. - void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  875. Removes specified font size from the cache entry.
  876. ----
  877. .. _class_TextServer_method_font_remove_texture:
  878. - void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  879. Removes specified texture from the cache entry.
  880. \ **Note:** This function will not remove glyphs associated with the texture, remove them manually, using :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>`.
  881. ----
  882. .. _class_TextServer_method_font_render_glyph:
  883. - void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  884. Renders specified glyph to the font cache texture.
  885. ----
  886. .. _class_TextServer_method_font_render_range:
  887. - void **font_render_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)**
  888. Renders the range of characters to the font cache texture.
  889. ----
  890. .. _class_TextServer_method_font_set_antialiased:
  891. - void **font_set_antialiased** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` antialiased **)**
  892. If set to ``true``, 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
  893. ----
  894. .. _class_TextServer_method_font_set_ascent:
  895. - void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  896. Sets the font ascent (number of pixels above the baseline).
  897. ----
  898. .. _class_TextServer_method_font_set_data:
  899. - void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  900. Sets font source data, e.g contents of the dynamic font source file.
  901. ----
  902. .. _class_TextServer_method_font_set_descent:
  903. - void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  904. Sets the font descent (number of pixels below the baseline).
  905. ----
  906. .. _class_TextServer_method_font_set_embolden:
  907. - void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  908. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  909. ----
  910. .. _class_TextServer_method_font_set_face_index:
  911. - void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  912. Sets an active face index in the TrueType / OpenType collection.
  913. ----
  914. .. _class_TextServer_method_font_set_fixed_size:
  915. - void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  916. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  917. ----
  918. .. _class_TextServer_method_font_set_force_autohinter:
  919. - void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  920. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  921. ----
  922. .. _class_TextServer_method_font_set_generate_mipmaps:
  923. - void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  924. If set to ``true`` font texture mipmap generation is enabled.
  925. ----
  926. .. _class_TextServer_method_font_set_global_oversampling:
  927. - void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  928. Sets oversampling factor, shared by all font in the TextServer.
  929. \ **Note:** This value can be automatically changed by display server.
  930. ----
  931. .. _class_TextServer_method_font_set_glyph_advance:
  932. - void **font_set_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)**
  933. Sets glyph advance (offset of the next glyph).
  934. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  935. ----
  936. .. _class_TextServer_method_font_set_glyph_offset:
  937. - void **font_set_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)**
  938. Sets glyph offset from the baseline.
  939. ----
  940. .. _class_TextServer_method_font_set_glyph_size:
  941. - void **font_set_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)**
  942. Sets size of the glyph.
  943. ----
  944. .. _class_TextServer_method_font_set_glyph_texture_idx:
  945. - void **font_set_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)**
  946. Sets index of the cache texture containing the glyph.
  947. ----
  948. .. _class_TextServer_method_font_set_glyph_uv_rect:
  949. - void **font_set_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)**
  950. Sets rectangle in the cache texture containing the glyph.
  951. ----
  952. .. _class_TextServer_method_font_set_hinting:
  953. - void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  954. Sets font hinting mode. Used by dynamic fonts only.
  955. ----
  956. .. _class_TextServer_method_font_set_kerning:
  957. - void **font_set_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)**
  958. Sets kerning for the pair of glyphs.
  959. ----
  960. .. _class_TextServer_method_font_set_language_support_override:
  961. - void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  962. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  963. ----
  964. .. _class_TextServer_method_font_set_msdf_pixel_range:
  965. - void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  966. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  967. ----
  968. .. _class_TextServer_method_font_set_msdf_size:
  969. - void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  970. Sets source font size used to generate MSDF textures.
  971. ----
  972. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  973. - void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  974. If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
  975. \ **Note:** MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
  976. ----
  977. .. _class_TextServer_method_font_set_name:
  978. - void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  979. Sets the font family name.
  980. ----
  981. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  982. - void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  983. Sets font OpenType feature set override.
  984. ----
  985. .. _class_TextServer_method_font_set_oversampling:
  986. - void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  987. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  988. ----
  989. .. _class_TextServer_method_font_set_scale:
  990. - void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  991. Sets scaling factor of the color bitmap font.
  992. ----
  993. .. _class_TextServer_method_font_set_script_support_override:
  994. - void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  995. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  996. ----
  997. .. _class_TextServer_method_font_set_style:
  998. - void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)**
  999. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1000. ----
  1001. .. _class_TextServer_method_font_set_style_name:
  1002. - void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1003. Sets the font style name.
  1004. ----
  1005. .. _class_TextServer_method_font_set_subpixel_positioning:
  1006. - void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1007. Sets font sub-pixel glyph positioning mode.
  1008. ----
  1009. .. _class_TextServer_method_font_set_texture_image:
  1010. - void **font_set_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)**
  1011. Sets font cache texture image data.
  1012. ----
  1013. .. _class_TextServer_method_font_set_texture_offsets:
  1014. - void **font_set_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)**
  1015. Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
  1016. ----
  1017. .. _class_TextServer_method_font_set_transform:
  1018. - void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1019. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1020. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1021. ----
  1022. .. _class_TextServer_method_font_set_underline_position:
  1023. - void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1024. Sets pixel offset of the underline below the baseline.
  1025. ----
  1026. .. _class_TextServer_method_font_set_underline_thickness:
  1027. - void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1028. Sets thickness of the underline in pixels.
  1029. ----
  1030. .. _class_TextServer_method_font_set_variation_coordinates:
  1031. - void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1032. Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` for more info.
  1033. ----
  1034. .. _class_TextServer_method_font_supported_feature_list:
  1035. - :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1036. Returns the dictionary of the supported OpenType features.
  1037. ----
  1038. .. _class_TextServer_method_font_supported_variation_list:
  1039. - :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1040. Returns the dictionary of the supported OpenType variation coordinates.
  1041. ----
  1042. .. _class_TextServer_method_format_number:
  1043. - :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1044. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1045. ----
  1046. .. _class_TextServer_method_free_rid:
  1047. - void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1048. Frees an object created by this ``TextServer``.
  1049. ----
  1050. .. _class_TextServer_method_get_features:
  1051. - :ref:`int<class_int>` **get_features** **(** **)** |const|
  1052. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1053. ----
  1054. .. _class_TextServer_method_get_hex_code_box_size:
  1055. - :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1056. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1057. ----
  1058. .. _class_TextServer_method_get_name:
  1059. - :ref:`String<class_String>` **get_name** **(** **)** |const|
  1060. Returns the name of the server interface.
  1061. ----
  1062. .. _class_TextServer_method_get_support_data_filename:
  1063. - :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1064. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1065. ----
  1066. .. _class_TextServer_method_get_support_data_info:
  1067. - :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1068. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1069. ----
  1070. .. _class_TextServer_method_has:
  1071. - :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1072. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1073. ----
  1074. .. _class_TextServer_method_has_feature:
  1075. - :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1076. Returns ``true`` if the server supports a feature.
  1077. ----
  1078. .. _class_TextServer_method_is_locale_right_to_left:
  1079. - :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1080. Returns ``true`` if locale is right-to-left.
  1081. ----
  1082. .. _class_TextServer_method_load_support_data:
  1083. - :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1084. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1085. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1086. ----
  1087. .. _class_TextServer_method_name_to_tag:
  1088. - :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1089. Converts readable feature, variation, script or language name to OpenType tag.
  1090. ----
  1091. .. _class_TextServer_method_parse_number:
  1092. - :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1093. Converts a number from the numeral systems used in ``language`` to Western Arabic (0..9).
  1094. ----
  1095. .. _class_TextServer_method_parse_structured_text:
  1096. - :ref:`Array<class_Array>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const|
  1097. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1098. ----
  1099. .. _class_TextServer_method_percent_sign:
  1100. - :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1101. Returns percent sign used in the ``language``.
  1102. ----
  1103. .. _class_TextServer_method_save_support_data:
  1104. - :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1105. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1106. \ **Note:** This function is used by during project export, to include TextServer database.
  1107. ----
  1108. .. _class_TextServer_method_shaped_get_span_count:
  1109. - :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1110. Returns number of text spans added using :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` or :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`.
  1111. ----
  1112. .. _class_TextServer_method_shaped_get_span_meta:
  1113. - :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1114. Returns text span metadata.
  1115. ----
  1116. .. _class_TextServer_method_shaped_set_span_update_font:
  1117. - void **shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`Array<class_Array>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)**
  1118. Changes text span font, font size and OpenType features, without changing the text.
  1119. ----
  1120. .. _class_TextServer_method_shaped_text_add_object:
  1121. - :ref:`bool<class_bool>` **shaped_text_add_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1 **)**
  1122. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1123. ----
  1124. .. _class_TextServer_method_shaped_text_add_string:
  1125. - :ref:`bool<class_bool>` **shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`Array<class_Array>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)**
  1126. Adds text span and font to draw it to the text buffer.
  1127. ----
  1128. .. _class_TextServer_method_shaped_text_clear:
  1129. - void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1130. Clears text buffer (removes text and inline objects).
  1131. ----
  1132. .. _class_TextServer_method_shaped_text_draw:
  1133. - void **shaped_text_draw** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1134. Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
  1135. ----
  1136. .. _class_TextServer_method_shaped_text_draw_outline:
  1137. - void **shaped_text_draw_outline** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1138. Draw the outline of the shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
  1139. ----
  1140. .. _class_TextServer_method_shaped_text_fit_to_width:
  1141. - :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)**
  1142. Adjusts text with to fit to specified width, returns new text width.
  1143. ----
  1144. .. _class_TextServer_method_shaped_text_get_ascent:
  1145. - :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1146. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1147. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1148. ----
  1149. .. _class_TextServer_method_shaped_text_get_carets:
  1150. - :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1151. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1152. ----
  1153. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1154. - :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1155. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1156. ----
  1157. .. _class_TextServer_method_shaped_text_get_descent:
  1158. - :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1159. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1160. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1161. ----
  1162. .. _class_TextServer_method_shaped_text_get_direction:
  1163. - :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1164. Returns direction of the text.
  1165. ----
  1166. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1167. - :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1168. Returns dominant direction of in the range of text.
  1169. ----
  1170. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1171. - :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1172. Returns number of glyphs in the ellipsis.
  1173. ----
  1174. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1175. - :ref:`Array<class_Array>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1176. Returns array of the glyphs in the ellipsis.
  1177. ----
  1178. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1179. - :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1180. Returns position of the ellipsis.
  1181. ----
  1182. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1183. - :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1184. Returns number of glyphs in the buffer.
  1185. ----
  1186. .. _class_TextServer_method_shaped_text_get_glyphs:
  1187. - :ref:`Array<class_Array>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1188. Returns an array of glyphs in the visual order.
  1189. ----
  1190. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1191. - :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1192. Returns composite character's bounds as offsets from the start of the line.
  1193. ----
  1194. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1195. - :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1196. Returns direction of the text, inferred by the BiDi algorithm.
  1197. ----
  1198. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1199. - :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1200. Breaks text to the lines and returns character ranges for each line.
  1201. ----
  1202. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1203. - :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1204. Breaks text to the lines and columns. Returns character ranges for each segment.
  1205. ----
  1206. .. _class_TextServer_method_shaped_text_get_object_rect:
  1207. - :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1208. Returns bounding rectangle of the inline object.
  1209. ----
  1210. .. _class_TextServer_method_shaped_text_get_objects:
  1211. - :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1212. Returns array of inline objects.
  1213. ----
  1214. .. _class_TextServer_method_shaped_text_get_orientation:
  1215. - :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1216. Returns text orientation.
  1217. ----
  1218. .. _class_TextServer_method_shaped_text_get_parent:
  1219. - :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1220. Returns the parent buffer from which the substring originates.
  1221. ----
  1222. .. _class_TextServer_method_shaped_text_get_preserve_control:
  1223. - :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1224. Returns ``true`` if text buffer is configured to display control characters.
  1225. ----
  1226. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  1227. - :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1228. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  1229. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  1230. ----
  1231. .. _class_TextServer_method_shaped_text_get_range:
  1232. - :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1233. Returns substring buffer character range in the parent buffer.
  1234. ----
  1235. .. _class_TextServer_method_shaped_text_get_selection:
  1236. - :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1237. Returns selection rectangles for the specified character range.
  1238. ----
  1239. .. _class_TextServer_method_shaped_text_get_size:
  1240. - :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1241. Returns size of the text.
  1242. ----
  1243. .. _class_TextServer_method_shaped_text_get_spacing:
  1244. - :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1245. Returns extra spacing added between glyphs or lines in pixels.
  1246. ----
  1247. .. _class_TextServer_method_shaped_text_get_trim_pos:
  1248. - :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1249. Returns the position of the overrun trim.
  1250. ----
  1251. .. _class_TextServer_method_shaped_text_get_underline_position:
  1252. - :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1253. Returns pixel offset of the underline below the baseline.
  1254. ----
  1255. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  1256. - :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1257. Returns thickness of the underline.
  1258. ----
  1259. .. _class_TextServer_method_shaped_text_get_width:
  1260. - :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1261. Returns width (for horizontal layout) or height (for vertical) of the text.
  1262. ----
  1263. .. _class_TextServer_method_shaped_text_get_word_breaks:
  1264. - :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const|
  1265. Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`).
  1266. ----
  1267. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  1268. - :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1269. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  1270. ----
  1271. .. _class_TextServer_method_shaped_text_hit_test_position:
  1272. - :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1273. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  1274. ----
  1275. .. _class_TextServer_method_shaped_text_is_ready:
  1276. - :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1277. Returns ``true`` if buffer is successfully shaped.
  1278. ----
  1279. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  1280. - :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1281. Returns composite character end position closest to the ``pos``.
  1282. ----
  1283. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  1284. - void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)**
  1285. Trims text if it exceeds the given width.
  1286. ----
  1287. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  1288. - :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1289. Returns composite character start position closest to the ``pos``.
  1290. ----
  1291. .. _class_TextServer_method_shaped_text_resize_object:
  1292. - :ref:`bool<class_bool>` **shaped_text_resize_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5 **)**
  1293. Sets new size and alignment of embedded object.
  1294. ----
  1295. .. _class_TextServer_method_shaped_text_set_bidi_override:
  1296. - void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  1297. Overrides BiDi for the structured text.
  1298. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  1299. ----
  1300. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  1301. - void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  1302. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1303. ----
  1304. .. _class_TextServer_method_shaped_text_set_direction:
  1305. - void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  1306. Sets desired text direction. If set to ``TEXT_DIRECTION_AUTO``, direction will be detected based on the buffer contents and current locale.
  1307. \ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  1308. ----
  1309. .. _class_TextServer_method_shaped_text_set_orientation:
  1310. - void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  1311. Sets desired text orientation.
  1312. \ **Note:** Orientation is ignored if server does not support :ref:`FEATURE_VERTICAL_LAYOUT<class_TextServer_constant_FEATURE_VERTICAL_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  1313. ----
  1314. .. _class_TextServer_method_shaped_text_set_preserve_control:
  1315. - void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  1316. If set to ``true`` text buffer will display control characters.
  1317. ----
  1318. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  1319. - void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  1320. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  1321. ----
  1322. .. _class_TextServer_method_shaped_text_set_spacing:
  1323. - void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  1324. Sets extra spacing added between glyphs or lines in pixels.
  1325. ----
  1326. .. _class_TextServer_method_shaped_text_shape:
  1327. - :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  1328. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  1329. \ **Note:** It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
  1330. ----
  1331. .. _class_TextServer_method_shaped_text_sort_logical:
  1332. - :ref:`Array<class_Array>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  1333. Returns text glyphs in the logical order.
  1334. ----
  1335. .. _class_TextServer_method_shaped_text_substr:
  1336. - :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  1337. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  1338. ----
  1339. .. _class_TextServer_method_shaped_text_tab_align:
  1340. - :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  1341. Aligns shaped text to the given tab-stops.
  1342. ----
  1343. .. _class_TextServer_method_string_get_word_breaks:
  1344. - :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  1345. Returns array of the word break character offsets.
  1346. ----
  1347. .. _class_TextServer_method_string_to_lower:
  1348. - :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  1349. Returns the string converted to lowercase.
  1350. \ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  1351. \ **Note:** The result may be longer or shorter than the original.
  1352. ----
  1353. .. _class_TextServer_method_string_to_upper:
  1354. - :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  1355. Returns the string converted to uppercase.
  1356. \ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  1357. \ **Note:** The result may be longer or shorter than the original.
  1358. ----
  1359. .. _class_TextServer_method_strip_diacritics:
  1360. - :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  1361. Strips diacritics from the string.
  1362. \ **Note:** The result may be longer or shorter than the original.
  1363. ----
  1364. .. _class_TextServer_method_tag_to_name:
  1365. - :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  1366. Converts OpenType tag to readable feature, variation, script or language name.
  1367. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1368. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1369. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1370. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1371. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1372. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`