class_textserver.rst 277 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServer.xml.
  6. .. _class_TextServer:
  7. TextServer
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
  11. 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:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :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| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :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| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :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| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :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| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :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| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :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| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :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| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :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| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :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| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :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| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :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| |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :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| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :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| |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :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 **)** |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :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| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :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| |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :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| |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :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 **)** |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :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| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :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| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :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| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :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| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :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| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :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| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :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| |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :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| |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :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| |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :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| |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :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| |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | 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 **)** |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | 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 **)** |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | 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 **)** |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | 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 **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | 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 **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | 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 **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | 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 **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | 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 **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | 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 **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | 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 **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | 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 **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | 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 **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | 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 **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | 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 **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | 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 **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | 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 **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | 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 **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | 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 **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | 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 **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | 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 **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | 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 **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | 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 **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | 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 **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | 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 **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | 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 **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | 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 **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | 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 **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | void | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | 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 **)** |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | 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 **)** |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | 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 **)** |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | 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 **)** |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | 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 **)** |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | 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 **)** |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :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| |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :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| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :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| |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | 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={} **)** |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :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 **)** |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :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 **)** |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | 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| |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | 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| |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :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, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)** |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :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| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :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| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :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| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :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| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :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| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :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, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :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, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :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| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :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| |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :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| |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const| |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :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| |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :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| |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :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| |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | 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, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)** |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  381. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :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| |
  383. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :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 **)** |
  385. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | 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 **)** |
  387. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | 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 **)** |
  389. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | 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 **)** |
  391. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | 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 **)** |
  393. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | 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 **)** |
  395. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | 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 **)** |
  397. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | 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 **)** |
  399. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  401. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  403. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | :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| |
  405. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | :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 **)** |
  407. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
  409. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  410. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  411. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  412. | :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| |
  413. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  414. | :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| |
  415. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  416. | :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| |
  417. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  418. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  419. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  420. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  421. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  422. .. rst-class:: classref-section-separator
  423. ----
  424. .. rst-class:: classref-descriptions-group
  425. Enumerations
  426. ------------
  427. .. _enum_TextServer_FontAntialiasing:
  428. .. rst-class:: classref-enumeration
  429. enum **FontAntialiasing**:
  430. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  431. .. rst-class:: classref-enumeration-constant
  432. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  433. Font glyphs are rasterized as 1-bit bitmaps.
  434. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  435. .. rst-class:: classref-enumeration-constant
  436. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  437. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  438. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  439. .. rst-class:: classref-enumeration-constant
  440. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  441. Font glyphs are rasterized for LCD screens.
  442. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  443. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  444. .. rst-class:: classref-item-separator
  445. ----
  446. .. _enum_TextServer_FontLCDSubpixelLayout:
  447. .. rst-class:: classref-enumeration
  448. enum **FontLCDSubpixelLayout**:
  449. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  450. .. rst-class:: classref-enumeration-constant
  451. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  452. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  453. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  454. .. rst-class:: classref-enumeration-constant
  455. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  456. Horizontal RGB subpixel layout.
  457. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  458. .. rst-class:: classref-enumeration-constant
  459. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  460. Horizontal BGR subpixel layout.
  461. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  462. .. rst-class:: classref-enumeration-constant
  463. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  464. Vertical RGB subpixel layout.
  465. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  466. .. rst-class:: classref-enumeration-constant
  467. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  468. Vertical BGR subpixel layout.
  469. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  470. .. rst-class:: classref-enumeration-constant
  471. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _enum_TextServer_Direction:
  475. .. rst-class:: classref-enumeration
  476. enum **Direction**:
  477. .. _class_TextServer_constant_DIRECTION_AUTO:
  478. .. rst-class:: classref-enumeration-constant
  479. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  480. Text direction is determined based on contents and current locale.
  481. .. _class_TextServer_constant_DIRECTION_LTR:
  482. .. rst-class:: classref-enumeration-constant
  483. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  484. Text is written from left to right.
  485. .. _class_TextServer_constant_DIRECTION_RTL:
  486. .. rst-class:: classref-enumeration-constant
  487. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  488. Text is written from right to left.
  489. .. _class_TextServer_constant_DIRECTION_INHERITED:
  490. .. rst-class:: classref-enumeration-constant
  491. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  492. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  493. .. rst-class:: classref-item-separator
  494. ----
  495. .. _enum_TextServer_Orientation:
  496. .. rst-class:: classref-enumeration
  497. enum **Orientation**:
  498. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  499. .. rst-class:: classref-enumeration-constant
  500. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  501. Text is written horizontally.
  502. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  503. .. rst-class:: classref-enumeration-constant
  504. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  505. Left to right text is written vertically from top to bottom.
  506. Right to left text is written vertically from bottom to top.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _enum_TextServer_JustificationFlag:
  510. .. rst-class:: classref-enumeration
  511. flags **JustificationFlag**:
  512. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  513. .. rst-class:: classref-enumeration-constant
  514. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  515. Do not justify text.
  516. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  517. .. rst-class:: classref-enumeration-constant
  518. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  519. Justify text by adding and removing kashidas.
  520. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  521. .. rst-class:: classref-enumeration-constant
  522. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  523. Justify text by changing width of the spaces between the words.
  524. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  525. .. rst-class:: classref-enumeration-constant
  526. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  527. Remove trailing and leading spaces from the justified text.
  528. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  529. .. rst-class:: classref-enumeration-constant
  530. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  531. Only apply justification to the part of the text after the last tab.
  532. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  533. .. rst-class:: classref-enumeration-constant
  534. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  535. Apply justification to the trimmed line with ellipsis.
  536. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  537. .. rst-class:: classref-enumeration-constant
  538. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  539. Do not apply justification to the last line of the paragraph.
  540. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  541. .. rst-class:: classref-enumeration-constant
  542. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  543. Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>`).
  544. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  545. .. rst-class:: classref-enumeration-constant
  546. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  547. Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS>` are ignored).
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _enum_TextServer_AutowrapMode:
  551. .. rst-class:: classref-enumeration
  552. enum **AutowrapMode**:
  553. .. _class_TextServer_constant_AUTOWRAP_OFF:
  554. .. rst-class:: classref-enumeration-constant
  555. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  556. Autowrap is disabled.
  557. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  558. .. rst-class:: classref-enumeration-constant
  559. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  560. 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.
  561. .. _class_TextServer_constant_AUTOWRAP_WORD:
  562. .. rst-class:: classref-enumeration-constant
  563. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  564. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  565. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  566. .. rst-class:: classref-enumeration-constant
  567. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  568. 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.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _enum_TextServer_LineBreakFlag:
  572. .. rst-class:: classref-enumeration
  573. flags **LineBreakFlag**:
  574. .. _class_TextServer_constant_BREAK_NONE:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  577. Do not break the line.
  578. .. _class_TextServer_constant_BREAK_MANDATORY:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  581. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  582. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  585. Break the line between the words.
  586. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  587. .. rst-class:: classref-enumeration-constant
  588. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  589. Break the line between any unconnected graphemes.
  590. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  591. .. rst-class:: classref-enumeration-constant
  592. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  593. 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.
  594. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  595. .. rst-class:: classref-enumeration-constant
  596. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  597. Remove edge spaces from the broken line segments.
  598. .. rst-class:: classref-item-separator
  599. ----
  600. .. _enum_TextServer_VisibleCharactersBehavior:
  601. .. rst-class:: classref-enumeration
  602. enum **VisibleCharactersBehavior**:
  603. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  604. .. rst-class:: classref-enumeration-constant
  605. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  606. 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.
  607. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  608. .. rst-class:: classref-enumeration-constant
  609. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  610. 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.
  611. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  612. .. rst-class:: classref-enumeration-constant
  613. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  614. 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.
  615. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  616. .. rst-class:: classref-enumeration-constant
  617. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  618. 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.
  619. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  620. .. rst-class:: classref-enumeration-constant
  621. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  622. 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.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _enum_TextServer_OverrunBehavior:
  626. .. rst-class:: classref-enumeration
  627. enum **OverrunBehavior**:
  628. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  629. .. rst-class:: classref-enumeration-constant
  630. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  631. No text trimming is performed.
  632. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  633. .. rst-class:: classref-enumeration-constant
  634. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  635. Trims the text per character.
  636. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  637. .. rst-class:: classref-enumeration-constant
  638. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  639. Trims the text per word.
  640. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  641. .. rst-class:: classref-enumeration-constant
  642. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  643. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  644. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  645. .. rst-class:: classref-enumeration-constant
  646. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  647. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _enum_TextServer_TextOverrunFlag:
  651. .. rst-class:: classref-enumeration
  652. flags **TextOverrunFlag**:
  653. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  656. No trimming is performed.
  657. .. _class_TextServer_constant_OVERRUN_TRIM:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  660. Trims the text when it exceeds the given width.
  661. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  664. Trims the text per word instead of per grapheme.
  665. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  668. Determines whether an ellipsis should be added at the end of the text.
  669. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  672. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  673. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  674. .. rst-class:: classref-enumeration-constant
  675. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _enum_TextServer_GraphemeFlag:
  679. .. rst-class:: classref-enumeration
  680. flags **GraphemeFlag**:
  681. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  682. .. rst-class:: classref-enumeration-constant
  683. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  684. Grapheme is supported by the font, and can be drawn.
  685. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  688. Grapheme is part of right-to-left or bottom-to-top run.
  689. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  692. Grapheme is not part of source text, it was added by justification process.
  693. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  694. .. rst-class:: classref-enumeration-constant
  695. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  696. Grapheme is whitespace.
  697. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  700. Grapheme is mandatory break point (e.g. ``"\n"``).
  701. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  704. Grapheme is optional break point (e.g. space).
  705. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  708. Grapheme is the tabulation character.
  709. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  712. Grapheme is kashida.
  713. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  716. Grapheme is punctuation character.
  717. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  720. Grapheme is underscore character.
  721. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  724. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  725. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  728. It is safe to insert a U+0640 before this grapheme for elongation.
  729. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  732. Grapheme is an object replacement character for the embedded object.
  733. .. rst-class:: classref-item-separator
  734. ----
  735. .. _enum_TextServer_Hinting:
  736. .. rst-class:: classref-enumeration
  737. enum **Hinting**:
  738. .. _class_TextServer_constant_HINTING_NONE:
  739. .. rst-class:: classref-enumeration-constant
  740. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  741. Disables font hinting (smoother but less crisp).
  742. .. _class_TextServer_constant_HINTING_LIGHT:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  745. Use the light font hinting mode.
  746. .. _class_TextServer_constant_HINTING_NORMAL:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  749. Use the default font hinting mode (crisper but less smooth).
  750. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  751. .. rst-class:: classref-item-separator
  752. ----
  753. .. _enum_TextServer_SubpixelPositioning:
  754. .. rst-class:: classref-enumeration
  755. enum **SubpixelPositioning**:
  756. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  757. .. rst-class:: classref-enumeration-constant
  758. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  759. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  760. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  761. .. rst-class:: classref-enumeration-constant
  762. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  763. Glyph horizontal position is rounded based on font size.
  764. - 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>`.
  765. - 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>`.
  766. - To the whole pixel size for larger fonts.
  767. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  768. .. rst-class:: classref-enumeration-constant
  769. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  770. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  771. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  772. .. rst-class:: classref-enumeration-constant
  773. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  774. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  775. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  776. .. rst-class:: classref-enumeration-constant
  777. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  778. 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.
  779. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  780. .. rst-class:: classref-enumeration-constant
  781. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  782. 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.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _enum_TextServer_Feature:
  786. .. rst-class:: classref-enumeration
  787. enum **Feature**:
  788. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  791. TextServer supports simple text layouts.
  792. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  795. TextServer supports bidirectional text layouts.
  796. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  799. TextServer supports vertical layouts.
  800. .. _class_TextServer_constant_FEATURE_SHAPING:
  801. .. rst-class:: classref-enumeration-constant
  802. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  803. TextServer supports complex text shaping.
  804. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  805. .. rst-class:: classref-enumeration-constant
  806. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  807. TextServer supports justification using kashidas.
  808. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  809. .. rst-class:: classref-enumeration-constant
  810. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  811. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  812. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  813. .. rst-class:: classref-enumeration-constant
  814. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  815. TextServer supports loading bitmap fonts.
  816. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  817. .. rst-class:: classref-enumeration-constant
  818. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  819. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  820. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  821. .. rst-class:: classref-enumeration-constant
  822. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  823. TextServer supports multichannel signed distance field dynamic font rendering.
  824. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  827. TextServer supports loading system fonts.
  828. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  831. TextServer supports variable fonts.
  832. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  833. .. rst-class:: classref-enumeration-constant
  834. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  835. TextServer supports locale dependent and context sensitive case conversion.
  836. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  839. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  840. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  841. .. rst-class:: classref-enumeration-constant
  842. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  843. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  844. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  845. .. rst-class:: classref-enumeration-constant
  846. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  847. 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.
  848. .. rst-class:: classref-item-separator
  849. ----
  850. .. _enum_TextServer_ContourPointTag:
  851. .. rst-class:: classref-enumeration
  852. enum **ContourPointTag**:
  853. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  854. .. rst-class:: classref-enumeration-constant
  855. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  856. Contour point is on the curve.
  857. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  858. .. rst-class:: classref-enumeration-constant
  859. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  860. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  861. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  862. .. rst-class:: classref-enumeration-constant
  863. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  864. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  865. .. rst-class:: classref-item-separator
  866. ----
  867. .. _enum_TextServer_SpacingType:
  868. .. rst-class:: classref-enumeration
  869. enum **SpacingType**:
  870. .. _class_TextServer_constant_SPACING_GLYPH:
  871. .. rst-class:: classref-enumeration-constant
  872. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  873. Spacing for each glyph.
  874. .. _class_TextServer_constant_SPACING_SPACE:
  875. .. rst-class:: classref-enumeration-constant
  876. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  877. Spacing for the space character.
  878. .. _class_TextServer_constant_SPACING_TOP:
  879. .. rst-class:: classref-enumeration-constant
  880. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  881. Spacing at the top of the line.
  882. .. _class_TextServer_constant_SPACING_BOTTOM:
  883. .. rst-class:: classref-enumeration-constant
  884. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  885. Spacing at the bottom of the line.
  886. .. _class_TextServer_constant_SPACING_MAX:
  887. .. rst-class:: classref-enumeration-constant
  888. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  889. .. rst-class:: classref-item-separator
  890. ----
  891. .. _enum_TextServer_FontStyle:
  892. .. rst-class:: classref-enumeration
  893. flags **FontStyle**:
  894. .. _class_TextServer_constant_FONT_BOLD:
  895. .. rst-class:: classref-enumeration-constant
  896. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  897. Font is bold.
  898. .. _class_TextServer_constant_FONT_ITALIC:
  899. .. rst-class:: classref-enumeration-constant
  900. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  901. Font is italic or oblique.
  902. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  905. Font have fixed-width characters.
  906. .. rst-class:: classref-item-separator
  907. ----
  908. .. _enum_TextServer_StructuredTextParser:
  909. .. rst-class:: classref-enumeration
  910. enum **StructuredTextParser**:
  911. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  912. .. rst-class:: classref-enumeration-constant
  913. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  914. Use default Unicode BiDi algorithm.
  915. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  916. .. rst-class:: classref-enumeration-constant
  917. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  918. BiDi override for URI.
  919. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  920. .. rst-class:: classref-enumeration-constant
  921. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  922. BiDi override for file path.
  923. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  924. .. rst-class:: classref-enumeration-constant
  925. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  926. BiDi override for email.
  927. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  928. .. rst-class:: classref-enumeration-constant
  929. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  930. BiDi override for lists.
  931. Structured text options: list separator ``String``.
  932. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  933. .. rst-class:: classref-enumeration-constant
  934. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  935. BiDi override for GDScript.
  936. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  937. .. rst-class:: classref-enumeration-constant
  938. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  939. User defined structured text BiDi override function.
  940. .. rst-class:: classref-section-separator
  941. ----
  942. .. rst-class:: classref-descriptions-group
  943. Method Descriptions
  944. -------------------
  945. .. _class_TextServer_method_create_font:
  946. .. rst-class:: classref-method
  947. :ref:`RID<class_RID>` **create_font** **(** **)**
  948. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_TextServer_method_create_shaped_text:
  952. .. rst-class:: classref-method
  953. :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  954. 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.
  955. \ **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>`).
  956. \ **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>`).
  957. .. rst-class:: classref-item-separator
  958. ----
  959. .. _class_TextServer_method_draw_hex_code_box:
  960. .. rst-class:: classref-method
  961. 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|
  962. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  963. .. rst-class:: classref-item-separator
  964. ----
  965. .. _class_TextServer_method_font_clear_glyphs:
  966. .. rst-class:: classref-method
  967. void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  968. Removes all rendered glyphs information from the cache entry.
  969. \ **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.
  970. .. rst-class:: classref-item-separator
  971. ----
  972. .. _class_TextServer_method_font_clear_kerning_map:
  973. .. rst-class:: classref-method
  974. void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  975. Removes all kerning overrides.
  976. .. rst-class:: classref-item-separator
  977. ----
  978. .. _class_TextServer_method_font_clear_size_cache:
  979. .. rst-class:: classref-method
  980. void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  981. Removes all font sizes from the cache entry.
  982. .. rst-class:: classref-item-separator
  983. ----
  984. .. _class_TextServer_method_font_clear_textures:
  985. .. rst-class:: classref-method
  986. void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  987. Removes all textures from font cache entry.
  988. \ **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.
  989. .. rst-class:: classref-item-separator
  990. ----
  991. .. _class_TextServer_method_font_draw_glyph:
  992. .. rst-class:: classref-method
  993. 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|
  994. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  995. \ **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>`.
  996. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_TextServer_method_font_draw_glyph_outline:
  1000. .. rst-class:: classref-method
  1001. 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|
  1002. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1003. \ **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>`.
  1004. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1005. .. rst-class:: classref-item-separator
  1006. ----
  1007. .. _class_TextServer_method_font_get_antialiasing:
  1008. .. rst-class:: classref-method
  1009. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1010. Returns font anti-aliasing mode.
  1011. .. rst-class:: classref-item-separator
  1012. ----
  1013. .. _class_TextServer_method_font_get_ascent:
  1014. .. rst-class:: classref-method
  1015. :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1016. Returns the font ascent (number of pixels above the baseline).
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1020. .. rst-class:: classref-method
  1021. :ref:`int<class_int>` **font_get_char_from_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const|
  1022. Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  1023. .. rst-class:: classref-item-separator
  1024. ----
  1025. .. _class_TextServer_method_font_get_descent:
  1026. .. rst-class:: classref-method
  1027. :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1028. Returns the font descent (number of pixels below the baseline).
  1029. .. rst-class:: classref-item-separator
  1030. ----
  1031. .. _class_TextServer_method_font_get_embolden:
  1032. .. rst-class:: classref-method
  1033. :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1034. Returns font embolden strength.
  1035. .. rst-class:: classref-item-separator
  1036. ----
  1037. .. _class_TextServer_method_font_get_face_count:
  1038. .. rst-class:: classref-method
  1039. :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1040. Returns number of faces in the TrueType / OpenType collection.
  1041. .. rst-class:: classref-item-separator
  1042. ----
  1043. .. _class_TextServer_method_font_get_face_index:
  1044. .. rst-class:: classref-method
  1045. :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1046. Recturns an active face index in the TrueType / OpenType collection.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_TextServer_method_font_get_fixed_size:
  1050. .. rst-class:: classref-method
  1051. :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1052. Returns bitmap font fixed size.
  1053. .. rst-class:: classref-item-separator
  1054. ----
  1055. .. _class_TextServer_method_font_get_generate_mipmaps:
  1056. .. rst-class:: classref-method
  1057. :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1058. Returns ``true`` if font texture mipmap generation is enabled.
  1059. .. rst-class:: classref-item-separator
  1060. ----
  1061. .. _class_TextServer_method_font_get_global_oversampling:
  1062. .. rst-class:: classref-method
  1063. :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  1064. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1065. .. rst-class:: classref-item-separator
  1066. ----
  1067. .. _class_TextServer_method_font_get_glyph_advance:
  1068. .. rst-class:: classref-method
  1069. :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|
  1070. Returns glyph advance (offset of the next glyph).
  1071. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1072. .. rst-class:: classref-item-separator
  1073. ----
  1074. .. _class_TextServer_method_font_get_glyph_contours:
  1075. .. rst-class:: classref-method
  1076. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1077. Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
  1078. \ ``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.
  1079. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1080. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1081. .. rst-class:: classref-item-separator
  1082. ----
  1083. .. _class_TextServer_method_font_get_glyph_index:
  1084. .. rst-class:: classref-method
  1085. :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|
  1086. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`.
  1087. .. rst-class:: classref-item-separator
  1088. ----
  1089. .. _class_TextServer_method_font_get_glyph_list:
  1090. .. rst-class:: classref-method
  1091. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1092. Returns list of rendered glyphs in the cache entry.
  1093. .. rst-class:: classref-item-separator
  1094. ----
  1095. .. _class_TextServer_method_font_get_glyph_offset:
  1096. .. rst-class:: classref-method
  1097. :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|
  1098. Returns glyph offset from the baseline.
  1099. .. rst-class:: classref-item-separator
  1100. ----
  1101. .. _class_TextServer_method_font_get_glyph_size:
  1102. .. rst-class:: classref-method
  1103. :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|
  1104. Returns size of the glyph.
  1105. .. rst-class:: classref-item-separator
  1106. ----
  1107. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1108. .. rst-class:: classref-method
  1109. :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|
  1110. Returns index of the cache texture containing the glyph.
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1114. .. rst-class:: classref-method
  1115. :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|
  1116. Returns resource ID of the cache texture containing the glyph.
  1117. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1118. .. rst-class:: classref-item-separator
  1119. ----
  1120. .. _class_TextServer_method_font_get_glyph_texture_size:
  1121. .. rst-class:: classref-method
  1122. :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|
  1123. Returns size of the cache texture containing the glyph.
  1124. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1125. .. rst-class:: classref-item-separator
  1126. ----
  1127. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1128. .. rst-class:: classref-method
  1129. :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|
  1130. Returns rectangle in the cache texture containing the glyph.
  1131. .. rst-class:: classref-item-separator
  1132. ----
  1133. .. _class_TextServer_method_font_get_hinting:
  1134. .. rst-class:: classref-method
  1135. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1136. Returns the font hinting mode. Used by dynamic fonts only.
  1137. .. rst-class:: classref-item-separator
  1138. ----
  1139. .. _class_TextServer_method_font_get_kerning:
  1140. .. rst-class:: classref-method
  1141. :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|
  1142. Returns kerning for the pair of glyphs.
  1143. .. rst-class:: classref-item-separator
  1144. ----
  1145. .. _class_TextServer_method_font_get_kerning_list:
  1146. .. rst-class:: classref-method
  1147. :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1148. Returns list of the kerning overrides.
  1149. .. rst-class:: classref-item-separator
  1150. ----
  1151. .. _class_TextServer_method_font_get_language_support_override:
  1152. .. rst-class:: classref-method
  1153. :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1154. Returns ``true`` if support override is enabled for the ``language``.
  1155. .. rst-class:: classref-item-separator
  1156. ----
  1157. .. _class_TextServer_method_font_get_language_support_overrides:
  1158. .. rst-class:: classref-method
  1159. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1160. Returns list of language support overrides.
  1161. .. rst-class:: classref-item-separator
  1162. ----
  1163. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1164. .. rst-class:: classref-method
  1165. :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1166. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1167. .. rst-class:: classref-item-separator
  1168. ----
  1169. .. _class_TextServer_method_font_get_msdf_size:
  1170. .. rst-class:: classref-method
  1171. :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1172. Returns source font size used to generate MSDF textures.
  1173. .. rst-class:: classref-item-separator
  1174. ----
  1175. .. _class_TextServer_method_font_get_name:
  1176. .. rst-class:: classref-method
  1177. :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1178. Returns font family name.
  1179. .. rst-class:: classref-item-separator
  1180. ----
  1181. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1182. .. rst-class:: classref-method
  1183. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1184. Returns font OpenType feature set override.
  1185. .. rst-class:: classref-item-separator
  1186. ----
  1187. .. _class_TextServer_method_font_get_ot_name_strings:
  1188. .. rst-class:: classref-method
  1189. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1190. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1191. .. rst-class:: classref-item-separator
  1192. ----
  1193. .. _class_TextServer_method_font_get_oversampling:
  1194. .. rst-class:: classref-method
  1195. :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1196. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1197. .. rst-class:: classref-item-separator
  1198. ----
  1199. .. _class_TextServer_method_font_get_scale:
  1200. .. rst-class:: classref-method
  1201. :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1202. Returns scaling factor of the color bitmap font.
  1203. .. rst-class:: classref-item-separator
  1204. ----
  1205. .. _class_TextServer_method_font_get_script_support_override:
  1206. .. rst-class:: classref-method
  1207. :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1208. Returns ``true`` if support override is enabled for the ``script``.
  1209. .. rst-class:: classref-item-separator
  1210. ----
  1211. .. _class_TextServer_method_font_get_script_support_overrides:
  1212. .. rst-class:: classref-method
  1213. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1214. Returns list of script support overrides.
  1215. .. rst-class:: classref-item-separator
  1216. ----
  1217. .. _class_TextServer_method_font_get_size_cache_list:
  1218. .. rst-class:: classref-method
  1219. :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1220. Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
  1221. .. rst-class:: classref-item-separator
  1222. ----
  1223. .. _class_TextServer_method_font_get_spacing:
  1224. .. rst-class:: classref-method
  1225. :ref:`int<class_int>` **font_get_spacing** **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1226. Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  1227. .. rst-class:: classref-item-separator
  1228. ----
  1229. .. _class_TextServer_method_font_get_stretch:
  1230. .. rst-class:: classref-method
  1231. :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1232. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1233. .. rst-class:: classref-item-separator
  1234. ----
  1235. .. _class_TextServer_method_font_get_style:
  1236. .. rst-class:: classref-method
  1237. |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1238. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1239. .. rst-class:: classref-item-separator
  1240. ----
  1241. .. _class_TextServer_method_font_get_style_name:
  1242. .. rst-class:: classref-method
  1243. :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1244. Returns font style name.
  1245. .. rst-class:: classref-item-separator
  1246. ----
  1247. .. _class_TextServer_method_font_get_subpixel_positioning:
  1248. .. rst-class:: classref-method
  1249. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1250. Returns font subpixel glyph positioning mode.
  1251. .. rst-class:: classref-item-separator
  1252. ----
  1253. .. _class_TextServer_method_font_get_supported_chars:
  1254. .. rst-class:: classref-method
  1255. :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1256. Returns a string containing all the characters available in the font.
  1257. .. rst-class:: classref-item-separator
  1258. ----
  1259. .. _class_TextServer_method_font_get_texture_count:
  1260. .. rst-class:: classref-method
  1261. :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1262. Returns number of textures used by font cache entry.
  1263. .. rst-class:: classref-item-separator
  1264. ----
  1265. .. _class_TextServer_method_font_get_texture_image:
  1266. .. rst-class:: classref-method
  1267. :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|
  1268. Returns font cache texture image data.
  1269. .. rst-class:: classref-item-separator
  1270. ----
  1271. .. _class_TextServer_method_font_get_texture_offsets:
  1272. .. rst-class:: classref-method
  1273. :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|
  1274. Returns array containing glyph packing data.
  1275. .. rst-class:: classref-item-separator
  1276. ----
  1277. .. _class_TextServer_method_font_get_transform:
  1278. .. rst-class:: classref-method
  1279. :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1280. Returns 2D transform applied to the font outlines.
  1281. .. rst-class:: classref-item-separator
  1282. ----
  1283. .. _class_TextServer_method_font_get_underline_position:
  1284. .. rst-class:: classref-method
  1285. :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1286. Returns pixel offset of the underline below the baseline.
  1287. .. rst-class:: classref-item-separator
  1288. ----
  1289. .. _class_TextServer_method_font_get_underline_thickness:
  1290. .. rst-class:: classref-method
  1291. :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1292. Returns thickness of the underline in pixels.
  1293. .. rst-class:: classref-item-separator
  1294. ----
  1295. .. _class_TextServer_method_font_get_variation_coordinates:
  1296. .. rst-class:: classref-method
  1297. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1298. 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.
  1299. .. rst-class:: classref-item-separator
  1300. ----
  1301. .. _class_TextServer_method_font_get_weight:
  1302. .. rst-class:: classref-method
  1303. :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1304. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1305. .. rst-class:: classref-item-separator
  1306. ----
  1307. .. _class_TextServer_method_font_has_char:
  1308. .. rst-class:: classref-method
  1309. :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  1310. Returns ``true`` if a Unicode ``char`` is available in the font.
  1311. .. rst-class:: classref-item-separator
  1312. ----
  1313. .. _class_TextServer_method_font_is_allow_system_fallback:
  1314. .. rst-class:: classref-method
  1315. :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1316. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1317. .. rst-class:: classref-item-separator
  1318. ----
  1319. .. _class_TextServer_method_font_is_force_autohinter:
  1320. .. rst-class:: classref-method
  1321. :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1322. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1323. .. rst-class:: classref-item-separator
  1324. ----
  1325. .. _class_TextServer_method_font_is_language_supported:
  1326. .. rst-class:: classref-method
  1327. :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  1328. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1329. .. rst-class:: classref-item-separator
  1330. ----
  1331. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1332. .. rst-class:: classref-method
  1333. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1334. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1335. .. rst-class:: classref-item-separator
  1336. ----
  1337. .. _class_TextServer_method_font_is_script_supported:
  1338. .. rst-class:: classref-method
  1339. :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  1340. Returns ``true``, if font supports given script (ISO 15924 code).
  1341. .. rst-class:: classref-item-separator
  1342. ----
  1343. .. _class_TextServer_method_font_remove_glyph:
  1344. .. rst-class:: classref-method
  1345. void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  1346. Removes specified rendered glyph information from the cache entry.
  1347. \ **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.
  1348. .. rst-class:: classref-item-separator
  1349. ----
  1350. .. _class_TextServer_method_font_remove_kerning:
  1351. .. rst-class:: classref-method
  1352. void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  1353. Removes kerning override for the pair of glyphs.
  1354. .. rst-class:: classref-item-separator
  1355. ----
  1356. .. _class_TextServer_method_font_remove_language_support_override:
  1357. .. rst-class:: classref-method
  1358. void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1359. Remove language support override.
  1360. .. rst-class:: classref-item-separator
  1361. ----
  1362. .. _class_TextServer_method_font_remove_script_support_override:
  1363. .. rst-class:: classref-method
  1364. void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1365. Removes script support override.
  1366. .. rst-class:: classref-item-separator
  1367. ----
  1368. .. _class_TextServer_method_font_remove_size_cache:
  1369. .. rst-class:: classref-method
  1370. void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1371. Removes specified font size from the cache entry.
  1372. .. rst-class:: classref-item-separator
  1373. ----
  1374. .. _class_TextServer_method_font_remove_texture:
  1375. .. rst-class:: classref-method
  1376. void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  1377. Removes specified texture from the cache entry.
  1378. \ **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>`.
  1379. .. rst-class:: classref-item-separator
  1380. ----
  1381. .. _class_TextServer_method_font_render_glyph:
  1382. .. rst-class:: classref-method
  1383. void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  1384. Renders specified glyph to the font cache texture.
  1385. .. rst-class:: classref-item-separator
  1386. ----
  1387. .. _class_TextServer_method_font_render_range:
  1388. .. rst-class:: classref-method
  1389. 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 **)**
  1390. Renders the range of characters to the font cache texture.
  1391. .. rst-class:: classref-item-separator
  1392. ----
  1393. .. _class_TextServer_method_font_set_allow_system_fallback:
  1394. .. rst-class:: classref-method
  1395. void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
  1396. If set to ``true``, system fonts can be automatically used as fallbacks.
  1397. .. rst-class:: classref-item-separator
  1398. ----
  1399. .. _class_TextServer_method_font_set_antialiasing:
  1400. .. rst-class:: classref-method
  1401. void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
  1402. Sets font anti-aliasing mode.
  1403. .. rst-class:: classref-item-separator
  1404. ----
  1405. .. _class_TextServer_method_font_set_ascent:
  1406. .. rst-class:: classref-method
  1407. void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  1408. Sets the font ascent (number of pixels above the baseline).
  1409. .. rst-class:: classref-item-separator
  1410. ----
  1411. .. _class_TextServer_method_font_set_data:
  1412. .. rst-class:: classref-method
  1413. void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  1414. Sets font source data, e.g contents of the dynamic font source file.
  1415. .. rst-class:: classref-item-separator
  1416. ----
  1417. .. _class_TextServer_method_font_set_descent:
  1418. .. rst-class:: classref-method
  1419. void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  1420. Sets the font descent (number of pixels below the baseline).
  1421. .. rst-class:: classref-item-separator
  1422. ----
  1423. .. _class_TextServer_method_font_set_embolden:
  1424. .. rst-class:: classref-method
  1425. void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  1426. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1427. .. rst-class:: classref-item-separator
  1428. ----
  1429. .. _class_TextServer_method_font_set_face_index:
  1430. .. rst-class:: classref-method
  1431. void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  1432. Sets an active face index in the TrueType / OpenType collection.
  1433. .. rst-class:: classref-item-separator
  1434. ----
  1435. .. _class_TextServer_method_font_set_fixed_size:
  1436. .. rst-class:: classref-method
  1437. void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  1438. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1439. .. rst-class:: classref-item-separator
  1440. ----
  1441. .. _class_TextServer_method_font_set_force_autohinter:
  1442. .. rst-class:: classref-method
  1443. void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  1444. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1445. .. rst-class:: classref-item-separator
  1446. ----
  1447. .. _class_TextServer_method_font_set_generate_mipmaps:
  1448. .. rst-class:: classref-method
  1449. void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  1450. If set to ``true`` font texture mipmap generation is enabled.
  1451. .. rst-class:: classref-item-separator
  1452. ----
  1453. .. _class_TextServer_method_font_set_global_oversampling:
  1454. .. rst-class:: classref-method
  1455. void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  1456. Sets oversampling factor, shared by all font in the TextServer.
  1457. \ **Note:** This value can be automatically changed by display server.
  1458. .. rst-class:: classref-item-separator
  1459. ----
  1460. .. _class_TextServer_method_font_set_glyph_advance:
  1461. .. rst-class:: classref-method
  1462. 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 **)**
  1463. Sets glyph advance (offset of the next glyph).
  1464. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1465. .. rst-class:: classref-item-separator
  1466. ----
  1467. .. _class_TextServer_method_font_set_glyph_offset:
  1468. .. rst-class:: classref-method
  1469. 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 **)**
  1470. Sets glyph offset from the baseline.
  1471. .. rst-class:: classref-item-separator
  1472. ----
  1473. .. _class_TextServer_method_font_set_glyph_size:
  1474. .. rst-class:: classref-method
  1475. 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 **)**
  1476. Sets size of the glyph.
  1477. .. rst-class:: classref-item-separator
  1478. ----
  1479. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1480. .. rst-class:: classref-method
  1481. 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 **)**
  1482. Sets index of the cache texture containing the glyph.
  1483. .. rst-class:: classref-item-separator
  1484. ----
  1485. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1486. .. rst-class:: classref-method
  1487. 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 **)**
  1488. Sets rectangle in the cache texture containing the glyph.
  1489. .. rst-class:: classref-item-separator
  1490. ----
  1491. .. _class_TextServer_method_font_set_hinting:
  1492. .. rst-class:: classref-method
  1493. void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  1494. Sets font hinting mode. Used by dynamic fonts only.
  1495. .. rst-class:: classref-item-separator
  1496. ----
  1497. .. _class_TextServer_method_font_set_kerning:
  1498. .. rst-class:: classref-method
  1499. 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 **)**
  1500. Sets kerning for the pair of glyphs.
  1501. .. rst-class:: classref-item-separator
  1502. ----
  1503. .. _class_TextServer_method_font_set_language_support_override:
  1504. .. rst-class:: classref-method
  1505. void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  1506. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1507. .. rst-class:: classref-item-separator
  1508. ----
  1509. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1510. .. rst-class:: classref-method
  1511. void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  1512. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1513. .. rst-class:: classref-item-separator
  1514. ----
  1515. .. _class_TextServer_method_font_set_msdf_size:
  1516. .. rst-class:: classref-method
  1517. void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  1518. Sets source font size used to generate MSDF textures.
  1519. .. rst-class:: classref-item-separator
  1520. ----
  1521. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1522. .. rst-class:: classref-method
  1523. void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  1524. 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.
  1525. \ **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.
  1526. .. rst-class:: classref-item-separator
  1527. ----
  1528. .. _class_TextServer_method_font_set_name:
  1529. .. rst-class:: classref-method
  1530. void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1531. Sets the font family name.
  1532. .. rst-class:: classref-item-separator
  1533. ----
  1534. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1535. .. rst-class:: classref-method
  1536. void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  1537. Sets font OpenType feature set override.
  1538. .. rst-class:: classref-item-separator
  1539. ----
  1540. .. _class_TextServer_method_font_set_oversampling:
  1541. .. rst-class:: classref-method
  1542. void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  1543. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1544. .. rst-class:: classref-item-separator
  1545. ----
  1546. .. _class_TextServer_method_font_set_scale:
  1547. .. rst-class:: classref-method
  1548. void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  1549. Sets scaling factor of the color bitmap font.
  1550. .. rst-class:: classref-item-separator
  1551. ----
  1552. .. _class_TextServer_method_font_set_script_support_override:
  1553. .. rst-class:: classref-method
  1554. void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  1555. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1556. .. rst-class:: classref-item-separator
  1557. ----
  1558. .. _class_TextServer_method_font_set_spacing:
  1559. .. rst-class:: classref-method
  1560. void **font_set_spacing** **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  1561. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  1562. .. rst-class:: classref-item-separator
  1563. ----
  1564. .. _class_TextServer_method_font_set_stretch:
  1565. .. rst-class:: classref-method
  1566. void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1567. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1568. \ **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.
  1569. .. rst-class:: classref-item-separator
  1570. ----
  1571. .. _class_TextServer_method_font_set_style:
  1572. .. rst-class:: classref-method
  1573. void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)**
  1574. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  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>`, :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`, or :ref:`font_set_transform<class_TextServer_method_font_set_transform>` instead.
  1576. .. rst-class:: classref-item-separator
  1577. ----
  1578. .. _class_TextServer_method_font_set_style_name:
  1579. .. rst-class:: classref-method
  1580. void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1581. Sets the font style name.
  1582. .. rst-class:: classref-item-separator
  1583. ----
  1584. .. _class_TextServer_method_font_set_subpixel_positioning:
  1585. .. rst-class:: classref-method
  1586. void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1587. Sets font subpixel glyph positioning mode.
  1588. .. rst-class:: classref-item-separator
  1589. ----
  1590. .. _class_TextServer_method_font_set_texture_image:
  1591. .. rst-class:: classref-method
  1592. 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 **)**
  1593. Sets font cache texture image data.
  1594. .. rst-class:: classref-item-separator
  1595. ----
  1596. .. _class_TextServer_method_font_set_texture_offsets:
  1597. .. rst-class:: classref-method
  1598. 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 **)**
  1599. Sets array containing glyph packing data.
  1600. .. rst-class:: classref-item-separator
  1601. ----
  1602. .. _class_TextServer_method_font_set_transform:
  1603. .. rst-class:: classref-method
  1604. void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1605. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1606. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1607. .. rst-class:: classref-item-separator
  1608. ----
  1609. .. _class_TextServer_method_font_set_underline_position:
  1610. .. rst-class:: classref-method
  1611. void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1612. Sets pixel offset of the underline below the baseline.
  1613. .. rst-class:: classref-item-separator
  1614. ----
  1615. .. _class_TextServer_method_font_set_underline_thickness:
  1616. .. rst-class:: classref-method
  1617. void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1618. Sets thickness of the underline in pixels.
  1619. .. rst-class:: classref-item-separator
  1620. ----
  1621. .. _class_TextServer_method_font_set_variation_coordinates:
  1622. .. rst-class:: classref-method
  1623. void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1624. 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.
  1625. .. rst-class:: classref-item-separator
  1626. ----
  1627. .. _class_TextServer_method_font_set_weight:
  1628. .. rst-class:: classref-method
  1629. void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1630. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1631. \ **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.
  1632. .. rst-class:: classref-item-separator
  1633. ----
  1634. .. _class_TextServer_method_font_supported_feature_list:
  1635. .. rst-class:: classref-method
  1636. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1637. Returns the dictionary of the supported OpenType features.
  1638. .. rst-class:: classref-item-separator
  1639. ----
  1640. .. _class_TextServer_method_font_supported_variation_list:
  1641. .. rst-class:: classref-method
  1642. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1643. Returns the dictionary of the supported OpenType variation coordinates.
  1644. .. rst-class:: classref-item-separator
  1645. ----
  1646. .. _class_TextServer_method_format_number:
  1647. .. rst-class:: classref-method
  1648. :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1649. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1650. If ``language`` is omitted, the active locale will be used.
  1651. .. rst-class:: classref-item-separator
  1652. ----
  1653. .. _class_TextServer_method_free_rid:
  1654. .. rst-class:: classref-method
  1655. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1656. Frees an object created by this **TextServer**.
  1657. .. rst-class:: classref-item-separator
  1658. ----
  1659. .. _class_TextServer_method_get_features:
  1660. .. rst-class:: classref-method
  1661. :ref:`int<class_int>` **get_features** **(** **)** |const|
  1662. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1663. .. rst-class:: classref-item-separator
  1664. ----
  1665. .. _class_TextServer_method_get_hex_code_box_size:
  1666. .. rst-class:: classref-method
  1667. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1668. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1669. .. rst-class:: classref-item-separator
  1670. ----
  1671. .. _class_TextServer_method_get_name:
  1672. .. rst-class:: classref-method
  1673. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1674. Returns the name of the server interface.
  1675. .. rst-class:: classref-item-separator
  1676. ----
  1677. .. _class_TextServer_method_get_support_data_filename:
  1678. .. rst-class:: classref-method
  1679. :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1680. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1681. .. rst-class:: classref-item-separator
  1682. ----
  1683. .. _class_TextServer_method_get_support_data_info:
  1684. .. rst-class:: classref-method
  1685. :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1686. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1687. .. rst-class:: classref-item-separator
  1688. ----
  1689. .. _class_TextServer_method_has:
  1690. .. rst-class:: classref-method
  1691. :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1692. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1693. .. rst-class:: classref-item-separator
  1694. ----
  1695. .. _class_TextServer_method_has_feature:
  1696. .. rst-class:: classref-method
  1697. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1698. Returns ``true`` if the server supports a feature.
  1699. .. rst-class:: classref-item-separator
  1700. ----
  1701. .. _class_TextServer_method_is_confusable:
  1702. .. rst-class:: classref-method
  1703. :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
  1704. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1705. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1706. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1707. .. rst-class:: classref-item-separator
  1708. ----
  1709. .. _class_TextServer_method_is_locale_right_to_left:
  1710. .. rst-class:: classref-method
  1711. :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1712. Returns ``true`` if locale is right-to-left.
  1713. .. rst-class:: classref-item-separator
  1714. ----
  1715. .. _class_TextServer_method_is_valid_identifier:
  1716. .. rst-class:: classref-method
  1717. :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
  1718. Returns ``true`` if ``string`` is a valid identifier.
  1719. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1720. - Conform to normalization form C.
  1721. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1722. - May contain Unicode characters of class XID_Continue in the other positions.
  1723. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1724. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1725. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1726. - May contain Unicode characters of class XID_Continue in the other positions.
  1727. .. rst-class:: classref-item-separator
  1728. ----
  1729. .. _class_TextServer_method_load_support_data:
  1730. .. rst-class:: classref-method
  1731. :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1732. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1733. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1734. .. rst-class:: classref-item-separator
  1735. ----
  1736. .. _class_TextServer_method_name_to_tag:
  1737. .. rst-class:: classref-method
  1738. :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1739. Converts readable feature, variation, script or language name to OpenType tag.
  1740. .. rst-class:: classref-item-separator
  1741. ----
  1742. .. _class_TextServer_method_parse_number:
  1743. .. rst-class:: classref-method
  1744. :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1745. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1746. .. rst-class:: classref-item-separator
  1747. ----
  1748. .. _class_TextServer_method_parse_structured_text:
  1749. .. rst-class:: classref-method
  1750. :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|
  1751. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1752. .. rst-class:: classref-item-separator
  1753. ----
  1754. .. _class_TextServer_method_percent_sign:
  1755. .. rst-class:: classref-method
  1756. :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1757. Returns percent sign used in the ``language``.
  1758. .. rst-class:: classref-item-separator
  1759. ----
  1760. .. _class_TextServer_method_save_support_data:
  1761. .. rst-class:: classref-method
  1762. :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1763. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1764. \ **Note:** This function is used by during project export, to include TextServer database.
  1765. .. rst-class:: classref-item-separator
  1766. ----
  1767. .. _class_TextServer_method_shaped_get_span_count:
  1768. .. rst-class:: classref-method
  1769. :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1770. 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>`.
  1771. .. rst-class:: classref-item-separator
  1772. ----
  1773. .. _class_TextServer_method_shaped_get_span_meta:
  1774. .. rst-class:: classref-method
  1775. :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1776. Returns text span metadata.
  1777. .. rst-class:: classref-item-separator
  1778. ----
  1779. .. _class_TextServer_method_shaped_set_span_update_font:
  1780. .. rst-class:: classref-method
  1781. 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={} **)**
  1782. Changes text span font, font size and OpenType features, without changing the text.
  1783. .. rst-class:: classref-item-separator
  1784. ----
  1785. .. _class_TextServer_method_shaped_text_add_object:
  1786. .. rst-class:: classref-method
  1787. :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 **)**
  1788. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1789. .. rst-class:: classref-item-separator
  1790. ----
  1791. .. _class_TextServer_method_shaped_text_add_string:
  1792. .. rst-class:: classref-method
  1793. :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 **)**
  1794. Adds text span and font to draw it to the text buffer.
  1795. .. rst-class:: classref-item-separator
  1796. ----
  1797. .. _class_TextServer_method_shaped_text_clear:
  1798. .. rst-class:: classref-method
  1799. void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1800. Clears text buffer (removes text and inline objects).
  1801. .. rst-class:: classref-item-separator
  1802. ----
  1803. .. _class_TextServer_method_shaped_text_closest_character_pos:
  1804. .. rst-class:: classref-method
  1805. :ref:`int<class_int>` **shaped_text_closest_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1806. Returns composite character position closest to the ``pos``.
  1807. .. rst-class:: classref-item-separator
  1808. ----
  1809. .. _class_TextServer_method_shaped_text_draw:
  1810. .. rst-class:: classref-method
  1811. 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|
  1812. 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).
  1813. .. rst-class:: classref-item-separator
  1814. ----
  1815. .. _class_TextServer_method_shaped_text_draw_outline:
  1816. .. rst-class:: classref-method
  1817. 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|
  1818. 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).
  1819. .. rst-class:: classref-item-separator
  1820. ----
  1821. .. _class_TextServer_method_shaped_text_fit_to_width:
  1822. .. rst-class:: classref-method
  1823. :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)**
  1824. Adjusts text width to fit to specified width, returns new text width.
  1825. .. rst-class:: classref-item-separator
  1826. ----
  1827. .. _class_TextServer_method_shaped_text_get_ascent:
  1828. .. rst-class:: classref-method
  1829. :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1830. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1831. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1832. .. rst-class:: classref-item-separator
  1833. ----
  1834. .. _class_TextServer_method_shaped_text_get_carets:
  1835. .. rst-class:: classref-method
  1836. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1837. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1838. .. rst-class:: classref-item-separator
  1839. ----
  1840. .. _class_TextServer_method_shaped_text_get_character_breaks:
  1841. .. rst-class:: classref-method
  1842. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1843. Returns array of the composite character boundaries.
  1844. .. rst-class:: classref-item-separator
  1845. ----
  1846. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1847. .. rst-class:: classref-method
  1848. :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1849. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1850. .. rst-class:: classref-item-separator
  1851. ----
  1852. .. _class_TextServer_method_shaped_text_get_descent:
  1853. .. rst-class:: classref-method
  1854. :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1855. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1856. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1857. .. rst-class:: classref-item-separator
  1858. ----
  1859. .. _class_TextServer_method_shaped_text_get_direction:
  1860. .. rst-class:: classref-method
  1861. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1862. Returns direction of the text.
  1863. .. rst-class:: classref-item-separator
  1864. ----
  1865. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1866. .. rst-class:: classref-method
  1867. :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|
  1868. Returns dominant direction of in the range of text.
  1869. .. rst-class:: classref-item-separator
  1870. ----
  1871. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1872. .. rst-class:: classref-method
  1873. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1874. Returns number of glyphs in the ellipsis.
  1875. .. rst-class:: classref-item-separator
  1876. ----
  1877. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1878. .. rst-class:: classref-method
  1879. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1880. Returns array of the glyphs in the ellipsis.
  1881. .. rst-class:: classref-item-separator
  1882. ----
  1883. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1884. .. rst-class:: classref-method
  1885. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1886. Returns position of the ellipsis.
  1887. .. rst-class:: classref-item-separator
  1888. ----
  1889. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1890. .. rst-class:: classref-method
  1891. :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1892. Returns number of glyphs in the buffer.
  1893. .. rst-class:: classref-item-separator
  1894. ----
  1895. .. _class_TextServer_method_shaped_text_get_glyphs:
  1896. .. rst-class:: classref-method
  1897. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1898. Returns an array of glyphs in the visual order.
  1899. .. rst-class:: classref-item-separator
  1900. ----
  1901. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1902. .. rst-class:: classref-method
  1903. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1904. Returns composite character's bounds as offsets from the start of the line.
  1905. .. rst-class:: classref-item-separator
  1906. ----
  1907. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1908. .. rst-class:: classref-method
  1909. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1910. Returns direction of the text, inferred by the BiDi algorithm.
  1911. .. rst-class:: classref-item-separator
  1912. ----
  1913. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1914. .. rst-class:: classref-method
  1915. :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, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const|
  1916. Breaks text to the lines and returns character ranges for each line.
  1917. .. rst-class:: classref-item-separator
  1918. ----
  1919. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1920. .. rst-class:: classref-method
  1921. :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, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const|
  1922. Breaks text to the lines and columns. Returns character ranges for each segment.
  1923. .. rst-class:: classref-item-separator
  1924. ----
  1925. .. _class_TextServer_method_shaped_text_get_object_rect:
  1926. .. rst-class:: classref-method
  1927. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1928. Returns bounding rectangle of the inline object.
  1929. .. rst-class:: classref-item-separator
  1930. ----
  1931. .. _class_TextServer_method_shaped_text_get_objects:
  1932. .. rst-class:: classref-method
  1933. :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1934. Returns array of inline objects.
  1935. .. rst-class:: classref-item-separator
  1936. ----
  1937. .. _class_TextServer_method_shaped_text_get_orientation:
  1938. .. rst-class:: classref-method
  1939. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1940. Returns text orientation.
  1941. .. rst-class:: classref-item-separator
  1942. ----
  1943. .. _class_TextServer_method_shaped_text_get_parent:
  1944. .. rst-class:: classref-method
  1945. :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1946. Returns the parent buffer from which the substring originates.
  1947. .. rst-class:: classref-item-separator
  1948. ----
  1949. .. _class_TextServer_method_shaped_text_get_preserve_control:
  1950. .. rst-class:: classref-method
  1951. :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1952. Returns ``true`` if text buffer is configured to display control characters.
  1953. .. rst-class:: classref-item-separator
  1954. ----
  1955. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  1956. .. rst-class:: classref-method
  1957. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1958. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  1959. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  1960. .. rst-class:: classref-item-separator
  1961. ----
  1962. .. _class_TextServer_method_shaped_text_get_range:
  1963. .. rst-class:: classref-method
  1964. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1965. Returns substring buffer character range in the parent buffer.
  1966. .. rst-class:: classref-item-separator
  1967. ----
  1968. .. _class_TextServer_method_shaped_text_get_selection:
  1969. .. rst-class:: classref-method
  1970. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1971. Returns selection rectangles for the specified character range.
  1972. .. rst-class:: classref-item-separator
  1973. ----
  1974. .. _class_TextServer_method_shaped_text_get_size:
  1975. .. rst-class:: classref-method
  1976. :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1977. Returns size of the text.
  1978. .. rst-class:: classref-item-separator
  1979. ----
  1980. .. _class_TextServer_method_shaped_text_get_spacing:
  1981. .. rst-class:: classref-method
  1982. :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1983. Returns extra spacing added between glyphs or lines in pixels.
  1984. .. rst-class:: classref-item-separator
  1985. ----
  1986. .. _class_TextServer_method_shaped_text_get_trim_pos:
  1987. .. rst-class:: classref-method
  1988. :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1989. Returns the position of the overrun trim.
  1990. .. rst-class:: classref-item-separator
  1991. ----
  1992. .. _class_TextServer_method_shaped_text_get_underline_position:
  1993. .. rst-class:: classref-method
  1994. :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1995. Returns pixel offset of the underline below the baseline.
  1996. .. rst-class:: classref-item-separator
  1997. ----
  1998. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  1999. .. rst-class:: classref-method
  2000. :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2001. Returns thickness of the underline.
  2002. .. rst-class:: classref-item-separator
  2003. ----
  2004. .. _class_TextServer_method_shaped_text_get_width:
  2005. .. rst-class:: classref-method
  2006. :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2007. Returns width (for horizontal layout) or height (for vertical) of the text.
  2008. .. rst-class:: classref-item-separator
  2009. ----
  2010. .. _class_TextServer_method_shaped_text_get_word_breaks:
  2011. .. rst-class:: classref-method
  2012. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const|
  2013. 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>`).
  2014. .. rst-class:: classref-item-separator
  2015. ----
  2016. .. _class_TextServer_method_shaped_text_has_visible_chars:
  2017. .. rst-class:: classref-method
  2018. :ref:`bool<class_bool>` **shaped_text_has_visible_chars** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2019. Returns ``true`` if text buffer contains any visible characters.
  2020. .. rst-class:: classref-item-separator
  2021. ----
  2022. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  2023. .. rst-class:: classref-method
  2024. :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  2025. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  2026. .. rst-class:: classref-item-separator
  2027. ----
  2028. .. _class_TextServer_method_shaped_text_hit_test_position:
  2029. .. rst-class:: classref-method
  2030. :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  2031. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  2032. .. rst-class:: classref-item-separator
  2033. ----
  2034. .. _class_TextServer_method_shaped_text_is_ready:
  2035. .. rst-class:: classref-method
  2036. :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2037. Returns ``true`` if buffer is successfully shaped.
  2038. .. rst-class:: classref-item-separator
  2039. ----
  2040. .. _class_TextServer_method_shaped_text_next_character_pos:
  2041. .. rst-class:: classref-method
  2042. :ref:`int<class_int>` **shaped_text_next_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2043. Returns composite character end position closest to the ``pos``.
  2044. .. rst-class:: classref-item-separator
  2045. ----
  2046. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2047. .. rst-class:: classref-method
  2048. :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2049. Returns grapheme end position closest to the ``pos``.
  2050. .. rst-class:: classref-item-separator
  2051. ----
  2052. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2053. .. rst-class:: classref-method
  2054. void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)**
  2055. Trims text if it exceeds the given width.
  2056. .. rst-class:: classref-item-separator
  2057. ----
  2058. .. _class_TextServer_method_shaped_text_prev_character_pos:
  2059. .. rst-class:: classref-method
  2060. :ref:`int<class_int>` **shaped_text_prev_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2061. Returns composite character start position closest to the ``pos``.
  2062. .. rst-class:: classref-item-separator
  2063. ----
  2064. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2065. .. rst-class:: classref-method
  2066. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2067. Returns grapheme start position closest to the ``pos``.
  2068. .. rst-class:: classref-item-separator
  2069. ----
  2070. .. _class_TextServer_method_shaped_text_resize_object:
  2071. .. rst-class:: classref-method
  2072. :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 **)**
  2073. Sets new size and alignment of embedded object.
  2074. .. rst-class:: classref-item-separator
  2075. ----
  2076. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2077. .. rst-class:: classref-method
  2078. void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  2079. Overrides BiDi for the structured text.
  2080. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2081. .. rst-class:: classref-item-separator
  2082. ----
  2083. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2084. .. rst-class:: classref-method
  2085. void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  2086. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2087. .. rst-class:: classref-item-separator
  2088. ----
  2089. .. _class_TextServer_method_shaped_text_set_direction:
  2090. .. rst-class:: classref-method
  2091. void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  2092. 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.
  2093. \ **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>`).
  2094. .. rst-class:: classref-item-separator
  2095. ----
  2096. .. _class_TextServer_method_shaped_text_set_orientation:
  2097. .. rst-class:: classref-method
  2098. void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  2099. Sets desired text orientation.
  2100. \ **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>`).
  2101. .. rst-class:: classref-item-separator
  2102. ----
  2103. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2104. .. rst-class:: classref-method
  2105. void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2106. If set to ``true`` text buffer will display control characters.
  2107. .. rst-class:: classref-item-separator
  2108. ----
  2109. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2110. .. rst-class:: classref-method
  2111. void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2112. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2113. .. rst-class:: classref-item-separator
  2114. ----
  2115. .. _class_TextServer_method_shaped_text_set_spacing:
  2116. .. rst-class:: classref-method
  2117. void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  2118. Sets extra spacing added between glyphs or lines in pixels.
  2119. .. rst-class:: classref-item-separator
  2120. ----
  2121. .. _class_TextServer_method_shaped_text_shape:
  2122. .. rst-class:: classref-method
  2123. :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  2124. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2125. \ **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.
  2126. .. rst-class:: classref-item-separator
  2127. ----
  2128. .. _class_TextServer_method_shaped_text_sort_logical:
  2129. .. rst-class:: classref-method
  2130. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  2131. Returns text glyphs in the logical order.
  2132. .. rst-class:: classref-item-separator
  2133. ----
  2134. .. _class_TextServer_method_shaped_text_substr:
  2135. .. rst-class:: classref-method
  2136. :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  2137. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2138. .. rst-class:: classref-item-separator
  2139. ----
  2140. .. _class_TextServer_method_shaped_text_tab_align:
  2141. .. rst-class:: classref-method
  2142. :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  2143. Aligns shaped text to the given tab-stops.
  2144. .. rst-class:: classref-item-separator
  2145. ----
  2146. .. _class_TextServer_method_spoof_check:
  2147. .. rst-class:: classref-method
  2148. :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
  2149. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2150. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2151. .. rst-class:: classref-item-separator
  2152. ----
  2153. .. _class_TextServer_method_string_get_character_breaks:
  2154. .. rst-class:: classref-method
  2155. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2156. Returns array of the composite character boundaries.
  2157. ::
  2158. var ts = TextServerManager.get_primary_interface()
  2159. print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
  2160. .. rst-class:: classref-item-separator
  2161. ----
  2162. .. _class_TextServer_method_string_get_word_breaks:
  2163. .. rst-class:: classref-method
  2164. :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|
  2165. 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.
  2166. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2167. ::
  2168. var ts = TextServerManager.get_primary_interface()
  2169. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2170. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2171. .. rst-class:: classref-item-separator
  2172. ----
  2173. .. _class_TextServer_method_string_to_lower:
  2174. .. rst-class:: classref-method
  2175. :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2176. Returns the string converted to lowercase.
  2177. \ **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>`).
  2178. \ **Note:** The result may be longer or shorter than the original.
  2179. .. rst-class:: classref-item-separator
  2180. ----
  2181. .. _class_TextServer_method_string_to_upper:
  2182. .. rst-class:: classref-method
  2183. :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2184. Returns the string converted to uppercase.
  2185. \ **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>`).
  2186. \ **Note:** The result may be longer or shorter than the original.
  2187. .. rst-class:: classref-item-separator
  2188. ----
  2189. .. _class_TextServer_method_strip_diacritics:
  2190. .. rst-class:: classref-method
  2191. :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  2192. Strips diacritics from the string.
  2193. \ **Note:** The result may be longer or shorter than the original.
  2194. .. rst-class:: classref-item-separator
  2195. ----
  2196. .. _class_TextServer_method_tag_to_name:
  2197. .. rst-class:: classref-method
  2198. :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  2199. Converts OpenType tag to readable feature, variation, script or language name.
  2200. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2201. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2202. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2203. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2204. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2205. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2206. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`