class_textserver.rst 263 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/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. A server interface for font management and text rendering.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **TextServer** is the API backend for managing fonts and rendering text.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>` **(** **)** |
  23. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :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 **)** |
  25. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | 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| |
  27. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  29. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
  31. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
  33. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  35. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | 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| |
  37. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | 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| |
  39. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  41. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :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| |
  43. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :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| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :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| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :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| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :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| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :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| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :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| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :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| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :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| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :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| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :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| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :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| |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :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 **)** |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :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| |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :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| |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :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| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :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 **)** |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :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| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :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| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :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| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :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| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :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| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :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| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :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| |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :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| |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :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| |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | 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 **)** |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | 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 **)** |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | 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 **)** |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | 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 **)** |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | 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 **)** |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | 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 **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | 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 **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | 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 **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | 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 **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | 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 **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | 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 **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | 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 **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | 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 **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | 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 **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | 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 **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | 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 **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | 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 **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | 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 **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | 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 **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | 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 **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | 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 **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | 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 **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | 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 **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | 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 **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | 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 **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | 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 **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | 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 **)** |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | 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 **)** |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | 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 **)** |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | 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 **)** |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | 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 **)** |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | 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 **)** |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :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| |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`Vector3i[]<class_Vector3i>` | :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| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :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| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | 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:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :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, :ref:`float<class_float>` baseline=0.0 **)** |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :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:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | 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| |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | 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| |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :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 **)** |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :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| |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :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| |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :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| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :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| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :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| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :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| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :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| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :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| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :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| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :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| |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :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| |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :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| |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :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| |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :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| |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | 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 **)** |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :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| |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :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, :ref:`float<class_float>` baseline=0.0 **)** |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | 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 **)** |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | 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 **)** |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | 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 **)** |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | 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 **)** |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | 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 **)** |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | 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 **)** |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | 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 **)** |
  381. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  383. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  385. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :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| |
  387. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :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 **)** |
  389. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
  391. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :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="", :ref:`int<class_int>` chars_per_line=0 **)** |const| |
  393. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :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| |
  395. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :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| |
  397. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  399. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  401. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. .. rst-class:: classref-section-separator
  403. ----
  404. .. rst-class:: classref-descriptions-group
  405. Enumerations
  406. ------------
  407. .. _enum_TextServer_FontAntialiasing:
  408. .. rst-class:: classref-enumeration
  409. enum **FontAntialiasing**:
  410. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  413. Font glyphs are rasterized as 1-bit bitmaps.
  414. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  415. .. rst-class:: classref-enumeration-constant
  416. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  417. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  418. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  419. .. rst-class:: classref-enumeration-constant
  420. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  421. Font glyphs are rasterized for LCD screens.
  422. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  423. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  424. .. rst-class:: classref-item-separator
  425. ----
  426. .. _enum_TextServer_FontLCDSubpixelLayout:
  427. .. rst-class:: classref-enumeration
  428. enum **FontLCDSubpixelLayout**:
  429. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  430. .. rst-class:: classref-enumeration-constant
  431. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  432. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  433. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  434. .. rst-class:: classref-enumeration-constant
  435. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  436. Horizontal RGB subpixel layout.
  437. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  438. .. rst-class:: classref-enumeration-constant
  439. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  440. Horizontal BGR subpixel layout.
  441. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  442. .. rst-class:: classref-enumeration-constant
  443. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  444. Vertical RGB subpixel layout.
  445. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  446. .. rst-class:: classref-enumeration-constant
  447. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  448. Vertical BGR subpixel layout.
  449. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  450. .. rst-class:: classref-enumeration-constant
  451. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _enum_TextServer_Direction:
  455. .. rst-class:: classref-enumeration
  456. enum **Direction**:
  457. .. _class_TextServer_constant_DIRECTION_AUTO:
  458. .. rst-class:: classref-enumeration-constant
  459. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  460. Text direction is determined based on contents and current locale.
  461. .. _class_TextServer_constant_DIRECTION_LTR:
  462. .. rst-class:: classref-enumeration-constant
  463. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  464. Text is written from left to right.
  465. .. _class_TextServer_constant_DIRECTION_RTL:
  466. .. rst-class:: classref-enumeration-constant
  467. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  468. Text is written from right to left.
  469. .. _class_TextServer_constant_DIRECTION_INHERITED:
  470. .. rst-class:: classref-enumeration-constant
  471. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  472. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _enum_TextServer_Orientation:
  476. .. rst-class:: classref-enumeration
  477. enum **Orientation**:
  478. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  479. .. rst-class:: classref-enumeration-constant
  480. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  481. Text is written horizontally.
  482. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  483. .. rst-class:: classref-enumeration-constant
  484. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  485. Left to right text is written vertically from top to bottom.
  486. Right to left text is written vertically from bottom to top.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _enum_TextServer_JustificationFlag:
  490. .. rst-class:: classref-enumeration
  491. flags **JustificationFlag**:
  492. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  493. .. rst-class:: classref-enumeration-constant
  494. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  495. Do not justify text.
  496. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  499. Justify text by adding and removing kashidas.
  500. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  503. Justify text by changing width of the spaces between the words.
  504. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  507. Remove trailing and leading spaces from the justified text.
  508. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  509. .. rst-class:: classref-enumeration-constant
  510. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  511. Only apply justification to the part of the text after the last tab.
  512. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  513. .. rst-class:: classref-enumeration-constant
  514. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  515. Apply justification to the trimmed line with ellipsis.
  516. .. rst-class:: classref-item-separator
  517. ----
  518. .. _enum_TextServer_AutowrapMode:
  519. .. rst-class:: classref-enumeration
  520. enum **AutowrapMode**:
  521. .. _class_TextServer_constant_AUTOWRAP_OFF:
  522. .. rst-class:: classref-enumeration-constant
  523. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  524. Autowrap is disabled.
  525. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  526. .. rst-class:: classref-enumeration-constant
  527. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  528. 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.
  529. .. _class_TextServer_constant_AUTOWRAP_WORD:
  530. .. rst-class:: classref-enumeration-constant
  531. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  532. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  533. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  534. .. rst-class:: classref-enumeration-constant
  535. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  536. 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.
  537. .. rst-class:: classref-item-separator
  538. ----
  539. .. _enum_TextServer_LineBreakFlag:
  540. .. rst-class:: classref-enumeration
  541. flags **LineBreakFlag**:
  542. .. _class_TextServer_constant_BREAK_NONE:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  545. Do not break the line.
  546. .. _class_TextServer_constant_BREAK_MANDATORY:
  547. .. rst-class:: classref-enumeration-constant
  548. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  549. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  550. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  551. .. rst-class:: classref-enumeration-constant
  552. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  553. Break the line between the words.
  554. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  555. .. rst-class:: classref-enumeration-constant
  556. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  557. Break the line between any unconnected graphemes.
  558. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  559. .. rst-class:: classref-enumeration-constant
  560. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  561. Should be used only in conjunction with :ref:`BREAK_WORD_BOUND<class_TextServer_constant_BREAK_WORD_BOUND>`, break the line between any unconnected graphemes, if it's impossible to break it between the words.
  562. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  563. .. rst-class:: classref-enumeration-constant
  564. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  565. Remove edge spaces from the broken line segments.
  566. .. rst-class:: classref-item-separator
  567. ----
  568. .. _enum_TextServer_VisibleCharactersBehavior:
  569. .. rst-class:: classref-enumeration
  570. enum **VisibleCharactersBehavior**:
  571. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  572. .. rst-class:: classref-enumeration-constant
  573. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  574. 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.
  575. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  576. .. rst-class:: classref-enumeration-constant
  577. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  578. 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.
  579. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  580. .. rst-class:: classref-enumeration-constant
  581. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  582. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction<class_Control_property_layout_direction>` value.
  583. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  584. .. rst-class:: classref-enumeration-constant
  585. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  586. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the left.
  587. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  588. .. rst-class:: classref-enumeration-constant
  589. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  590. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the right.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _enum_TextServer_OverrunBehavior:
  594. .. rst-class:: classref-enumeration
  595. enum **OverrunBehavior**:
  596. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  597. .. rst-class:: classref-enumeration-constant
  598. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  599. No text trimming is performed.
  600. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  601. .. rst-class:: classref-enumeration-constant
  602. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  603. Trims the text per character.
  604. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  605. .. rst-class:: classref-enumeration-constant
  606. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  607. Trims the text per word.
  608. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  609. .. rst-class:: classref-enumeration-constant
  610. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  611. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  612. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  613. .. rst-class:: classref-enumeration-constant
  614. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  615. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  616. .. rst-class:: classref-item-separator
  617. ----
  618. .. _enum_TextServer_TextOverrunFlag:
  619. .. rst-class:: classref-enumeration
  620. flags **TextOverrunFlag**:
  621. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  624. No trimming is performed.
  625. .. _class_TextServer_constant_OVERRUN_TRIM:
  626. .. rst-class:: classref-enumeration-constant
  627. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  628. Trims the text when it exceeds the given width.
  629. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  630. .. rst-class:: classref-enumeration-constant
  631. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  632. Trims the text per word instead of per grapheme.
  633. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  634. .. rst-class:: classref-enumeration-constant
  635. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  636. Determines whether an ellipsis should be added at the end of the text.
  637. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  640. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  641. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _enum_TextServer_GraphemeFlag:
  647. .. rst-class:: classref-enumeration
  648. flags **GraphemeFlag**:
  649. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  652. Grapheme is supported by the font, and can be drawn.
  653. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  656. Grapheme is part of right-to-left or bottom-to-top run.
  657. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  660. Grapheme is not part of source text, it was added by justification process.
  661. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  664. Grapheme is whitespace.
  665. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  668. Grapheme is mandatory break point (e.g. ``"\n"``).
  669. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  672. Grapheme is optional break point (e.g. space).
  673. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  674. .. rst-class:: classref-enumeration-constant
  675. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  676. Grapheme is the tabulation character.
  677. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  678. .. rst-class:: classref-enumeration-constant
  679. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  680. Grapheme is kashida.
  681. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  682. .. rst-class:: classref-enumeration-constant
  683. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  684. Grapheme is punctuation character.
  685. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  688. Grapheme is underscore character.
  689. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  692. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  693. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  694. .. rst-class:: classref-enumeration-constant
  695. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  696. It is safe to insert a U+0640 before this grapheme for elongation.
  697. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  700. Grapheme is an object replacement character for the embedded object.
  701. .. rst-class:: classref-item-separator
  702. ----
  703. .. _enum_TextServer_Hinting:
  704. .. rst-class:: classref-enumeration
  705. enum **Hinting**:
  706. .. _class_TextServer_constant_HINTING_NONE:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  709. Disables font hinting (smoother but less crisp).
  710. .. _class_TextServer_constant_HINTING_LIGHT:
  711. .. rst-class:: classref-enumeration-constant
  712. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  713. Use the light font hinting mode.
  714. .. _class_TextServer_constant_HINTING_NORMAL:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  717. Use the default font hinting mode (crisper but less smooth).
  718. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  719. .. rst-class:: classref-item-separator
  720. ----
  721. .. _enum_TextServer_SubpixelPositioning:
  722. .. rst-class:: classref-enumeration
  723. enum **SubpixelPositioning**:
  724. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  725. .. rst-class:: classref-enumeration-constant
  726. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  727. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  728. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  729. .. rst-class:: classref-enumeration-constant
  730. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  731. Glyph horizontal position is rounded based on font size.
  732. - 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>`.
  733. - 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>`.
  734. - To the whole pixel size for larger fonts.
  735. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  736. .. rst-class:: classref-enumeration-constant
  737. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  738. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  739. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  740. .. rst-class:: classref-enumeration-constant
  741. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  742. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  743. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  744. .. rst-class:: classref-enumeration-constant
  745. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  746. 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.
  747. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  748. .. rst-class:: classref-enumeration-constant
  749. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  750. 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.
  751. .. rst-class:: classref-item-separator
  752. ----
  753. .. _enum_TextServer_Feature:
  754. .. rst-class:: classref-enumeration
  755. enum **Feature**:
  756. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  757. .. rst-class:: classref-enumeration-constant
  758. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  759. TextServer supports simple text layouts.
  760. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  761. .. rst-class:: classref-enumeration-constant
  762. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  763. TextServer supports bidirectional text layouts.
  764. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  765. .. rst-class:: classref-enumeration-constant
  766. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  767. TextServer supports vertical layouts.
  768. .. _class_TextServer_constant_FEATURE_SHAPING:
  769. .. rst-class:: classref-enumeration-constant
  770. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  771. TextServer supports complex text shaping.
  772. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  773. .. rst-class:: classref-enumeration-constant
  774. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  775. TextServer supports justification using kashidas.
  776. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  777. .. rst-class:: classref-enumeration-constant
  778. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  779. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  780. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  781. .. rst-class:: classref-enumeration-constant
  782. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  783. TextServer supports loading bitmap fonts.
  784. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  785. .. rst-class:: classref-enumeration-constant
  786. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  787. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  788. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  791. TextServer supports multichannel signed distance field dynamic font rendering.
  792. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  795. TextServer supports loading system fonts.
  796. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  799. TextServer supports variable fonts.
  800. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  801. .. rst-class:: classref-enumeration-constant
  802. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  803. TextServer supports locale dependent and context sensitive case conversion.
  804. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  805. .. rst-class:: classref-enumeration-constant
  806. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  807. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  808. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  809. .. rst-class:: classref-enumeration-constant
  810. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  811. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  812. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  813. .. rst-class:: classref-enumeration-constant
  814. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  815. TextServer supports `Unicode Technical Report #36 <https://unicode.org/reports/tr36/>`__ and `Unicode Technical Standard #39 <https://unicode.org/reports/tr39/>`__ based spoof detection features.
  816. .. rst-class:: classref-item-separator
  817. ----
  818. .. _enum_TextServer_ContourPointTag:
  819. .. rst-class:: classref-enumeration
  820. enum **ContourPointTag**:
  821. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  822. .. rst-class:: classref-enumeration-constant
  823. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  824. Contour point is on the curve.
  825. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  826. .. rst-class:: classref-enumeration-constant
  827. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  828. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  829. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  830. .. rst-class:: classref-enumeration-constant
  831. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  832. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  833. .. rst-class:: classref-item-separator
  834. ----
  835. .. _enum_TextServer_SpacingType:
  836. .. rst-class:: classref-enumeration
  837. enum **SpacingType**:
  838. .. _class_TextServer_constant_SPACING_GLYPH:
  839. .. rst-class:: classref-enumeration-constant
  840. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  841. Spacing for each glyph.
  842. .. _class_TextServer_constant_SPACING_SPACE:
  843. .. rst-class:: classref-enumeration-constant
  844. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  845. Spacing for the space character.
  846. .. _class_TextServer_constant_SPACING_TOP:
  847. .. rst-class:: classref-enumeration-constant
  848. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  849. Spacing at the top of the line.
  850. .. _class_TextServer_constant_SPACING_BOTTOM:
  851. .. rst-class:: classref-enumeration-constant
  852. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  853. Spacing at the bottom of the line.
  854. .. _class_TextServer_constant_SPACING_MAX:
  855. .. rst-class:: classref-enumeration-constant
  856. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  857. .. rst-class:: classref-item-separator
  858. ----
  859. .. _enum_TextServer_FontStyle:
  860. .. rst-class:: classref-enumeration
  861. flags **FontStyle**:
  862. .. _class_TextServer_constant_FONT_BOLD:
  863. .. rst-class:: classref-enumeration-constant
  864. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  865. Font is bold.
  866. .. _class_TextServer_constant_FONT_ITALIC:
  867. .. rst-class:: classref-enumeration-constant
  868. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  869. Font is italic or oblique.
  870. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  871. .. rst-class:: classref-enumeration-constant
  872. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  873. Font have fixed-width characters.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _enum_TextServer_StructuredTextParser:
  877. .. rst-class:: classref-enumeration
  878. enum **StructuredTextParser**:
  879. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  880. .. rst-class:: classref-enumeration-constant
  881. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  882. Use default Unicode BiDi algorithm.
  883. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  884. .. rst-class:: classref-enumeration-constant
  885. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  886. BiDi override for URI.
  887. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  888. .. rst-class:: classref-enumeration-constant
  889. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  890. BiDi override for file path.
  891. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  892. .. rst-class:: classref-enumeration-constant
  893. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  894. BiDi override for email.
  895. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  896. .. rst-class:: classref-enumeration-constant
  897. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  898. BiDi override for lists.
  899. Structured text options: list separator ``String``.
  900. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  901. .. rst-class:: classref-enumeration-constant
  902. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  903. BiDi override for GDScript.
  904. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  905. .. rst-class:: classref-enumeration-constant
  906. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  907. User defined structured text BiDi override function.
  908. .. rst-class:: classref-section-separator
  909. ----
  910. .. rst-class:: classref-descriptions-group
  911. Method Descriptions
  912. -------------------
  913. .. _class_TextServer_method_create_font:
  914. .. rst-class:: classref-method
  915. :ref:`RID<class_RID>` **create_font** **(** **)**
  916. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_TextServer_method_create_shaped_text:
  920. .. rst-class:: classref-method
  921. :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  922. 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.
  923. \ **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>`).
  924. \ **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>`).
  925. .. rst-class:: classref-item-separator
  926. ----
  927. .. _class_TextServer_method_draw_hex_code_box:
  928. .. rst-class:: classref-method
  929. 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|
  930. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  931. .. rst-class:: classref-item-separator
  932. ----
  933. .. _class_TextServer_method_font_clear_glyphs:
  934. .. rst-class:: classref-method
  935. void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  936. Removes all rendered glyphs information from the cache entry.
  937. \ **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.
  938. .. rst-class:: classref-item-separator
  939. ----
  940. .. _class_TextServer_method_font_clear_kerning_map:
  941. .. rst-class:: classref-method
  942. void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  943. Removes all kerning overrides.
  944. .. rst-class:: classref-item-separator
  945. ----
  946. .. _class_TextServer_method_font_clear_size_cache:
  947. .. rst-class:: classref-method
  948. void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  949. Removes all font sizes from the cache entry.
  950. .. rst-class:: classref-item-separator
  951. ----
  952. .. _class_TextServer_method_font_clear_textures:
  953. .. rst-class:: classref-method
  954. void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  955. Removes all textures from font cache entry.
  956. \ **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.
  957. .. rst-class:: classref-item-separator
  958. ----
  959. .. _class_TextServer_method_font_draw_glyph:
  960. .. rst-class:: classref-method
  961. 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|
  962. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  963. \ **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>`.
  964. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  965. .. rst-class:: classref-item-separator
  966. ----
  967. .. _class_TextServer_method_font_draw_glyph_outline:
  968. .. rst-class:: classref-method
  969. 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|
  970. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  971. \ **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>`.
  972. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_TextServer_method_font_get_antialiasing:
  976. .. rst-class:: classref-method
  977. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  978. Returns font anti-aliasing mode.
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_TextServer_method_font_get_ascent:
  982. .. rst-class:: classref-method
  983. :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  984. Returns the font ascent (number of pixels above the baseline).
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_TextServer_method_font_get_descent:
  988. .. rst-class:: classref-method
  989. :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  990. Returns the font descent (number of pixels below the baseline).
  991. .. rst-class:: classref-item-separator
  992. ----
  993. .. _class_TextServer_method_font_get_embolden:
  994. .. rst-class:: classref-method
  995. :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  996. Returns font embolden strength.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_TextServer_method_font_get_face_count:
  1000. .. rst-class:: classref-method
  1001. :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1002. Returns number of faces in the TrueType / OpenType collection.
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_TextServer_method_font_get_face_index:
  1006. .. rst-class:: classref-method
  1007. :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1008. Recturns an active face index in the TrueType / OpenType collection.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_TextServer_method_font_get_fixed_size:
  1012. .. rst-class:: classref-method
  1013. :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1014. Returns bitmap font fixed size.
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_TextServer_method_font_get_generate_mipmaps:
  1018. .. rst-class:: classref-method
  1019. :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1020. Returns ``true`` if font texture mipmap generation is enabled.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_TextServer_method_font_get_global_oversampling:
  1024. .. rst-class:: classref-method
  1025. :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  1026. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_TextServer_method_font_get_glyph_advance:
  1030. .. rst-class:: classref-method
  1031. :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|
  1032. Returns glyph advance (offset of the next glyph).
  1033. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1034. .. rst-class:: classref-item-separator
  1035. ----
  1036. .. _class_TextServer_method_font_get_glyph_contours:
  1037. .. rst-class:: classref-method
  1038. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1039. Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
  1040. \ ``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.
  1041. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1042. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1043. .. rst-class:: classref-item-separator
  1044. ----
  1045. .. _class_TextServer_method_font_get_glyph_index:
  1046. .. rst-class:: classref-method
  1047. :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|
  1048. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``.
  1049. .. rst-class:: classref-item-separator
  1050. ----
  1051. .. _class_TextServer_method_font_get_glyph_list:
  1052. .. rst-class:: classref-method
  1053. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1054. Returns list of rendered glyphs in the cache entry.
  1055. .. rst-class:: classref-item-separator
  1056. ----
  1057. .. _class_TextServer_method_font_get_glyph_offset:
  1058. .. rst-class:: classref-method
  1059. :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|
  1060. Returns glyph offset from the baseline.
  1061. .. rst-class:: classref-item-separator
  1062. ----
  1063. .. _class_TextServer_method_font_get_glyph_size:
  1064. .. rst-class:: classref-method
  1065. :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|
  1066. Returns size of the glyph.
  1067. .. rst-class:: classref-item-separator
  1068. ----
  1069. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1070. .. rst-class:: classref-method
  1071. :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|
  1072. Returns index of the cache texture containing the glyph.
  1073. .. rst-class:: classref-item-separator
  1074. ----
  1075. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1076. .. rst-class:: classref-method
  1077. :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|
  1078. Returns resource ID of the cache texture containing the glyph.
  1079. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1080. .. rst-class:: classref-item-separator
  1081. ----
  1082. .. _class_TextServer_method_font_get_glyph_texture_size:
  1083. .. rst-class:: classref-method
  1084. :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|
  1085. Returns size of the cache texture containing the glyph.
  1086. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1087. .. rst-class:: classref-item-separator
  1088. ----
  1089. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1090. .. rst-class:: classref-method
  1091. :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|
  1092. Returns rectangle in the cache texture containing the glyph.
  1093. .. rst-class:: classref-item-separator
  1094. ----
  1095. .. _class_TextServer_method_font_get_hinting:
  1096. .. rst-class:: classref-method
  1097. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1098. Returns the font hinting mode. Used by dynamic fonts only.
  1099. .. rst-class:: classref-item-separator
  1100. ----
  1101. .. _class_TextServer_method_font_get_kerning:
  1102. .. rst-class:: classref-method
  1103. :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|
  1104. Returns kerning for the pair of glyphs.
  1105. .. rst-class:: classref-item-separator
  1106. ----
  1107. .. _class_TextServer_method_font_get_kerning_list:
  1108. .. rst-class:: classref-method
  1109. :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1110. Returns list of the kerning overrides.
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_TextServer_method_font_get_language_support_override:
  1114. .. rst-class:: classref-method
  1115. :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1116. Returns ``true`` if support override is enabled for the ``language``.
  1117. .. rst-class:: classref-item-separator
  1118. ----
  1119. .. _class_TextServer_method_font_get_language_support_overrides:
  1120. .. rst-class:: classref-method
  1121. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1122. Returns list of language support overrides.
  1123. .. rst-class:: classref-item-separator
  1124. ----
  1125. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1126. .. rst-class:: classref-method
  1127. :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1128. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_TextServer_method_font_get_msdf_size:
  1132. .. rst-class:: classref-method
  1133. :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1134. Returns source font size used to generate MSDF textures.
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_TextServer_method_font_get_name:
  1138. .. rst-class:: classref-method
  1139. :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1140. Returns font family name.
  1141. .. rst-class:: classref-item-separator
  1142. ----
  1143. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1144. .. rst-class:: classref-method
  1145. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1146. Returns font OpenType feature set override.
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_TextServer_method_font_get_oversampling:
  1150. .. rst-class:: classref-method
  1151. :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1152. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1153. .. rst-class:: classref-item-separator
  1154. ----
  1155. .. _class_TextServer_method_font_get_scale:
  1156. .. rst-class:: classref-method
  1157. :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1158. Returns scaling factor of the color bitmap font.
  1159. .. rst-class:: classref-item-separator
  1160. ----
  1161. .. _class_TextServer_method_font_get_script_support_override:
  1162. .. rst-class:: classref-method
  1163. :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1164. Returns ``true`` if support override is enabled for the ``script``.
  1165. .. rst-class:: classref-item-separator
  1166. ----
  1167. .. _class_TextServer_method_font_get_script_support_overrides:
  1168. .. rst-class:: classref-method
  1169. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1170. Returns list of script support overrides.
  1171. .. rst-class:: classref-item-separator
  1172. ----
  1173. .. _class_TextServer_method_font_get_size_cache_list:
  1174. .. rst-class:: classref-method
  1175. :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1176. Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_TextServer_method_font_get_stretch:
  1180. .. rst-class:: classref-method
  1181. :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1182. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1183. .. rst-class:: classref-item-separator
  1184. ----
  1185. .. _class_TextServer_method_font_get_style:
  1186. .. rst-class:: classref-method
  1187. :ref:`FontStyle<enum_TextServer_FontStyle>` **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1188. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1189. .. rst-class:: classref-item-separator
  1190. ----
  1191. .. _class_TextServer_method_font_get_style_name:
  1192. .. rst-class:: classref-method
  1193. :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1194. Returns font style name.
  1195. .. rst-class:: classref-item-separator
  1196. ----
  1197. .. _class_TextServer_method_font_get_subpixel_positioning:
  1198. .. rst-class:: classref-method
  1199. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1200. Returns font subpixel glyph positioning mode.
  1201. .. rst-class:: classref-item-separator
  1202. ----
  1203. .. _class_TextServer_method_font_get_supported_chars:
  1204. .. rst-class:: classref-method
  1205. :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1206. Returns a string containing all the characters available in the font.
  1207. .. rst-class:: classref-item-separator
  1208. ----
  1209. .. _class_TextServer_method_font_get_texture_count:
  1210. .. rst-class:: classref-method
  1211. :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1212. Returns number of textures used by font cache entry.
  1213. .. rst-class:: classref-item-separator
  1214. ----
  1215. .. _class_TextServer_method_font_get_texture_image:
  1216. .. rst-class:: classref-method
  1217. :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|
  1218. Returns font cache texture image data.
  1219. .. rst-class:: classref-item-separator
  1220. ----
  1221. .. _class_TextServer_method_font_get_texture_offsets:
  1222. .. rst-class:: classref-method
  1223. :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|
  1224. Returns array containing glyph packing data.
  1225. .. rst-class:: classref-item-separator
  1226. ----
  1227. .. _class_TextServer_method_font_get_transform:
  1228. .. rst-class:: classref-method
  1229. :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1230. Returns 2D transform applied to the font outlines.
  1231. .. rst-class:: classref-item-separator
  1232. ----
  1233. .. _class_TextServer_method_font_get_underline_position:
  1234. .. rst-class:: classref-method
  1235. :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1236. Returns pixel offset of the underline below the baseline.
  1237. .. rst-class:: classref-item-separator
  1238. ----
  1239. .. _class_TextServer_method_font_get_underline_thickness:
  1240. .. rst-class:: classref-method
  1241. :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1242. Returns thickness of the underline in pixels.
  1243. .. rst-class:: classref-item-separator
  1244. ----
  1245. .. _class_TextServer_method_font_get_variation_coordinates:
  1246. .. rst-class:: classref-method
  1247. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1248. 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.
  1249. .. rst-class:: classref-item-separator
  1250. ----
  1251. .. _class_TextServer_method_font_get_weight:
  1252. .. rst-class:: classref-method
  1253. :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1254. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1255. .. rst-class:: classref-item-separator
  1256. ----
  1257. .. _class_TextServer_method_font_has_char:
  1258. .. rst-class:: classref-method
  1259. :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  1260. Returns ``true`` if a Unicode ``char`` is available in the font.
  1261. .. rst-class:: classref-item-separator
  1262. ----
  1263. .. _class_TextServer_method_font_is_allow_system_fallback:
  1264. .. rst-class:: classref-method
  1265. :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1266. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1267. .. rst-class:: classref-item-separator
  1268. ----
  1269. .. _class_TextServer_method_font_is_force_autohinter:
  1270. .. rst-class:: classref-method
  1271. :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1272. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1273. .. rst-class:: classref-item-separator
  1274. ----
  1275. .. _class_TextServer_method_font_is_language_supported:
  1276. .. rst-class:: classref-method
  1277. :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  1278. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1279. .. rst-class:: classref-item-separator
  1280. ----
  1281. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1282. .. rst-class:: classref-method
  1283. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1284. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1285. .. rst-class:: classref-item-separator
  1286. ----
  1287. .. _class_TextServer_method_font_is_script_supported:
  1288. .. rst-class:: classref-method
  1289. :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  1290. Returns ``true``, if font supports given script (ISO 15924 code).
  1291. .. rst-class:: classref-item-separator
  1292. ----
  1293. .. _class_TextServer_method_font_remove_glyph:
  1294. .. rst-class:: classref-method
  1295. void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  1296. Removes specified rendered glyph information from the cache entry.
  1297. \ **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.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _class_TextServer_method_font_remove_kerning:
  1301. .. rst-class:: classref-method
  1302. void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  1303. Removes kerning override for the pair of glyphs.
  1304. .. rst-class:: classref-item-separator
  1305. ----
  1306. .. _class_TextServer_method_font_remove_language_support_override:
  1307. .. rst-class:: classref-method
  1308. void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1309. Remove language support override.
  1310. .. rst-class:: classref-item-separator
  1311. ----
  1312. .. _class_TextServer_method_font_remove_script_support_override:
  1313. .. rst-class:: classref-method
  1314. void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1315. Removes script support override.
  1316. .. rst-class:: classref-item-separator
  1317. ----
  1318. .. _class_TextServer_method_font_remove_size_cache:
  1319. .. rst-class:: classref-method
  1320. void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1321. Removes specified font size from the cache entry.
  1322. .. rst-class:: classref-item-separator
  1323. ----
  1324. .. _class_TextServer_method_font_remove_texture:
  1325. .. rst-class:: classref-method
  1326. void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  1327. Removes specified texture from the cache entry.
  1328. \ **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>`.
  1329. .. rst-class:: classref-item-separator
  1330. ----
  1331. .. _class_TextServer_method_font_render_glyph:
  1332. .. rst-class:: classref-method
  1333. void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  1334. Renders specified glyph to the font cache texture.
  1335. .. rst-class:: classref-item-separator
  1336. ----
  1337. .. _class_TextServer_method_font_render_range:
  1338. .. rst-class:: classref-method
  1339. 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 **)**
  1340. Renders the range of characters to the font cache texture.
  1341. .. rst-class:: classref-item-separator
  1342. ----
  1343. .. _class_TextServer_method_font_set_allow_system_fallback:
  1344. .. rst-class:: classref-method
  1345. void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
  1346. If set to ``true``, system fonts can be automatically used as fallbacks.
  1347. .. rst-class:: classref-item-separator
  1348. ----
  1349. .. _class_TextServer_method_font_set_antialiasing:
  1350. .. rst-class:: classref-method
  1351. void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
  1352. Sets font anti-aliasing mode.
  1353. .. rst-class:: classref-item-separator
  1354. ----
  1355. .. _class_TextServer_method_font_set_ascent:
  1356. .. rst-class:: classref-method
  1357. void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  1358. Sets the font ascent (number of pixels above the baseline).
  1359. .. rst-class:: classref-item-separator
  1360. ----
  1361. .. _class_TextServer_method_font_set_data:
  1362. .. rst-class:: classref-method
  1363. void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  1364. Sets font source data, e.g contents of the dynamic font source file.
  1365. .. rst-class:: classref-item-separator
  1366. ----
  1367. .. _class_TextServer_method_font_set_descent:
  1368. .. rst-class:: classref-method
  1369. void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  1370. Sets the font descent (number of pixels below the baseline).
  1371. .. rst-class:: classref-item-separator
  1372. ----
  1373. .. _class_TextServer_method_font_set_embolden:
  1374. .. rst-class:: classref-method
  1375. void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  1376. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1377. .. rst-class:: classref-item-separator
  1378. ----
  1379. .. _class_TextServer_method_font_set_face_index:
  1380. .. rst-class:: classref-method
  1381. void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  1382. Sets an active face index in the TrueType / OpenType collection.
  1383. .. rst-class:: classref-item-separator
  1384. ----
  1385. .. _class_TextServer_method_font_set_fixed_size:
  1386. .. rst-class:: classref-method
  1387. void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  1388. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1389. .. rst-class:: classref-item-separator
  1390. ----
  1391. .. _class_TextServer_method_font_set_force_autohinter:
  1392. .. rst-class:: classref-method
  1393. void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  1394. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1395. .. rst-class:: classref-item-separator
  1396. ----
  1397. .. _class_TextServer_method_font_set_generate_mipmaps:
  1398. .. rst-class:: classref-method
  1399. void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  1400. If set to ``true`` font texture mipmap generation is enabled.
  1401. .. rst-class:: classref-item-separator
  1402. ----
  1403. .. _class_TextServer_method_font_set_global_oversampling:
  1404. .. rst-class:: classref-method
  1405. void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  1406. Sets oversampling factor, shared by all font in the TextServer.
  1407. \ **Note:** This value can be automatically changed by display server.
  1408. .. rst-class:: classref-item-separator
  1409. ----
  1410. .. _class_TextServer_method_font_set_glyph_advance:
  1411. .. rst-class:: classref-method
  1412. 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 **)**
  1413. Sets glyph advance (offset of the next glyph).
  1414. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1415. .. rst-class:: classref-item-separator
  1416. ----
  1417. .. _class_TextServer_method_font_set_glyph_offset:
  1418. .. rst-class:: classref-method
  1419. 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 **)**
  1420. Sets glyph offset from the baseline.
  1421. .. rst-class:: classref-item-separator
  1422. ----
  1423. .. _class_TextServer_method_font_set_glyph_size:
  1424. .. rst-class:: classref-method
  1425. 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 **)**
  1426. Sets size of the glyph.
  1427. .. rst-class:: classref-item-separator
  1428. ----
  1429. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1430. .. rst-class:: classref-method
  1431. 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 **)**
  1432. Sets index of the cache texture containing the glyph.
  1433. .. rst-class:: classref-item-separator
  1434. ----
  1435. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1436. .. rst-class:: classref-method
  1437. 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 **)**
  1438. Sets rectangle in the cache texture containing the glyph.
  1439. .. rst-class:: classref-item-separator
  1440. ----
  1441. .. _class_TextServer_method_font_set_hinting:
  1442. .. rst-class:: classref-method
  1443. void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  1444. Sets font hinting mode. Used by dynamic fonts only.
  1445. .. rst-class:: classref-item-separator
  1446. ----
  1447. .. _class_TextServer_method_font_set_kerning:
  1448. .. rst-class:: classref-method
  1449. 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 **)**
  1450. Sets kerning for the pair of glyphs.
  1451. .. rst-class:: classref-item-separator
  1452. ----
  1453. .. _class_TextServer_method_font_set_language_support_override:
  1454. .. rst-class:: classref-method
  1455. void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  1456. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1457. .. rst-class:: classref-item-separator
  1458. ----
  1459. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1460. .. rst-class:: classref-method
  1461. void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  1462. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1463. .. rst-class:: classref-item-separator
  1464. ----
  1465. .. _class_TextServer_method_font_set_msdf_size:
  1466. .. rst-class:: classref-method
  1467. void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  1468. Sets source font size used to generate MSDF textures.
  1469. .. rst-class:: classref-item-separator
  1470. ----
  1471. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1472. .. rst-class:: classref-method
  1473. void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  1474. 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.
  1475. \ **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.
  1476. .. rst-class:: classref-item-separator
  1477. ----
  1478. .. _class_TextServer_method_font_set_name:
  1479. .. rst-class:: classref-method
  1480. void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1481. Sets the font family name.
  1482. .. rst-class:: classref-item-separator
  1483. ----
  1484. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1485. .. rst-class:: classref-method
  1486. void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  1487. Sets font OpenType feature set override.
  1488. .. rst-class:: classref-item-separator
  1489. ----
  1490. .. _class_TextServer_method_font_set_oversampling:
  1491. .. rst-class:: classref-method
  1492. void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  1493. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1494. .. rst-class:: classref-item-separator
  1495. ----
  1496. .. _class_TextServer_method_font_set_scale:
  1497. .. rst-class:: classref-method
  1498. void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  1499. Sets scaling factor of the color bitmap font.
  1500. .. rst-class:: classref-item-separator
  1501. ----
  1502. .. _class_TextServer_method_font_set_script_support_override:
  1503. .. rst-class:: classref-method
  1504. void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  1505. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1506. .. rst-class:: classref-item-separator
  1507. ----
  1508. .. _class_TextServer_method_font_set_stretch:
  1509. .. rst-class:: classref-method
  1510. void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1511. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1512. \ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`, :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`, or :ref:`font_set_transform<class_TextServer_method_font_set_transform>` instead.
  1513. .. rst-class:: classref-item-separator
  1514. ----
  1515. .. _class_TextServer_method_font_set_style:
  1516. .. rst-class:: classref-method
  1517. void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)**
  1518. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1519. \ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`, :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`, :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`, or :ref:`font_set_transform<class_TextServer_method_font_set_transform>` instead.
  1520. .. rst-class:: classref-item-separator
  1521. ----
  1522. .. _class_TextServer_method_font_set_style_name:
  1523. .. rst-class:: classref-method
  1524. void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1525. Sets the font style name.
  1526. .. rst-class:: classref-item-separator
  1527. ----
  1528. .. _class_TextServer_method_font_set_subpixel_positioning:
  1529. .. rst-class:: classref-method
  1530. void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1531. Sets font subpixel glyph positioning mode.
  1532. .. rst-class:: classref-item-separator
  1533. ----
  1534. .. _class_TextServer_method_font_set_texture_image:
  1535. .. rst-class:: classref-method
  1536. 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 **)**
  1537. Sets font cache texture image data.
  1538. .. rst-class:: classref-item-separator
  1539. ----
  1540. .. _class_TextServer_method_font_set_texture_offsets:
  1541. .. rst-class:: classref-method
  1542. 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 **)**
  1543. Sets array containing glyph packing data.
  1544. .. rst-class:: classref-item-separator
  1545. ----
  1546. .. _class_TextServer_method_font_set_transform:
  1547. .. rst-class:: classref-method
  1548. void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1549. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1550. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1551. .. rst-class:: classref-item-separator
  1552. ----
  1553. .. _class_TextServer_method_font_set_underline_position:
  1554. .. rst-class:: classref-method
  1555. void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1556. Sets pixel offset of the underline below the baseline.
  1557. .. rst-class:: classref-item-separator
  1558. ----
  1559. .. _class_TextServer_method_font_set_underline_thickness:
  1560. .. rst-class:: classref-method
  1561. void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1562. Sets thickness of the underline in pixels.
  1563. .. rst-class:: classref-item-separator
  1564. ----
  1565. .. _class_TextServer_method_font_set_variation_coordinates:
  1566. .. rst-class:: classref-method
  1567. void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1568. 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.
  1569. .. rst-class:: classref-item-separator
  1570. ----
  1571. .. _class_TextServer_method_font_set_weight:
  1572. .. rst-class:: classref-method
  1573. void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1574. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1575. \ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`, :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`, or :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` instead.
  1576. .. rst-class:: classref-item-separator
  1577. ----
  1578. .. _class_TextServer_method_font_supported_feature_list:
  1579. .. rst-class:: classref-method
  1580. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1581. Returns the dictionary of the supported OpenType features.
  1582. .. rst-class:: classref-item-separator
  1583. ----
  1584. .. _class_TextServer_method_font_supported_variation_list:
  1585. .. rst-class:: classref-method
  1586. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1587. Returns the dictionary of the supported OpenType variation coordinates.
  1588. .. rst-class:: classref-item-separator
  1589. ----
  1590. .. _class_TextServer_method_format_number:
  1591. .. rst-class:: classref-method
  1592. :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1593. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1594. If ``language`` is omitted, the active locale will be used.
  1595. .. rst-class:: classref-item-separator
  1596. ----
  1597. .. _class_TextServer_method_free_rid:
  1598. .. rst-class:: classref-method
  1599. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1600. Frees an object created by this **TextServer**.
  1601. .. rst-class:: classref-item-separator
  1602. ----
  1603. .. _class_TextServer_method_get_features:
  1604. .. rst-class:: classref-method
  1605. :ref:`int<class_int>` **get_features** **(** **)** |const|
  1606. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1607. .. rst-class:: classref-item-separator
  1608. ----
  1609. .. _class_TextServer_method_get_hex_code_box_size:
  1610. .. rst-class:: classref-method
  1611. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1612. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1613. .. rst-class:: classref-item-separator
  1614. ----
  1615. .. _class_TextServer_method_get_name:
  1616. .. rst-class:: classref-method
  1617. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1618. Returns the name of the server interface.
  1619. .. rst-class:: classref-item-separator
  1620. ----
  1621. .. _class_TextServer_method_get_support_data_filename:
  1622. .. rst-class:: classref-method
  1623. :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1624. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1625. .. rst-class:: classref-item-separator
  1626. ----
  1627. .. _class_TextServer_method_get_support_data_info:
  1628. .. rst-class:: classref-method
  1629. :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1630. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1631. .. rst-class:: classref-item-separator
  1632. ----
  1633. .. _class_TextServer_method_has:
  1634. .. rst-class:: classref-method
  1635. :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1636. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1637. .. rst-class:: classref-item-separator
  1638. ----
  1639. .. _class_TextServer_method_has_feature:
  1640. .. rst-class:: classref-method
  1641. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1642. Returns ``true`` if the server supports a feature.
  1643. .. rst-class:: classref-item-separator
  1644. ----
  1645. .. _class_TextServer_method_is_confusable:
  1646. .. rst-class:: classref-method
  1647. :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
  1648. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1649. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1650. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1651. .. rst-class:: classref-item-separator
  1652. ----
  1653. .. _class_TextServer_method_is_locale_right_to_left:
  1654. .. rst-class:: classref-method
  1655. :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1656. Returns ``true`` if locale is right-to-left.
  1657. .. rst-class:: classref-item-separator
  1658. ----
  1659. .. _class_TextServer_method_is_valid_identifier:
  1660. .. rst-class:: classref-method
  1661. :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
  1662. Returns ``true`` if ``string`` is a valid identifier.
  1663. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1664. - Conform to normalization form C.
  1665. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1666. - May contain Unicode characters of class XID_Continue in the other positions.
  1667. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1668. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1669. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1670. - May contain Unicode characters of class XID_Continue in the other positions.
  1671. .. rst-class:: classref-item-separator
  1672. ----
  1673. .. _class_TextServer_method_load_support_data:
  1674. .. rst-class:: classref-method
  1675. :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1676. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1677. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1678. .. rst-class:: classref-item-separator
  1679. ----
  1680. .. _class_TextServer_method_name_to_tag:
  1681. .. rst-class:: classref-method
  1682. :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1683. Converts readable feature, variation, script or language name to OpenType tag.
  1684. .. rst-class:: classref-item-separator
  1685. ----
  1686. .. _class_TextServer_method_parse_number:
  1687. .. rst-class:: classref-method
  1688. :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1689. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1690. .. rst-class:: classref-item-separator
  1691. ----
  1692. .. _class_TextServer_method_parse_structured_text:
  1693. .. rst-class:: classref-method
  1694. :ref:`Vector3i[]<class_Vector3i>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const|
  1695. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1696. .. rst-class:: classref-item-separator
  1697. ----
  1698. .. _class_TextServer_method_percent_sign:
  1699. .. rst-class:: classref-method
  1700. :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1701. Returns percent sign used in the ``language``.
  1702. .. rst-class:: classref-item-separator
  1703. ----
  1704. .. _class_TextServer_method_save_support_data:
  1705. .. rst-class:: classref-method
  1706. :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1707. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1708. \ **Note:** This function is used by during project export, to include TextServer database.
  1709. .. rst-class:: classref-item-separator
  1710. ----
  1711. .. _class_TextServer_method_shaped_get_span_count:
  1712. .. rst-class:: classref-method
  1713. :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1714. 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>`.
  1715. .. rst-class:: classref-item-separator
  1716. ----
  1717. .. _class_TextServer_method_shaped_get_span_meta:
  1718. .. rst-class:: classref-method
  1719. :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1720. Returns text span metadata.
  1721. .. rst-class:: classref-item-separator
  1722. ----
  1723. .. _class_TextServer_method_shaped_set_span_update_font:
  1724. .. rst-class:: classref-method
  1725. void **shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)**
  1726. Changes text span font, font size and OpenType features, without changing the text.
  1727. .. rst-class:: classref-item-separator
  1728. ----
  1729. .. _class_TextServer_method_shaped_text_add_object:
  1730. .. rst-class:: classref-method
  1731. :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, :ref:`float<class_float>` baseline=0.0 **)**
  1732. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1733. .. rst-class:: classref-item-separator
  1734. ----
  1735. .. _class_TextServer_method_shaped_text_add_string:
  1736. .. rst-class:: classref-method
  1737. :ref:`bool<class_bool>` **shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)**
  1738. Adds text span and font to draw it to the text buffer.
  1739. .. rst-class:: classref-item-separator
  1740. ----
  1741. .. _class_TextServer_method_shaped_text_clear:
  1742. .. rst-class:: classref-method
  1743. void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1744. Clears text buffer (removes text and inline objects).
  1745. .. rst-class:: classref-item-separator
  1746. ----
  1747. .. _class_TextServer_method_shaped_text_draw:
  1748. .. rst-class:: classref-method
  1749. 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|
  1750. 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).
  1751. .. rst-class:: classref-item-separator
  1752. ----
  1753. .. _class_TextServer_method_shaped_text_draw_outline:
  1754. .. rst-class:: classref-method
  1755. 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|
  1756. 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).
  1757. .. rst-class:: classref-item-separator
  1758. ----
  1759. .. _class_TextServer_method_shaped_text_fit_to_width:
  1760. .. rst-class:: classref-method
  1761. :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 **)**
  1762. Adjusts text width to fit to specified width, returns new text width.
  1763. .. rst-class:: classref-item-separator
  1764. ----
  1765. .. _class_TextServer_method_shaped_text_get_ascent:
  1766. .. rst-class:: classref-method
  1767. :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1768. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1769. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1770. .. rst-class:: classref-item-separator
  1771. ----
  1772. .. _class_TextServer_method_shaped_text_get_carets:
  1773. .. rst-class:: classref-method
  1774. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1775. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1776. .. rst-class:: classref-item-separator
  1777. ----
  1778. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1779. .. rst-class:: classref-method
  1780. :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1781. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1782. .. rst-class:: classref-item-separator
  1783. ----
  1784. .. _class_TextServer_method_shaped_text_get_descent:
  1785. .. rst-class:: classref-method
  1786. :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1787. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1788. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1789. .. rst-class:: classref-item-separator
  1790. ----
  1791. .. _class_TextServer_method_shaped_text_get_direction:
  1792. .. rst-class:: classref-method
  1793. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1794. Returns direction of the text.
  1795. .. rst-class:: classref-item-separator
  1796. ----
  1797. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1798. .. rst-class:: classref-method
  1799. :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|
  1800. Returns dominant direction of in the range of text.
  1801. .. rst-class:: classref-item-separator
  1802. ----
  1803. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1804. .. rst-class:: classref-method
  1805. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1806. Returns number of glyphs in the ellipsis.
  1807. .. rst-class:: classref-item-separator
  1808. ----
  1809. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1810. .. rst-class:: classref-method
  1811. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1812. Returns array of the glyphs in the ellipsis.
  1813. .. rst-class:: classref-item-separator
  1814. ----
  1815. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1816. .. rst-class:: classref-method
  1817. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1818. Returns position of the ellipsis.
  1819. .. rst-class:: classref-item-separator
  1820. ----
  1821. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1822. .. rst-class:: classref-method
  1823. :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1824. Returns number of glyphs in the buffer.
  1825. .. rst-class:: classref-item-separator
  1826. ----
  1827. .. _class_TextServer_method_shaped_text_get_glyphs:
  1828. .. rst-class:: classref-method
  1829. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1830. Returns an array of glyphs in the visual order.
  1831. .. rst-class:: classref-item-separator
  1832. ----
  1833. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1834. .. rst-class:: classref-method
  1835. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1836. Returns composite character's bounds as offsets from the start of the line.
  1837. .. rst-class:: classref-item-separator
  1838. ----
  1839. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1840. .. rst-class:: classref-method
  1841. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1842. Returns direction of the text, inferred by the BiDi algorithm.
  1843. .. rst-class:: classref-item-separator
  1844. ----
  1845. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1846. .. rst-class:: classref-method
  1847. :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|
  1848. Breaks text to the lines and returns character ranges for each line.
  1849. .. rst-class:: classref-item-separator
  1850. ----
  1851. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1852. .. rst-class:: classref-method
  1853. :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|
  1854. Breaks text to the lines and columns. Returns character ranges for each segment.
  1855. .. rst-class:: classref-item-separator
  1856. ----
  1857. .. _class_TextServer_method_shaped_text_get_object_rect:
  1858. .. rst-class:: classref-method
  1859. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1860. Returns bounding rectangle of the inline object.
  1861. .. rst-class:: classref-item-separator
  1862. ----
  1863. .. _class_TextServer_method_shaped_text_get_objects:
  1864. .. rst-class:: classref-method
  1865. :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1866. Returns array of inline objects.
  1867. .. rst-class:: classref-item-separator
  1868. ----
  1869. .. _class_TextServer_method_shaped_text_get_orientation:
  1870. .. rst-class:: classref-method
  1871. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1872. Returns text orientation.
  1873. .. rst-class:: classref-item-separator
  1874. ----
  1875. .. _class_TextServer_method_shaped_text_get_parent:
  1876. .. rst-class:: classref-method
  1877. :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1878. Returns the parent buffer from which the substring originates.
  1879. .. rst-class:: classref-item-separator
  1880. ----
  1881. .. _class_TextServer_method_shaped_text_get_preserve_control:
  1882. .. rst-class:: classref-method
  1883. :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1884. Returns ``true`` if text buffer is configured to display control characters.
  1885. .. rst-class:: classref-item-separator
  1886. ----
  1887. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  1888. .. rst-class:: classref-method
  1889. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1890. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  1891. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  1892. .. rst-class:: classref-item-separator
  1893. ----
  1894. .. _class_TextServer_method_shaped_text_get_range:
  1895. .. rst-class:: classref-method
  1896. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1897. Returns substring buffer character range in the parent buffer.
  1898. .. rst-class:: classref-item-separator
  1899. ----
  1900. .. _class_TextServer_method_shaped_text_get_selection:
  1901. .. rst-class:: classref-method
  1902. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1903. Returns selection rectangles for the specified character range.
  1904. .. rst-class:: classref-item-separator
  1905. ----
  1906. .. _class_TextServer_method_shaped_text_get_size:
  1907. .. rst-class:: classref-method
  1908. :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1909. Returns size of the text.
  1910. .. rst-class:: classref-item-separator
  1911. ----
  1912. .. _class_TextServer_method_shaped_text_get_spacing:
  1913. .. rst-class:: classref-method
  1914. :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1915. Returns extra spacing added between glyphs or lines in pixels.
  1916. .. rst-class:: classref-item-separator
  1917. ----
  1918. .. _class_TextServer_method_shaped_text_get_trim_pos:
  1919. .. rst-class:: classref-method
  1920. :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1921. Returns the position of the overrun trim.
  1922. .. rst-class:: classref-item-separator
  1923. ----
  1924. .. _class_TextServer_method_shaped_text_get_underline_position:
  1925. .. rst-class:: classref-method
  1926. :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1927. Returns pixel offset of the underline below the baseline.
  1928. .. rst-class:: classref-item-separator
  1929. ----
  1930. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  1931. .. rst-class:: classref-method
  1932. :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1933. Returns thickness of the underline.
  1934. .. rst-class:: classref-item-separator
  1935. ----
  1936. .. _class_TextServer_method_shaped_text_get_width:
  1937. .. rst-class:: classref-method
  1938. :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1939. Returns width (for horizontal layout) or height (for vertical) of the text.
  1940. .. rst-class:: classref-item-separator
  1941. ----
  1942. .. _class_TextServer_method_shaped_text_get_word_breaks:
  1943. .. rst-class:: classref-method
  1944. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const|
  1945. 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>`).
  1946. .. rst-class:: classref-item-separator
  1947. ----
  1948. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  1949. .. rst-class:: classref-method
  1950. :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1951. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  1952. .. rst-class:: classref-item-separator
  1953. ----
  1954. .. _class_TextServer_method_shaped_text_hit_test_position:
  1955. .. rst-class:: classref-method
  1956. :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1957. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  1958. .. rst-class:: classref-item-separator
  1959. ----
  1960. .. _class_TextServer_method_shaped_text_is_ready:
  1961. .. rst-class:: classref-method
  1962. :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1963. Returns ``true`` if buffer is successfully shaped.
  1964. .. rst-class:: classref-item-separator
  1965. ----
  1966. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  1967. .. rst-class:: classref-method
  1968. :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1969. Returns composite character end position closest to the ``pos``.
  1970. .. rst-class:: classref-item-separator
  1971. ----
  1972. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  1973. .. rst-class:: classref-method
  1974. 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 **)**
  1975. Trims text if it exceeds the given width.
  1976. .. rst-class:: classref-item-separator
  1977. ----
  1978. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  1979. .. rst-class:: classref-method
  1980. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1981. Returns composite character start position closest to the ``pos``.
  1982. .. rst-class:: classref-item-separator
  1983. ----
  1984. .. _class_TextServer_method_shaped_text_resize_object:
  1985. .. rst-class:: classref-method
  1986. :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, :ref:`float<class_float>` baseline=0.0 **)**
  1987. Sets new size and alignment of embedded object.
  1988. .. rst-class:: classref-item-separator
  1989. ----
  1990. .. _class_TextServer_method_shaped_text_set_bidi_override:
  1991. .. rst-class:: classref-method
  1992. void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  1993. Overrides BiDi for the structured text.
  1994. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  1995. .. rst-class:: classref-item-separator
  1996. ----
  1997. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  1998. .. rst-class:: classref-method
  1999. void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  2000. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2001. .. rst-class:: classref-item-separator
  2002. ----
  2003. .. _class_TextServer_method_shaped_text_set_direction:
  2004. .. rst-class:: classref-method
  2005. void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  2006. Sets desired text direction. If set to :ref:`DIRECTION_AUTO<class_TextServer_constant_DIRECTION_AUTO>`, direction will be detected based on the buffer contents and current locale.
  2007. \ **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>`).
  2008. .. rst-class:: classref-item-separator
  2009. ----
  2010. .. _class_TextServer_method_shaped_text_set_orientation:
  2011. .. rst-class:: classref-method
  2012. void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  2013. Sets desired text orientation.
  2014. \ **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>`).
  2015. .. rst-class:: classref-item-separator
  2016. ----
  2017. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2018. .. rst-class:: classref-method
  2019. void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2020. If set to ``true`` text buffer will display control characters.
  2021. .. rst-class:: classref-item-separator
  2022. ----
  2023. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2024. .. rst-class:: classref-method
  2025. void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2026. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2027. .. rst-class:: classref-item-separator
  2028. ----
  2029. .. _class_TextServer_method_shaped_text_set_spacing:
  2030. .. rst-class:: classref-method
  2031. void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  2032. Sets extra spacing added between glyphs or lines in pixels.
  2033. .. rst-class:: classref-item-separator
  2034. ----
  2035. .. _class_TextServer_method_shaped_text_shape:
  2036. .. rst-class:: classref-method
  2037. :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  2038. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2039. \ **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.
  2040. .. rst-class:: classref-item-separator
  2041. ----
  2042. .. _class_TextServer_method_shaped_text_sort_logical:
  2043. .. rst-class:: classref-method
  2044. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  2045. Returns text glyphs in the logical order.
  2046. .. rst-class:: classref-item-separator
  2047. ----
  2048. .. _class_TextServer_method_shaped_text_substr:
  2049. .. rst-class:: classref-method
  2050. :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  2051. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2052. .. rst-class:: classref-item-separator
  2053. ----
  2054. .. _class_TextServer_method_shaped_text_tab_align:
  2055. .. rst-class:: classref-method
  2056. :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  2057. Aligns shaped text to the given tab-stops.
  2058. .. rst-class:: classref-item-separator
  2059. ----
  2060. .. _class_TextServer_method_spoof_check:
  2061. .. rst-class:: classref-method
  2062. :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
  2063. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2064. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2065. .. rst-class:: classref-item-separator
  2066. ----
  2067. .. _class_TextServer_method_string_get_word_breaks:
  2068. .. rst-class:: classref-method
  2069. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const|
  2070. Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even.
  2071. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2072. ::
  2073. var ts = TextServerManager.get_primary_interface()
  2074. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2075. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2076. .. rst-class:: classref-item-separator
  2077. ----
  2078. .. _class_TextServer_method_string_to_lower:
  2079. .. rst-class:: classref-method
  2080. :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2081. Returns the string converted to lowercase.
  2082. \ **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>`).
  2083. \ **Note:** The result may be longer or shorter than the original.
  2084. .. rst-class:: classref-item-separator
  2085. ----
  2086. .. _class_TextServer_method_string_to_upper:
  2087. .. rst-class:: classref-method
  2088. :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2089. Returns the string converted to uppercase.
  2090. \ **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>`).
  2091. \ **Note:** The result may be longer or shorter than the original.
  2092. .. rst-class:: classref-item-separator
  2093. ----
  2094. .. _class_TextServer_method_strip_diacritics:
  2095. .. rst-class:: classref-method
  2096. :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  2097. Strips diacritics from the string.
  2098. \ **Note:** The result may be longer or shorter than the original.
  2099. .. rst-class:: classref-item-separator
  2100. ----
  2101. .. _class_TextServer_method_tag_to_name:
  2102. .. rst-class:: classref-method
  2103. :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  2104. Converts OpenType tag to readable feature, variation, script or language name.
  2105. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2106. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2107. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2108. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2109. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2110. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`