2
0

class_textserver.rst 263 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServer.xml.
  6. .. _class_TextServer:
  7. TextServer
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
  11. Interface for the fonts and complex text layouts.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **TextServer** is the API backend for managing fonts, and rendering complex text.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>` **(** **)** |
  23. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  25. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| |
  27. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  29. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
  31. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
  33. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  35. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  37. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  39. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  41. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  43. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`font_render_range<class_TextServer_method_font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`font_set_descent<class_TextServer_method_font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | void | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | void | :ref:`font_set_scale<class_TextServer_method_font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | void | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | void | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | void | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | void | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | void | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | void | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | void | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | void | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | void | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)** |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const| |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)** |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | void | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | void | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | void | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | void | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | void | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | void | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | void | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  381. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  383. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  385. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| |
  387. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |
  389. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
  391. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const| |
  393. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  395. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  397. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  399. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  401. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. .. rst-class:: classref-section-separator
  403. ----
  404. .. rst-class:: classref-descriptions-group
  405. Enumerations
  406. ------------
  407. .. _enum_TextServer_FontAntialiasing:
  408. .. rst-class:: classref-enumeration
  409. enum **FontAntialiasing**:
  410. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  411. .. rst-class:: classref-enumeration-constant
  412. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  413. Font glyphs are rasterized as 1-bit bitmaps.
  414. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  415. .. rst-class:: classref-enumeration-constant
  416. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  417. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  418. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  419. .. rst-class:: classref-enumeration-constant
  420. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  421. Font glyphs are rasterized for LCD screens.
  422. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  423. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  424. .. rst-class:: classref-item-separator
  425. ----
  426. .. _enum_TextServer_FontLCDSubpixelLayout:
  427. .. rst-class:: classref-enumeration
  428. enum **FontLCDSubpixelLayout**:
  429. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  430. .. rst-class:: classref-enumeration-constant
  431. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  432. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  433. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  434. .. rst-class:: classref-enumeration-constant
  435. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  436. Horizontal RGB subpixel layout.
  437. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  438. .. rst-class:: classref-enumeration-constant
  439. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  440. Horizontal BGR subpixel layout.
  441. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  442. .. rst-class:: classref-enumeration-constant
  443. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  444. Vertical RGB subpixel layout.
  445. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  446. .. rst-class:: classref-enumeration-constant
  447. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  448. Vertical BGR subpixel layout.
  449. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  450. .. rst-class:: classref-enumeration-constant
  451. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _enum_TextServer_Direction:
  455. .. rst-class:: classref-enumeration
  456. enum **Direction**:
  457. .. _class_TextServer_constant_DIRECTION_AUTO:
  458. .. rst-class:: classref-enumeration-constant
  459. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  460. Text direction is determined based on contents and current locale.
  461. .. _class_TextServer_constant_DIRECTION_LTR:
  462. .. rst-class:: classref-enumeration-constant
  463. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  464. Text is written from left to right.
  465. .. _class_TextServer_constant_DIRECTION_RTL:
  466. .. rst-class:: classref-enumeration-constant
  467. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  468. Text is written from right to left.
  469. .. rst-class:: classref-item-separator
  470. ----
  471. .. _enum_TextServer_Orientation:
  472. .. rst-class:: classref-enumeration
  473. enum **Orientation**:
  474. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  475. .. rst-class:: classref-enumeration-constant
  476. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  477. Text is written horizontally.
  478. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  479. .. rst-class:: classref-enumeration-constant
  480. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  481. Left to right text is written vertically from top to bottom.
  482. Right to left text is written vertically from bottom to top.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _enum_TextServer_JustificationFlag:
  486. .. rst-class:: classref-enumeration
  487. flags **JustificationFlag**:
  488. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  489. .. rst-class:: classref-enumeration-constant
  490. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  491. Do not justify text.
  492. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  493. .. rst-class:: classref-enumeration-constant
  494. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  495. Justify text by adding and removing kashidas.
  496. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  499. Justify text by changing width of the spaces between the words.
  500. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  503. Remove trailing and leading spaces from the justified text.
  504. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  507. Only apply justification to the part of the text after the last tab.
  508. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  509. .. rst-class:: classref-enumeration-constant
  510. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  511. Apply justification to the trimmed line with ellipsis.
  512. .. rst-class:: classref-item-separator
  513. ----
  514. .. _enum_TextServer_AutowrapMode:
  515. .. rst-class:: classref-enumeration
  516. enum **AutowrapMode**:
  517. .. _class_TextServer_constant_AUTOWRAP_OFF:
  518. .. rst-class:: classref-enumeration-constant
  519. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  520. Autowrap is disabled.
  521. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  522. .. rst-class:: classref-enumeration-constant
  523. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  524. 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.
  525. .. _class_TextServer_constant_AUTOWRAP_WORD:
  526. .. rst-class:: classref-enumeration-constant
  527. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  528. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  529. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  530. .. rst-class:: classref-enumeration-constant
  531. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  532. 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.
  533. .. rst-class:: classref-item-separator
  534. ----
  535. .. _enum_TextServer_LineBreakFlag:
  536. .. rst-class:: classref-enumeration
  537. flags **LineBreakFlag**:
  538. .. _class_TextServer_constant_BREAK_NONE:
  539. .. rst-class:: classref-enumeration-constant
  540. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  541. Do not break the line.
  542. .. _class_TextServer_constant_BREAK_MANDATORY:
  543. .. rst-class:: classref-enumeration-constant
  544. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  545. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  546. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  547. .. rst-class:: classref-enumeration-constant
  548. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  549. Break the line between the words.
  550. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  551. .. rst-class:: classref-enumeration-constant
  552. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  553. Break the line between any unconnected graphemes.
  554. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  555. .. rst-class:: classref-enumeration-constant
  556. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  557. 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.
  558. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  559. .. rst-class:: classref-enumeration-constant
  560. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  561. Remove edge spaces from the broken line segments.
  562. .. rst-class:: classref-item-separator
  563. ----
  564. .. _enum_TextServer_VisibleCharactersBehavior:
  565. .. rst-class:: classref-enumeration
  566. enum **VisibleCharactersBehavior**:
  567. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  568. .. rst-class:: classref-enumeration-constant
  569. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  570. 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.
  571. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  572. .. rst-class:: classref-enumeration-constant
  573. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  574. 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.
  575. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  576. .. rst-class:: classref-enumeration-constant
  577. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  578. 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.
  579. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  580. .. rst-class:: classref-enumeration-constant
  581. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  582. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the left.
  583. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  584. .. rst-class:: classref-enumeration-constant
  585. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  586. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the right.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _enum_TextServer_OverrunBehavior:
  590. .. rst-class:: classref-enumeration
  591. enum **OverrunBehavior**:
  592. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  593. .. rst-class:: classref-enumeration-constant
  594. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  595. No text trimming is performed.
  596. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  597. .. rst-class:: classref-enumeration-constant
  598. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  599. Trims the text per character.
  600. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  601. .. rst-class:: classref-enumeration-constant
  602. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  603. Trims the text per word.
  604. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  605. .. rst-class:: classref-enumeration-constant
  606. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  607. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  608. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  609. .. rst-class:: classref-enumeration-constant
  610. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  611. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  612. .. rst-class:: classref-item-separator
  613. ----
  614. .. _enum_TextServer_TextOverrunFlag:
  615. .. rst-class:: classref-enumeration
  616. flags **TextOverrunFlag**:
  617. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  618. .. rst-class:: classref-enumeration-constant
  619. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  620. No trimming is performed.
  621. .. _class_TextServer_constant_OVERRUN_TRIM:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  624. Trims the text when it exceeds the given width.
  625. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  626. .. rst-class:: classref-enumeration-constant
  627. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  628. Trims the text per word instead of per grapheme.
  629. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  630. .. rst-class:: classref-enumeration-constant
  631. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  632. Determines whether an ellipsis should be added at the end of the text.
  633. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  634. .. rst-class:: classref-enumeration-constant
  635. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  636. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  637. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  638. .. rst-class:: classref-enumeration-constant
  639. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  640. .. rst-class:: classref-item-separator
  641. ----
  642. .. _enum_TextServer_GraphemeFlag:
  643. .. rst-class:: classref-enumeration
  644. flags **GraphemeFlag**:
  645. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  648. Grapheme is supported by the font, and can be drawn.
  649. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  650. .. rst-class:: classref-enumeration-constant
  651. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  652. Grapheme is part of right-to-left or bottom-to-top run.
  653. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  654. .. rst-class:: classref-enumeration-constant
  655. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  656. Grapheme is not part of source text, it was added by justification process.
  657. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  658. .. rst-class:: classref-enumeration-constant
  659. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  660. Grapheme is whitespace.
  661. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  662. .. rst-class:: classref-enumeration-constant
  663. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  664. Grapheme is mandatory break point (e.g. ``"\n"``).
  665. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  666. .. rst-class:: classref-enumeration-constant
  667. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  668. Grapheme is optional break point (e.g. space).
  669. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  670. .. rst-class:: classref-enumeration-constant
  671. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  672. Grapheme is the tabulation character.
  673. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  674. .. rst-class:: classref-enumeration-constant
  675. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  676. Grapheme is kashida.
  677. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  678. .. rst-class:: classref-enumeration-constant
  679. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  680. Grapheme is punctuation character.
  681. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  682. .. rst-class:: classref-enumeration-constant
  683. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  684. Grapheme is underscore character.
  685. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  688. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  689. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  692. It is safe to insert a U+0640 before this grapheme for elongation.
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _enum_TextServer_Hinting:
  696. .. rst-class:: classref-enumeration
  697. enum **Hinting**:
  698. .. _class_TextServer_constant_HINTING_NONE:
  699. .. rst-class:: classref-enumeration-constant
  700. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  701. Disables font hinting (smoother but less crisp).
  702. .. _class_TextServer_constant_HINTING_LIGHT:
  703. .. rst-class:: classref-enumeration-constant
  704. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  705. Use the light font hinting mode.
  706. .. _class_TextServer_constant_HINTING_NORMAL:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  709. Use the default font hinting mode (crisper but less smooth).
  710. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  711. .. rst-class:: classref-item-separator
  712. ----
  713. .. _enum_TextServer_SubpixelPositioning:
  714. .. rst-class:: classref-enumeration
  715. enum **SubpixelPositioning**:
  716. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  717. .. rst-class:: classref-enumeration-constant
  718. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  719. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  720. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  721. .. rst-class:: classref-enumeration-constant
  722. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  723. Glyph horizontal position is rounded based on font size.
  724. - 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>`.
  725. - 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>`.
  726. - To the whole pixel size for larger fonts.
  727. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  728. .. rst-class:: classref-enumeration-constant
  729. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  730. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  731. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  732. .. rst-class:: classref-enumeration-constant
  733. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  734. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  735. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  736. .. rst-class:: classref-enumeration-constant
  737. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  738. 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.
  739. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  740. .. rst-class:: classref-enumeration-constant
  741. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  742. 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.
  743. .. rst-class:: classref-item-separator
  744. ----
  745. .. _enum_TextServer_Feature:
  746. .. rst-class:: classref-enumeration
  747. enum **Feature**:
  748. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  749. .. rst-class:: classref-enumeration-constant
  750. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  751. TextServer supports simple text layouts.
  752. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  753. .. rst-class:: classref-enumeration-constant
  754. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  755. TextServer supports bidirectional text layouts.
  756. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  757. .. rst-class:: classref-enumeration-constant
  758. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  759. TextServer supports vertical layouts.
  760. .. _class_TextServer_constant_FEATURE_SHAPING:
  761. .. rst-class:: classref-enumeration-constant
  762. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  763. TextServer supports complex text shaping.
  764. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  765. .. rst-class:: classref-enumeration-constant
  766. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  767. TextServer supports justification using kashidas.
  768. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  769. .. rst-class:: classref-enumeration-constant
  770. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  771. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  772. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  773. .. rst-class:: classref-enumeration-constant
  774. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  775. TextServer supports loading bitmap fonts.
  776. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  777. .. rst-class:: classref-enumeration-constant
  778. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  779. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  780. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  781. .. rst-class:: classref-enumeration-constant
  782. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  783. TextServer supports multichannel signed distance field dynamic font rendering.
  784. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  785. .. rst-class:: classref-enumeration-constant
  786. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  787. TextServer supports loading system fonts.
  788. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  791. TextServer supports variable fonts.
  792. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  795. TextServer supports locale dependent and context sensitive case conversion.
  796. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  799. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  800. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  801. .. rst-class:: classref-enumeration-constant
  802. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  803. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  804. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  805. .. rst-class:: classref-enumeration-constant
  806. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  807. 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.
  808. .. rst-class:: classref-item-separator
  809. ----
  810. .. _enum_TextServer_ContourPointTag:
  811. .. rst-class:: classref-enumeration
  812. enum **ContourPointTag**:
  813. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  814. .. rst-class:: classref-enumeration-constant
  815. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  816. Contour point is on the curve.
  817. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  818. .. rst-class:: classref-enumeration-constant
  819. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  820. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  821. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  822. .. rst-class:: classref-enumeration-constant
  823. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  824. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  825. .. rst-class:: classref-item-separator
  826. ----
  827. .. _enum_TextServer_SpacingType:
  828. .. rst-class:: classref-enumeration
  829. enum **SpacingType**:
  830. .. _class_TextServer_constant_SPACING_GLYPH:
  831. .. rst-class:: classref-enumeration-constant
  832. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  833. Spacing for each glyph.
  834. .. _class_TextServer_constant_SPACING_SPACE:
  835. .. rst-class:: classref-enumeration-constant
  836. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  837. Spacing for the space character.
  838. .. _class_TextServer_constant_SPACING_TOP:
  839. .. rst-class:: classref-enumeration-constant
  840. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  841. Spacing at the top of the line.
  842. .. _class_TextServer_constant_SPACING_BOTTOM:
  843. .. rst-class:: classref-enumeration-constant
  844. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  845. Spacing at the bottom of the line.
  846. .. _class_TextServer_constant_SPACING_MAX:
  847. .. rst-class:: classref-enumeration-constant
  848. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  849. .. rst-class:: classref-item-separator
  850. ----
  851. .. _enum_TextServer_FontStyle:
  852. .. rst-class:: classref-enumeration
  853. flags **FontStyle**:
  854. .. _class_TextServer_constant_FONT_BOLD:
  855. .. rst-class:: classref-enumeration-constant
  856. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  857. Font is bold.
  858. .. _class_TextServer_constant_FONT_ITALIC:
  859. .. rst-class:: classref-enumeration-constant
  860. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  861. Font is italic or oblique.
  862. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  863. .. rst-class:: classref-enumeration-constant
  864. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  865. Font have fixed-width characters.
  866. .. rst-class:: classref-item-separator
  867. ----
  868. .. _enum_TextServer_StructuredTextParser:
  869. .. rst-class:: classref-enumeration
  870. enum **StructuredTextParser**:
  871. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  872. .. rst-class:: classref-enumeration-constant
  873. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  874. Use default behavior. Same as :ref:`STRUCTURED_TEXT_NONE<class_TextServer_constant_STRUCTURED_TEXT_NONE>` unless specified otherwise in the control description.
  875. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  876. .. rst-class:: classref-enumeration-constant
  877. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  878. BiDi override for URI.
  879. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  880. .. rst-class:: classref-enumeration-constant
  881. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  882. BiDi override for file path.
  883. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  884. .. rst-class:: classref-enumeration-constant
  885. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  886. BiDi override for email.
  887. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  888. .. rst-class:: classref-enumeration-constant
  889. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  890. BiDi override for lists.
  891. Structured text options: list separator ``String``.
  892. .. _class_TextServer_constant_STRUCTURED_TEXT_NONE:
  893. .. rst-class:: classref-enumeration-constant
  894. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_NONE** = ``5``
  895. Use default Unicode BiDi algorithm.
  896. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  897. .. rst-class:: classref-enumeration-constant
  898. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  899. User defined structured text BiDi override function.
  900. .. rst-class:: classref-section-separator
  901. ----
  902. .. rst-class:: classref-descriptions-group
  903. Method Descriptions
  904. -------------------
  905. .. _class_TextServer_method_create_font:
  906. .. rst-class:: classref-method
  907. :ref:`RID<class_RID>` **create_font** **(** **)**
  908. Creates new, empty font cache entry resource. To free the resulting resourec, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
  909. .. rst-class:: classref-item-separator
  910. ----
  911. .. _class_TextServer_method_create_shaped_text:
  912. .. rst-class:: classref-method
  913. :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  914. 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.
  915. \ **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>`).
  916. \ **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>`).
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_TextServer_method_draw_hex_code_box:
  920. .. rst-class:: classref-method
  921. 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|
  922. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_TextServer_method_font_clear_glyphs:
  926. .. rst-class:: classref-method
  927. void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  928. Removes all rendered glyphs information from the cache entry.
  929. \ **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.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_TextServer_method_font_clear_kerning_map:
  933. .. rst-class:: classref-method
  934. void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  935. Removes all kerning overrides.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_TextServer_method_font_clear_size_cache:
  939. .. rst-class:: classref-method
  940. void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  941. Removes all font sizes from the cache entry.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_TextServer_method_font_clear_textures:
  945. .. rst-class:: classref-method
  946. void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  947. Removes all textures from font cache entry.
  948. \ **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.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_TextServer_method_font_draw_glyph:
  952. .. rst-class:: classref-method
  953. 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|
  954. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  955. \ **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>`.
  956. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  957. .. rst-class:: classref-item-separator
  958. ----
  959. .. _class_TextServer_method_font_draw_glyph_outline:
  960. .. rst-class:: classref-method
  961. 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|
  962. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  963. \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` or :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  964. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  965. .. rst-class:: classref-item-separator
  966. ----
  967. .. _class_TextServer_method_font_get_antialiasing:
  968. .. rst-class:: classref-method
  969. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  970. Returns font anti-aliasing mode.
  971. .. rst-class:: classref-item-separator
  972. ----
  973. .. _class_TextServer_method_font_get_ascent:
  974. .. rst-class:: classref-method
  975. :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  976. Returns the font ascent (number of pixels above the baseline).
  977. .. rst-class:: classref-item-separator
  978. ----
  979. .. _class_TextServer_method_font_get_descent:
  980. .. rst-class:: classref-method
  981. :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  982. Returns the font descent (number of pixels below the baseline).
  983. .. rst-class:: classref-item-separator
  984. ----
  985. .. _class_TextServer_method_font_get_embolden:
  986. .. rst-class:: classref-method
  987. :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  988. Returns font embolden strength.
  989. .. rst-class:: classref-item-separator
  990. ----
  991. .. _class_TextServer_method_font_get_face_count:
  992. .. rst-class:: classref-method
  993. :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  994. Returns number of faces in the TrueType / OpenType collection.
  995. .. rst-class:: classref-item-separator
  996. ----
  997. .. _class_TextServer_method_font_get_face_index:
  998. .. rst-class:: classref-method
  999. :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1000. Recturns an active face index in the TrueType / OpenType collection.
  1001. .. rst-class:: classref-item-separator
  1002. ----
  1003. .. _class_TextServer_method_font_get_fixed_size:
  1004. .. rst-class:: classref-method
  1005. :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1006. Returns bitmap font fixed size.
  1007. .. rst-class:: classref-item-separator
  1008. ----
  1009. .. _class_TextServer_method_font_get_generate_mipmaps:
  1010. .. rst-class:: classref-method
  1011. :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1012. Returns ``true`` if font texture mipmap generation is enabled.
  1013. .. rst-class:: classref-item-separator
  1014. ----
  1015. .. _class_TextServer_method_font_get_global_oversampling:
  1016. .. rst-class:: classref-method
  1017. :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  1018. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1019. .. rst-class:: classref-item-separator
  1020. ----
  1021. .. _class_TextServer_method_font_get_glyph_advance:
  1022. .. rst-class:: classref-method
  1023. :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|
  1024. Returns glyph advance (offset of the next glyph).
  1025. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1026. .. rst-class:: classref-item-separator
  1027. ----
  1028. .. _class_TextServer_method_font_get_glyph_contours:
  1029. .. rst-class:: classref-method
  1030. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1031. Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
  1032. \ ``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.
  1033. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1034. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1035. .. rst-class:: classref-item-separator
  1036. ----
  1037. .. _class_TextServer_method_font_get_glyph_index:
  1038. .. rst-class:: classref-method
  1039. :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|
  1040. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``.
  1041. .. rst-class:: classref-item-separator
  1042. ----
  1043. .. _class_TextServer_method_font_get_glyph_list:
  1044. .. rst-class:: classref-method
  1045. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1046. Returns list of rendered glyphs in the cache entry.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_TextServer_method_font_get_glyph_offset:
  1050. .. rst-class:: classref-method
  1051. :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|
  1052. Returns glyph offset from the baseline.
  1053. .. rst-class:: classref-item-separator
  1054. ----
  1055. .. _class_TextServer_method_font_get_glyph_size:
  1056. .. rst-class:: classref-method
  1057. :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|
  1058. Returns size of the glyph.
  1059. .. rst-class:: classref-item-separator
  1060. ----
  1061. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1062. .. rst-class:: classref-method
  1063. :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|
  1064. Returns index of the cache texture containing the glyph.
  1065. .. rst-class:: classref-item-separator
  1066. ----
  1067. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1068. .. rst-class:: classref-method
  1069. :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|
  1070. Returns resource ID of the cache texture containing the glyph.
  1071. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1072. .. rst-class:: classref-item-separator
  1073. ----
  1074. .. _class_TextServer_method_font_get_glyph_texture_size:
  1075. .. rst-class:: classref-method
  1076. :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|
  1077. Returns size of the cache texture containing the glyph.
  1078. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1079. .. rst-class:: classref-item-separator
  1080. ----
  1081. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1082. .. rst-class:: classref-method
  1083. :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|
  1084. Returns rectangle in the cache texture containing the glyph.
  1085. .. rst-class:: classref-item-separator
  1086. ----
  1087. .. _class_TextServer_method_font_get_hinting:
  1088. .. rst-class:: classref-method
  1089. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1090. Returns the font hinting mode. Used by dynamic fonts only.
  1091. .. rst-class:: classref-item-separator
  1092. ----
  1093. .. _class_TextServer_method_font_get_kerning:
  1094. .. rst-class:: classref-method
  1095. :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|
  1096. Returns kerning for the pair of glyphs.
  1097. .. rst-class:: classref-item-separator
  1098. ----
  1099. .. _class_TextServer_method_font_get_kerning_list:
  1100. .. rst-class:: classref-method
  1101. :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1102. Returns list of the kerning overrides.
  1103. .. rst-class:: classref-item-separator
  1104. ----
  1105. .. _class_TextServer_method_font_get_language_support_override:
  1106. .. rst-class:: classref-method
  1107. :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1108. Returns ``true`` if support override is enabled for the ``language``.
  1109. .. rst-class:: classref-item-separator
  1110. ----
  1111. .. _class_TextServer_method_font_get_language_support_overrides:
  1112. .. rst-class:: classref-method
  1113. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1114. Returns list of language support overrides.
  1115. .. rst-class:: classref-item-separator
  1116. ----
  1117. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1118. .. rst-class:: classref-method
  1119. :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1120. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1121. .. rst-class:: classref-item-separator
  1122. ----
  1123. .. _class_TextServer_method_font_get_msdf_size:
  1124. .. rst-class:: classref-method
  1125. :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1126. Returns source font size used to generate MSDF textures.
  1127. .. rst-class:: classref-item-separator
  1128. ----
  1129. .. _class_TextServer_method_font_get_name:
  1130. .. rst-class:: classref-method
  1131. :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1132. Returns font family name.
  1133. .. rst-class:: classref-item-separator
  1134. ----
  1135. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1136. .. rst-class:: classref-method
  1137. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1138. Returns font OpenType feature set override.
  1139. .. rst-class:: classref-item-separator
  1140. ----
  1141. .. _class_TextServer_method_font_get_oversampling:
  1142. .. rst-class:: classref-method
  1143. :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1144. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1145. .. rst-class:: classref-item-separator
  1146. ----
  1147. .. _class_TextServer_method_font_get_scale:
  1148. .. rst-class:: classref-method
  1149. :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1150. Returns scaling factor of the color bitmap font.
  1151. .. rst-class:: classref-item-separator
  1152. ----
  1153. .. _class_TextServer_method_font_get_script_support_override:
  1154. .. rst-class:: classref-method
  1155. :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1156. Returns ``true`` if support override is enabled for the ``script``.
  1157. .. rst-class:: classref-item-separator
  1158. ----
  1159. .. _class_TextServer_method_font_get_script_support_overrides:
  1160. .. rst-class:: classref-method
  1161. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1162. Returns list of script support overrides.
  1163. .. rst-class:: classref-item-separator
  1164. ----
  1165. .. _class_TextServer_method_font_get_size_cache_list:
  1166. .. rst-class:: classref-method
  1167. :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1168. Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
  1169. .. rst-class:: classref-item-separator
  1170. ----
  1171. .. _class_TextServer_method_font_get_stretch:
  1172. .. rst-class:: classref-method
  1173. :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1174. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1175. .. rst-class:: classref-item-separator
  1176. ----
  1177. .. _class_TextServer_method_font_get_style:
  1178. .. rst-class:: classref-method
  1179. :ref:`FontStyle<enum_TextServer_FontStyle>` **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1180. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1181. .. rst-class:: classref-item-separator
  1182. ----
  1183. .. _class_TextServer_method_font_get_style_name:
  1184. .. rst-class:: classref-method
  1185. :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1186. Returns font style name.
  1187. .. rst-class:: classref-item-separator
  1188. ----
  1189. .. _class_TextServer_method_font_get_subpixel_positioning:
  1190. .. rst-class:: classref-method
  1191. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1192. Returns font subpixel glyph positioning mode.
  1193. .. rst-class:: classref-item-separator
  1194. ----
  1195. .. _class_TextServer_method_font_get_supported_chars:
  1196. .. rst-class:: classref-method
  1197. :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1198. Returns a string containing all the characters available in the font.
  1199. .. rst-class:: classref-item-separator
  1200. ----
  1201. .. _class_TextServer_method_font_get_texture_count:
  1202. .. rst-class:: classref-method
  1203. :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1204. Returns number of textures used by font cache entry.
  1205. .. rst-class:: classref-item-separator
  1206. ----
  1207. .. _class_TextServer_method_font_get_texture_image:
  1208. .. rst-class:: classref-method
  1209. :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|
  1210. Returns font cache texture image data.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_TextServer_method_font_get_texture_offsets:
  1214. .. rst-class:: classref-method
  1215. :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|
  1216. Returns array containing glyph packing data.
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_TextServer_method_font_get_transform:
  1220. .. rst-class:: classref-method
  1221. :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1222. Returns 2D transform applied to the font outlines.
  1223. .. rst-class:: classref-item-separator
  1224. ----
  1225. .. _class_TextServer_method_font_get_underline_position:
  1226. .. rst-class:: classref-method
  1227. :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1228. Returns pixel offset of the underline below the baseline.
  1229. .. rst-class:: classref-item-separator
  1230. ----
  1231. .. _class_TextServer_method_font_get_underline_thickness:
  1232. .. rst-class:: classref-method
  1233. :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1234. Returns thickness of the underline in pixels.
  1235. .. rst-class:: classref-item-separator
  1236. ----
  1237. .. _class_TextServer_method_font_get_variation_coordinates:
  1238. .. rst-class:: classref-method
  1239. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1240. 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.
  1241. .. rst-class:: classref-item-separator
  1242. ----
  1243. .. _class_TextServer_method_font_get_weight:
  1244. .. rst-class:: classref-method
  1245. :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1246. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1247. .. rst-class:: classref-item-separator
  1248. ----
  1249. .. _class_TextServer_method_font_has_char:
  1250. .. rst-class:: classref-method
  1251. :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  1252. Returns ``true`` if a Unicode ``char`` is available in the font.
  1253. .. rst-class:: classref-item-separator
  1254. ----
  1255. .. _class_TextServer_method_font_is_allow_system_fallback:
  1256. .. rst-class:: classref-method
  1257. :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1258. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1259. .. rst-class:: classref-item-separator
  1260. ----
  1261. .. _class_TextServer_method_font_is_force_autohinter:
  1262. .. rst-class:: classref-method
  1263. :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1264. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1265. .. rst-class:: classref-item-separator
  1266. ----
  1267. .. _class_TextServer_method_font_is_language_supported:
  1268. .. rst-class:: classref-method
  1269. :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  1270. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1271. .. rst-class:: classref-item-separator
  1272. ----
  1273. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1274. .. rst-class:: classref-method
  1275. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1276. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1277. .. rst-class:: classref-item-separator
  1278. ----
  1279. .. _class_TextServer_method_font_is_script_supported:
  1280. .. rst-class:: classref-method
  1281. :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  1282. Returns ``true``, if font supports given script (ISO 15924 code).
  1283. .. rst-class:: classref-item-separator
  1284. ----
  1285. .. _class_TextServer_method_font_remove_glyph:
  1286. .. rst-class:: classref-method
  1287. void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  1288. Removes specified rendered glyph information from the cache entry.
  1289. \ **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.
  1290. .. rst-class:: classref-item-separator
  1291. ----
  1292. .. _class_TextServer_method_font_remove_kerning:
  1293. .. rst-class:: classref-method
  1294. void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  1295. Removes kerning override for the pair of glyphs.
  1296. .. rst-class:: classref-item-separator
  1297. ----
  1298. .. _class_TextServer_method_font_remove_language_support_override:
  1299. .. rst-class:: classref-method
  1300. void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1301. Remove language support override.
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_TextServer_method_font_remove_script_support_override:
  1305. .. rst-class:: classref-method
  1306. void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1307. Removes script support override.
  1308. .. rst-class:: classref-item-separator
  1309. ----
  1310. .. _class_TextServer_method_font_remove_size_cache:
  1311. .. rst-class:: classref-method
  1312. void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1313. Removes specified font size from the cache entry.
  1314. .. rst-class:: classref-item-separator
  1315. ----
  1316. .. _class_TextServer_method_font_remove_texture:
  1317. .. rst-class:: classref-method
  1318. void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  1319. Removes specified texture from the cache entry.
  1320. \ **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>`.
  1321. .. rst-class:: classref-item-separator
  1322. ----
  1323. .. _class_TextServer_method_font_render_glyph:
  1324. .. rst-class:: classref-method
  1325. void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  1326. Renders specified glyph to the font cache texture.
  1327. .. rst-class:: classref-item-separator
  1328. ----
  1329. .. _class_TextServer_method_font_render_range:
  1330. .. rst-class:: classref-method
  1331. 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 **)**
  1332. Renders the range of characters to the font cache texture.
  1333. .. rst-class:: classref-item-separator
  1334. ----
  1335. .. _class_TextServer_method_font_set_allow_system_fallback:
  1336. .. rst-class:: classref-method
  1337. void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
  1338. If set to ``true``, system fonts can be automatically used as fallbacks.
  1339. .. rst-class:: classref-item-separator
  1340. ----
  1341. .. _class_TextServer_method_font_set_antialiasing:
  1342. .. rst-class:: classref-method
  1343. void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
  1344. Sets font anti-aliasing mode.
  1345. .. rst-class:: classref-item-separator
  1346. ----
  1347. .. _class_TextServer_method_font_set_ascent:
  1348. .. rst-class:: classref-method
  1349. void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  1350. Sets the font ascent (number of pixels above the baseline).
  1351. .. rst-class:: classref-item-separator
  1352. ----
  1353. .. _class_TextServer_method_font_set_data:
  1354. .. rst-class:: classref-method
  1355. void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  1356. Sets font source data, e.g contents of the dynamic font source file.
  1357. .. rst-class:: classref-item-separator
  1358. ----
  1359. .. _class_TextServer_method_font_set_descent:
  1360. .. rst-class:: classref-method
  1361. void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  1362. Sets the font descent (number of pixels below the baseline).
  1363. .. rst-class:: classref-item-separator
  1364. ----
  1365. .. _class_TextServer_method_font_set_embolden:
  1366. .. rst-class:: classref-method
  1367. void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  1368. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1369. .. rst-class:: classref-item-separator
  1370. ----
  1371. .. _class_TextServer_method_font_set_face_index:
  1372. .. rst-class:: classref-method
  1373. void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  1374. Sets an active face index in the TrueType / OpenType collection.
  1375. .. rst-class:: classref-item-separator
  1376. ----
  1377. .. _class_TextServer_method_font_set_fixed_size:
  1378. .. rst-class:: classref-method
  1379. void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  1380. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1381. .. rst-class:: classref-item-separator
  1382. ----
  1383. .. _class_TextServer_method_font_set_force_autohinter:
  1384. .. rst-class:: classref-method
  1385. void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  1386. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1387. .. rst-class:: classref-item-separator
  1388. ----
  1389. .. _class_TextServer_method_font_set_generate_mipmaps:
  1390. .. rst-class:: classref-method
  1391. void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  1392. If set to ``true`` font texture mipmap generation is enabled.
  1393. .. rst-class:: classref-item-separator
  1394. ----
  1395. .. _class_TextServer_method_font_set_global_oversampling:
  1396. .. rst-class:: classref-method
  1397. void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  1398. Sets oversampling factor, shared by all font in the TextServer.
  1399. \ **Note:** This value can be automatically changed by display server.
  1400. .. rst-class:: classref-item-separator
  1401. ----
  1402. .. _class_TextServer_method_font_set_glyph_advance:
  1403. .. rst-class:: classref-method
  1404. 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 **)**
  1405. Sets glyph advance (offset of the next glyph).
  1406. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_TextServer_method_font_set_glyph_offset:
  1410. .. rst-class:: classref-method
  1411. 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 **)**
  1412. Sets glyph offset from the baseline.
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_TextServer_method_font_set_glyph_size:
  1416. .. rst-class:: classref-method
  1417. 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 **)**
  1418. Sets size of the glyph.
  1419. .. rst-class:: classref-item-separator
  1420. ----
  1421. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1422. .. rst-class:: classref-method
  1423. 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 **)**
  1424. Sets index of the cache texture containing the glyph.
  1425. .. rst-class:: classref-item-separator
  1426. ----
  1427. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1428. .. rst-class:: classref-method
  1429. 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 **)**
  1430. Sets rectangle in the cache texture containing the glyph.
  1431. .. rst-class:: classref-item-separator
  1432. ----
  1433. .. _class_TextServer_method_font_set_hinting:
  1434. .. rst-class:: classref-method
  1435. void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  1436. Sets font hinting mode. Used by dynamic fonts only.
  1437. .. rst-class:: classref-item-separator
  1438. ----
  1439. .. _class_TextServer_method_font_set_kerning:
  1440. .. rst-class:: classref-method
  1441. 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 **)**
  1442. Sets kerning for the pair of glyphs.
  1443. .. rst-class:: classref-item-separator
  1444. ----
  1445. .. _class_TextServer_method_font_set_language_support_override:
  1446. .. rst-class:: classref-method
  1447. void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  1448. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1449. .. rst-class:: classref-item-separator
  1450. ----
  1451. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1452. .. rst-class:: classref-method
  1453. void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  1454. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1455. .. rst-class:: classref-item-separator
  1456. ----
  1457. .. _class_TextServer_method_font_set_msdf_size:
  1458. .. rst-class:: classref-method
  1459. void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  1460. Sets source font size used to generate MSDF textures.
  1461. .. rst-class:: classref-item-separator
  1462. ----
  1463. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1464. .. rst-class:: classref-method
  1465. void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  1466. 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.
  1467. \ **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.
  1468. .. rst-class:: classref-item-separator
  1469. ----
  1470. .. _class_TextServer_method_font_set_name:
  1471. .. rst-class:: classref-method
  1472. void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1473. Sets the font family name.
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1477. .. rst-class:: classref-method
  1478. void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  1479. Sets font OpenType feature set override.
  1480. .. rst-class:: classref-item-separator
  1481. ----
  1482. .. _class_TextServer_method_font_set_oversampling:
  1483. .. rst-class:: classref-method
  1484. void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  1485. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1486. .. rst-class:: classref-item-separator
  1487. ----
  1488. .. _class_TextServer_method_font_set_scale:
  1489. .. rst-class:: classref-method
  1490. void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  1491. Sets scaling factor of the color bitmap font.
  1492. .. rst-class:: classref-item-separator
  1493. ----
  1494. .. _class_TextServer_method_font_set_script_support_override:
  1495. .. rst-class:: classref-method
  1496. void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  1497. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1498. .. rst-class:: classref-item-separator
  1499. ----
  1500. .. _class_TextServer_method_font_set_stretch:
  1501. .. rst-class:: classref-method
  1502. void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1503. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1504. \ **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.
  1505. .. rst-class:: classref-item-separator
  1506. ----
  1507. .. _class_TextServer_method_font_set_style:
  1508. .. rst-class:: classref-method
  1509. void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)**
  1510. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1511. \ **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.
  1512. .. rst-class:: classref-item-separator
  1513. ----
  1514. .. _class_TextServer_method_font_set_style_name:
  1515. .. rst-class:: classref-method
  1516. void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1517. Sets the font style name.
  1518. .. rst-class:: classref-item-separator
  1519. ----
  1520. .. _class_TextServer_method_font_set_subpixel_positioning:
  1521. .. rst-class:: classref-method
  1522. void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1523. Sets font subpixel glyph positioning mode.
  1524. .. rst-class:: classref-item-separator
  1525. ----
  1526. .. _class_TextServer_method_font_set_texture_image:
  1527. .. rst-class:: classref-method
  1528. 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 **)**
  1529. Sets font cache texture image data.
  1530. .. rst-class:: classref-item-separator
  1531. ----
  1532. .. _class_TextServer_method_font_set_texture_offsets:
  1533. .. rst-class:: classref-method
  1534. 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 **)**
  1535. Sets array containing glyph packing data.
  1536. .. rst-class:: classref-item-separator
  1537. ----
  1538. .. _class_TextServer_method_font_set_transform:
  1539. .. rst-class:: classref-method
  1540. void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1541. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1542. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1543. .. rst-class:: classref-item-separator
  1544. ----
  1545. .. _class_TextServer_method_font_set_underline_position:
  1546. .. rst-class:: classref-method
  1547. void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1548. Sets pixel offset of the underline below the baseline.
  1549. .. rst-class:: classref-item-separator
  1550. ----
  1551. .. _class_TextServer_method_font_set_underline_thickness:
  1552. .. rst-class:: classref-method
  1553. void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1554. Sets thickness of the underline in pixels.
  1555. .. rst-class:: classref-item-separator
  1556. ----
  1557. .. _class_TextServer_method_font_set_variation_coordinates:
  1558. .. rst-class:: classref-method
  1559. void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1560. 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.
  1561. .. rst-class:: classref-item-separator
  1562. ----
  1563. .. _class_TextServer_method_font_set_weight:
  1564. .. rst-class:: classref-method
  1565. void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1566. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1567. \ **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.
  1568. .. rst-class:: classref-item-separator
  1569. ----
  1570. .. _class_TextServer_method_font_supported_feature_list:
  1571. .. rst-class:: classref-method
  1572. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1573. Returns the dictionary of the supported OpenType features.
  1574. .. rst-class:: classref-item-separator
  1575. ----
  1576. .. _class_TextServer_method_font_supported_variation_list:
  1577. .. rst-class:: classref-method
  1578. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1579. Returns the dictionary of the supported OpenType variation coordinates.
  1580. .. rst-class:: classref-item-separator
  1581. ----
  1582. .. _class_TextServer_method_format_number:
  1583. .. rst-class:: classref-method
  1584. :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1585. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1586. If ``language`` is omitted, the active locale will be used.
  1587. .. rst-class:: classref-item-separator
  1588. ----
  1589. .. _class_TextServer_method_free_rid:
  1590. .. rst-class:: classref-method
  1591. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1592. Frees an object created by this **TextServer**.
  1593. .. rst-class:: classref-item-separator
  1594. ----
  1595. .. _class_TextServer_method_get_features:
  1596. .. rst-class:: classref-method
  1597. :ref:`int<class_int>` **get_features** **(** **)** |const|
  1598. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1599. .. rst-class:: classref-item-separator
  1600. ----
  1601. .. _class_TextServer_method_get_hex_code_box_size:
  1602. .. rst-class:: classref-method
  1603. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1604. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1605. .. rst-class:: classref-item-separator
  1606. ----
  1607. .. _class_TextServer_method_get_name:
  1608. .. rst-class:: classref-method
  1609. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1610. Returns the name of the server interface.
  1611. .. rst-class:: classref-item-separator
  1612. ----
  1613. .. _class_TextServer_method_get_support_data_filename:
  1614. .. rst-class:: classref-method
  1615. :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1616. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1617. .. rst-class:: classref-item-separator
  1618. ----
  1619. .. _class_TextServer_method_get_support_data_info:
  1620. .. rst-class:: classref-method
  1621. :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1622. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1623. .. rst-class:: classref-item-separator
  1624. ----
  1625. .. _class_TextServer_method_has:
  1626. .. rst-class:: classref-method
  1627. :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1628. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1629. .. rst-class:: classref-item-separator
  1630. ----
  1631. .. _class_TextServer_method_has_feature:
  1632. .. rst-class:: classref-method
  1633. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1634. Returns ``true`` if the server supports a feature.
  1635. .. rst-class:: classref-item-separator
  1636. ----
  1637. .. _class_TextServer_method_is_confusable:
  1638. .. rst-class:: classref-method
  1639. :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
  1640. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1641. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1642. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1643. .. rst-class:: classref-item-separator
  1644. ----
  1645. .. _class_TextServer_method_is_locale_right_to_left:
  1646. .. rst-class:: classref-method
  1647. :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1648. Returns ``true`` if locale is right-to-left.
  1649. .. rst-class:: classref-item-separator
  1650. ----
  1651. .. _class_TextServer_method_is_valid_identifier:
  1652. .. rst-class:: classref-method
  1653. :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
  1654. Returns ``true`` is ``string`` is a valid identifier.
  1655. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1656. - Conform to normalization form C.
  1657. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1658. - May contain Unicode characters of class XID_Continue in the other positions.
  1659. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1660. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1661. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1662. - May contain Unicode characters of class XID_Continue in the other positions.
  1663. .. rst-class:: classref-item-separator
  1664. ----
  1665. .. _class_TextServer_method_load_support_data:
  1666. .. rst-class:: classref-method
  1667. :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1668. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1669. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1670. .. rst-class:: classref-item-separator
  1671. ----
  1672. .. _class_TextServer_method_name_to_tag:
  1673. .. rst-class:: classref-method
  1674. :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1675. Converts readable feature, variation, script or language name to OpenType tag.
  1676. .. rst-class:: classref-item-separator
  1677. ----
  1678. .. _class_TextServer_method_parse_number:
  1679. .. rst-class:: classref-method
  1680. :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1681. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1682. .. rst-class:: classref-item-separator
  1683. ----
  1684. .. _class_TextServer_method_parse_structured_text:
  1685. .. rst-class:: classref-method
  1686. :ref:`Vector2i[]<class_Vector2i>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const|
  1687. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1688. .. rst-class:: classref-item-separator
  1689. ----
  1690. .. _class_TextServer_method_percent_sign:
  1691. .. rst-class:: classref-method
  1692. :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1693. Returns percent sign used in the ``language``.
  1694. .. rst-class:: classref-item-separator
  1695. ----
  1696. .. _class_TextServer_method_save_support_data:
  1697. .. rst-class:: classref-method
  1698. :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1699. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1700. \ **Note:** This function is used by during project export, to include TextServer database.
  1701. .. rst-class:: classref-item-separator
  1702. ----
  1703. .. _class_TextServer_method_shaped_get_span_count:
  1704. .. rst-class:: classref-method
  1705. :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1706. 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>`.
  1707. .. rst-class:: classref-item-separator
  1708. ----
  1709. .. _class_TextServer_method_shaped_get_span_meta:
  1710. .. rst-class:: classref-method
  1711. :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1712. Returns text span metadata.
  1713. .. rst-class:: classref-item-separator
  1714. ----
  1715. .. _class_TextServer_method_shaped_set_span_update_font:
  1716. .. rst-class:: classref-method
  1717. 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={} **)**
  1718. Changes text span font, font size and OpenType features, without changing the text.
  1719. .. rst-class:: classref-item-separator
  1720. ----
  1721. .. _class_TextServer_method_shaped_text_add_object:
  1722. .. rst-class:: classref-method
  1723. :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 **)**
  1724. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1725. .. rst-class:: classref-item-separator
  1726. ----
  1727. .. _class_TextServer_method_shaped_text_add_string:
  1728. .. rst-class:: classref-method
  1729. :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 **)**
  1730. Adds text span and font to draw it to the text buffer.
  1731. .. rst-class:: classref-item-separator
  1732. ----
  1733. .. _class_TextServer_method_shaped_text_clear:
  1734. .. rst-class:: classref-method
  1735. void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1736. Clears text buffer (removes text and inline objects).
  1737. .. rst-class:: classref-item-separator
  1738. ----
  1739. .. _class_TextServer_method_shaped_text_draw:
  1740. .. rst-class:: classref-method
  1741. 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|
  1742. 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).
  1743. .. rst-class:: classref-item-separator
  1744. ----
  1745. .. _class_TextServer_method_shaped_text_draw_outline:
  1746. .. rst-class:: classref-method
  1747. 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|
  1748. 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).
  1749. .. rst-class:: classref-item-separator
  1750. ----
  1751. .. _class_TextServer_method_shaped_text_fit_to_width:
  1752. .. rst-class:: classref-method
  1753. :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)**
  1754. Adjusts text with to fit to specified width, returns new text width.
  1755. .. rst-class:: classref-item-separator
  1756. ----
  1757. .. _class_TextServer_method_shaped_text_get_ascent:
  1758. .. rst-class:: classref-method
  1759. :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1760. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1761. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1762. .. rst-class:: classref-item-separator
  1763. ----
  1764. .. _class_TextServer_method_shaped_text_get_carets:
  1765. .. rst-class:: classref-method
  1766. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1767. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1768. .. rst-class:: classref-item-separator
  1769. ----
  1770. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1771. .. rst-class:: classref-method
  1772. :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1773. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1774. .. rst-class:: classref-item-separator
  1775. ----
  1776. .. _class_TextServer_method_shaped_text_get_descent:
  1777. .. rst-class:: classref-method
  1778. :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1779. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1780. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1781. .. rst-class:: classref-item-separator
  1782. ----
  1783. .. _class_TextServer_method_shaped_text_get_direction:
  1784. .. rst-class:: classref-method
  1785. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1786. Returns direction of the text.
  1787. .. rst-class:: classref-item-separator
  1788. ----
  1789. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1790. .. rst-class:: classref-method
  1791. :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|
  1792. Returns dominant direction of in the range of text.
  1793. .. rst-class:: classref-item-separator
  1794. ----
  1795. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1796. .. rst-class:: classref-method
  1797. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1798. Returns number of glyphs in the ellipsis.
  1799. .. rst-class:: classref-item-separator
  1800. ----
  1801. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1802. .. rst-class:: classref-method
  1803. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1804. Returns array of the glyphs in the ellipsis.
  1805. .. rst-class:: classref-item-separator
  1806. ----
  1807. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1808. .. rst-class:: classref-method
  1809. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1810. Returns position of the ellipsis.
  1811. .. rst-class:: classref-item-separator
  1812. ----
  1813. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1814. .. rst-class:: classref-method
  1815. :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1816. Returns number of glyphs in the buffer.
  1817. .. rst-class:: classref-item-separator
  1818. ----
  1819. .. _class_TextServer_method_shaped_text_get_glyphs:
  1820. .. rst-class:: classref-method
  1821. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1822. Returns an array of glyphs in the visual order.
  1823. .. rst-class:: classref-item-separator
  1824. ----
  1825. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1826. .. rst-class:: classref-method
  1827. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1828. Returns composite character's bounds as offsets from the start of the line.
  1829. .. rst-class:: classref-item-separator
  1830. ----
  1831. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1832. .. rst-class:: classref-method
  1833. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1834. Returns direction of the text, inferred by the BiDi algorithm.
  1835. .. rst-class:: classref-item-separator
  1836. ----
  1837. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1838. .. rst-class:: classref-method
  1839. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1840. Breaks text to the lines and returns character ranges for each line.
  1841. .. rst-class:: classref-item-separator
  1842. ----
  1843. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1844. .. rst-class:: classref-method
  1845. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1846. Breaks text to the lines and columns. Returns character ranges for each segment.
  1847. .. rst-class:: classref-item-separator
  1848. ----
  1849. .. _class_TextServer_method_shaped_text_get_object_rect:
  1850. .. rst-class:: classref-method
  1851. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1852. Returns bounding rectangle of the inline object.
  1853. .. rst-class:: classref-item-separator
  1854. ----
  1855. .. _class_TextServer_method_shaped_text_get_objects:
  1856. .. rst-class:: classref-method
  1857. :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1858. Returns array of inline objects.
  1859. .. rst-class:: classref-item-separator
  1860. ----
  1861. .. _class_TextServer_method_shaped_text_get_orientation:
  1862. .. rst-class:: classref-method
  1863. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1864. Returns text orientation.
  1865. .. rst-class:: classref-item-separator
  1866. ----
  1867. .. _class_TextServer_method_shaped_text_get_parent:
  1868. .. rst-class:: classref-method
  1869. :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1870. Returns the parent buffer from which the substring originates.
  1871. .. rst-class:: classref-item-separator
  1872. ----
  1873. .. _class_TextServer_method_shaped_text_get_preserve_control:
  1874. .. rst-class:: classref-method
  1875. :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1876. Returns ``true`` if text buffer is configured to display control characters.
  1877. .. rst-class:: classref-item-separator
  1878. ----
  1879. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  1880. .. rst-class:: classref-method
  1881. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1882. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  1883. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  1884. .. rst-class:: classref-item-separator
  1885. ----
  1886. .. _class_TextServer_method_shaped_text_get_range:
  1887. .. rst-class:: classref-method
  1888. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1889. Returns substring buffer character range in the parent buffer.
  1890. .. rst-class:: classref-item-separator
  1891. ----
  1892. .. _class_TextServer_method_shaped_text_get_selection:
  1893. .. rst-class:: classref-method
  1894. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1895. Returns selection rectangles for the specified character range.
  1896. .. rst-class:: classref-item-separator
  1897. ----
  1898. .. _class_TextServer_method_shaped_text_get_size:
  1899. .. rst-class:: classref-method
  1900. :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1901. Returns size of the text.
  1902. .. rst-class:: classref-item-separator
  1903. ----
  1904. .. _class_TextServer_method_shaped_text_get_spacing:
  1905. .. rst-class:: classref-method
  1906. :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1907. Returns extra spacing added between glyphs or lines in pixels.
  1908. .. rst-class:: classref-item-separator
  1909. ----
  1910. .. _class_TextServer_method_shaped_text_get_trim_pos:
  1911. .. rst-class:: classref-method
  1912. :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1913. Returns the position of the overrun trim.
  1914. .. rst-class:: classref-item-separator
  1915. ----
  1916. .. _class_TextServer_method_shaped_text_get_underline_position:
  1917. .. rst-class:: classref-method
  1918. :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1919. Returns pixel offset of the underline below the baseline.
  1920. .. rst-class:: classref-item-separator
  1921. ----
  1922. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  1923. .. rst-class:: classref-method
  1924. :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1925. Returns thickness of the underline.
  1926. .. rst-class:: classref-item-separator
  1927. ----
  1928. .. _class_TextServer_method_shaped_text_get_width:
  1929. .. rst-class:: classref-method
  1930. :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1931. Returns width (for horizontal layout) or height (for vertical) of the text.
  1932. .. rst-class:: classref-item-separator
  1933. ----
  1934. .. _class_TextServer_method_shaped_text_get_word_breaks:
  1935. .. rst-class:: classref-method
  1936. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const|
  1937. 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>`).
  1938. .. rst-class:: classref-item-separator
  1939. ----
  1940. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  1941. .. rst-class:: classref-method
  1942. :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1943. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  1944. .. rst-class:: classref-item-separator
  1945. ----
  1946. .. _class_TextServer_method_shaped_text_hit_test_position:
  1947. .. rst-class:: classref-method
  1948. :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1949. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  1950. .. rst-class:: classref-item-separator
  1951. ----
  1952. .. _class_TextServer_method_shaped_text_is_ready:
  1953. .. rst-class:: classref-method
  1954. :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1955. Returns ``true`` if buffer is successfully shaped.
  1956. .. rst-class:: classref-item-separator
  1957. ----
  1958. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  1959. .. rst-class:: classref-method
  1960. :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1961. Returns composite character end position closest to the ``pos``.
  1962. .. rst-class:: classref-item-separator
  1963. ----
  1964. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  1965. .. rst-class:: classref-method
  1966. void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)**
  1967. Trims text if it exceeds the given width.
  1968. .. rst-class:: classref-item-separator
  1969. ----
  1970. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  1971. .. rst-class:: classref-method
  1972. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1973. Returns composite character start position closest to the ``pos``.
  1974. .. rst-class:: classref-item-separator
  1975. ----
  1976. .. _class_TextServer_method_shaped_text_resize_object:
  1977. .. rst-class:: classref-method
  1978. :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 **)**
  1979. Sets new size and alignment of embedded object.
  1980. .. rst-class:: classref-item-separator
  1981. ----
  1982. .. _class_TextServer_method_shaped_text_set_bidi_override:
  1983. .. rst-class:: classref-method
  1984. void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  1985. Overrides BiDi for the structured text.
  1986. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  1987. .. rst-class:: classref-item-separator
  1988. ----
  1989. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  1990. .. rst-class:: classref-method
  1991. void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  1992. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1993. .. rst-class:: classref-item-separator
  1994. ----
  1995. .. _class_TextServer_method_shaped_text_set_direction:
  1996. .. rst-class:: classref-method
  1997. void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  1998. 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.
  1999. \ **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>`).
  2000. .. rst-class:: classref-item-separator
  2001. ----
  2002. .. _class_TextServer_method_shaped_text_set_orientation:
  2003. .. rst-class:: classref-method
  2004. void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  2005. Sets desired text orientation.
  2006. \ **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>`).
  2007. .. rst-class:: classref-item-separator
  2008. ----
  2009. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2010. .. rst-class:: classref-method
  2011. void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2012. If set to ``true`` text buffer will display control characters.
  2013. .. rst-class:: classref-item-separator
  2014. ----
  2015. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2016. .. rst-class:: classref-method
  2017. void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2018. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2019. .. rst-class:: classref-item-separator
  2020. ----
  2021. .. _class_TextServer_method_shaped_text_set_spacing:
  2022. .. rst-class:: classref-method
  2023. void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  2024. Sets extra spacing added between glyphs or lines in pixels.
  2025. .. rst-class:: classref-item-separator
  2026. ----
  2027. .. _class_TextServer_method_shaped_text_shape:
  2028. .. rst-class:: classref-method
  2029. :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  2030. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2031. \ **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.
  2032. .. rst-class:: classref-item-separator
  2033. ----
  2034. .. _class_TextServer_method_shaped_text_sort_logical:
  2035. .. rst-class:: classref-method
  2036. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  2037. Returns text glyphs in the logical order.
  2038. .. rst-class:: classref-item-separator
  2039. ----
  2040. .. _class_TextServer_method_shaped_text_substr:
  2041. .. rst-class:: classref-method
  2042. :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  2043. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2044. .. rst-class:: classref-item-separator
  2045. ----
  2046. .. _class_TextServer_method_shaped_text_tab_align:
  2047. .. rst-class:: classref-method
  2048. :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  2049. Aligns shaped text to the given tab-stops.
  2050. .. rst-class:: classref-item-separator
  2051. ----
  2052. .. _class_TextServer_method_spoof_check:
  2053. .. rst-class:: classref-method
  2054. :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
  2055. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2056. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2057. .. rst-class:: classref-item-separator
  2058. ----
  2059. .. _class_TextServer_method_string_get_word_breaks:
  2060. .. rst-class:: classref-method
  2061. :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|
  2062. 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.
  2063. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2064. ::
  2065. var ts = TextServerManager.get_primary_interface()
  2066. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2067. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2068. .. rst-class:: classref-item-separator
  2069. ----
  2070. .. _class_TextServer_method_string_to_lower:
  2071. .. rst-class:: classref-method
  2072. :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2073. Returns the string converted to lowercase.
  2074. \ **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>`).
  2075. \ **Note:** The result may be longer or shorter than the original.
  2076. .. rst-class:: classref-item-separator
  2077. ----
  2078. .. _class_TextServer_method_string_to_upper:
  2079. .. rst-class:: classref-method
  2080. :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2081. Returns the string converted to uppercase.
  2082. \ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  2083. \ **Note:** The result may be longer or shorter than the original.
  2084. .. rst-class:: classref-item-separator
  2085. ----
  2086. .. _class_TextServer_method_strip_diacritics:
  2087. .. rst-class:: classref-method
  2088. :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  2089. Strips diacritics from the string.
  2090. \ **Note:** The result may be longer or shorter than the original.
  2091. .. rst-class:: classref-item-separator
  2092. ----
  2093. .. _class_TextServer_method_tag_to_name:
  2094. .. rst-class:: classref-method
  2095. :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  2096. Converts OpenType tag to readable feature, variation, script or language name.
  2097. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2098. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2099. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2100. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2101. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2102. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`