class_textserver.rst 302 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServer.xml.
  6. .. _class_TextServer:
  7. TextServer
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
  11. A server interface for font management and text rendering.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **TextServer** is the API backend for managing fonts and rendering text.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>`\ (\ ) |
  23. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`RID<class_RID>` | :ref:`create_font_linked_variation<class_TextServer_method_create_font_linked_variation>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  25. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>`\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
  27. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | |void| | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>`\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| |
  29. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | |void| | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  31. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | |void| | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |
  33. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  35. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  37. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  39. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  41. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  43. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  45. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`font_get_baseline_offset<class_TextServer_method_font_get_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  47. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| |
  49. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  51. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  53. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  55. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  57. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  59. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`font_get_fixed_size_scale_mode<class_TextServer_method_font_get_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  61. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  63. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>`\ (\ ) |const| |
  65. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  67. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>`\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
  69. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| |
  71. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  73. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  75. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  77. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  79. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  81. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  83. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  85. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  87. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  89. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  91. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
  93. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  95. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  97. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  99. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  101. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  103. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  105. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  107. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  109. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
  111. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  113. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  115. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
  117. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  119. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_get_style<class_TextServer_method_font_get_style>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  121. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  123. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  125. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  127. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  129. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
  131. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
  133. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  135. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  137. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  139. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  141. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  143. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>`\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| |
  145. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  147. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  149. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| |
  151. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  153. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| |
  155. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |
  157. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |void| | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |
  159. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
  161. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
  163. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |void| | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  165. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |void| | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |
  167. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |void| | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |
  169. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |void| | :ref:`font_render_range<class_TextServer_method_font_render_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |
  171. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |void| | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) |
  173. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |void| | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) |
  175. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |void| | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |
  177. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |void| | :ref:`font_set_baseline_offset<class_TextServer_method_font_set_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) |
  179. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | |void| | :ref:`font_set_data<class_TextServer_method_font_set_data>`\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  181. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | |void| | :ref:`font_set_descent<class_TextServer_method_font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |
  183. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | |void| | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |
  185. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | |void| | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |
  187. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | |void| | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) |
  189. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | |void| | :ref:`font_set_fixed_size_scale_mode<class_TextServer_method_font_set_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) |
  191. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | |void| | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |
  193. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | |void| | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) |
  195. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | |void| | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>`\ (\ oversampling\: :ref:`float<class_float>`\ ) |
  197. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | |void| | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |
  199. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | |void| | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |
  201. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | |void| | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |
  203. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | |void| | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |
  205. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | |void| | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |
  207. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | |void| | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) |
  209. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | |void| | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |
  211. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | |void| | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
  213. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) |
  215. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | |void| | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) |
  217. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | |void| | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) |
  219. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | |void| | :ref:`font_set_name<class_TextServer_method_font_set_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
  221. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) |
  223. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | |void| | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) |
  225. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | |void| | :ref:`font_set_scale<class_TextServer_method_font_set_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |
  227. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | |void| | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
  229. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | |void| | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
  231. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | |void| | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
  233. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | |void| | :ref:`font_set_style<class_TextServer_method_font_set_style>`\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) |
  235. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | |void| | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
  237. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | |void| | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) |
  239. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | |void| | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |
  241. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | |void| | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
  243. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | |void| | :ref:`font_set_transform<class_TextServer_method_font_set_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |
  245. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | |void| | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |
  247. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | |void| | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |
  249. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | |void| | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |
  251. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`font_set_weight<class_TextServer_method_font_set_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
  253. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  255. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  257. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  259. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | |void| | :ref:`free_rid<class_TextServer_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  261. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>`\ (\ ) |const| |
  263. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>`\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
  265. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>`\ (\ ) |const| |
  267. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>`\ (\ ) |const| |
  269. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>`\ (\ ) |const| |
  271. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  273. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| |
  275. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>`\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| |
  277. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| |
  279. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  281. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  283. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
  285. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  287. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>`\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| |
  289. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>`\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| |
  291. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |const| |
  293. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  295. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
  297. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | |void| | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |
  299. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) |
  301. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>`\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) |
  303. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | |void| | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  305. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  307. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | |void| | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  309. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | |void| | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  311. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) |
  313. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  315. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>`\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| |
  317. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  319. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  321. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  323. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  325. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  327. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
  329. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  331. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  333. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  335. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  337. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  339. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  341. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  343. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
  345. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
  347. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
  349. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  351. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  353. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  355. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  357. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  359. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  361. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
  363. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  365. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
  367. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  369. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  371. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  373. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  375. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264\ ) |const| |
  377. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  379. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
  381. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
  383. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  385. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  387. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  389. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | |void| | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) |
  391. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  393. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  395. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) |
  397. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | |void| | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>`\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) |
  399. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | |void| | :ref:`shaped_text_set_custom_ellipsis<class_TextServer_method_shaped_text_set_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |
  401. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | |void| | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) |
  403. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | |void| | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) |
  405. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | |void| | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
  407. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. | |void| | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
  409. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  410. | |void| | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
  411. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  412. | |void| | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
  413. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  414. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
  415. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  416. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
  417. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  418. | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| |
  419. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  420. | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>`\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |
  421. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  422. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  423. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  424. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  425. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  426. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| |
  427. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  428. | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  429. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  430. | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  431. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  432. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  433. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  434. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |const| |
  435. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  436. .. rst-class:: classref-section-separator
  437. ----
  438. .. rst-class:: classref-descriptions-group
  439. Enumerations
  440. ------------
  441. .. _enum_TextServer_FontAntialiasing:
  442. .. rst-class:: classref-enumeration
  443. enum **FontAntialiasing**:
  444. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  445. .. rst-class:: classref-enumeration-constant
  446. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  447. Font glyphs are rasterized as 1-bit bitmaps.
  448. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  449. .. rst-class:: classref-enumeration-constant
  450. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  451. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  452. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  455. Font glyphs are rasterized for LCD screens.
  456. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  457. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _enum_TextServer_FontLCDSubpixelLayout:
  461. .. rst-class:: classref-enumeration
  462. enum **FontLCDSubpixelLayout**:
  463. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  466. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  467. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  470. Horizontal RGB subpixel layout.
  471. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  474. Horizontal BGR subpixel layout.
  475. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  478. Vertical RGB subpixel layout.
  479. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  482. Vertical BGR subpixel layout.
  483. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  486. Represents the size of the :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` enum.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _enum_TextServer_Direction:
  490. .. rst-class:: classref-enumeration
  491. enum **Direction**:
  492. .. _class_TextServer_constant_DIRECTION_AUTO:
  493. .. rst-class:: classref-enumeration-constant
  494. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  495. Text direction is determined based on contents and current locale.
  496. .. _class_TextServer_constant_DIRECTION_LTR:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  499. Text is written from left to right.
  500. .. _class_TextServer_constant_DIRECTION_RTL:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  503. Text is written from right to left.
  504. .. _class_TextServer_constant_DIRECTION_INHERITED:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  507. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  508. .. rst-class:: classref-item-separator
  509. ----
  510. .. _enum_TextServer_Orientation:
  511. .. rst-class:: classref-enumeration
  512. enum **Orientation**:
  513. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  514. .. rst-class:: classref-enumeration-constant
  515. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  516. Text is written horizontally.
  517. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  518. .. rst-class:: classref-enumeration-constant
  519. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  520. Left to right text is written vertically from top to bottom.
  521. Right to left text is written vertically from bottom to top.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _enum_TextServer_JustificationFlag:
  525. .. rst-class:: classref-enumeration
  526. flags **JustificationFlag**:
  527. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  530. Do not justify text.
  531. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  534. Justify text by adding and removing kashidas.
  535. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  538. Justify text by changing width of the spaces between the words.
  539. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  542. Remove trailing and leading spaces from the justified text.
  543. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  546. Only apply justification to the part of the text after the last tab.
  547. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  550. Apply justification to the trimmed line with ellipsis.
  551. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  554. Do not apply justification to the last line of the paragraph.
  555. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  556. .. rst-class:: classref-enumeration-constant
  557. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  558. Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>`).
  559. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  560. .. rst-class:: classref-enumeration-constant
  561. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  562. Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS>` are ignored).
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _enum_TextServer_AutowrapMode:
  566. .. rst-class:: classref-enumeration
  567. enum **AutowrapMode**:
  568. .. _class_TextServer_constant_AUTOWRAP_OFF:
  569. .. rst-class:: classref-enumeration-constant
  570. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  571. Autowrap is disabled.
  572. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  573. .. rst-class:: classref-enumeration-constant
  574. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  575. 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.
  576. .. _class_TextServer_constant_AUTOWRAP_WORD:
  577. .. rst-class:: classref-enumeration-constant
  578. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  579. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  580. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  583. 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.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _enum_TextServer_LineBreakFlag:
  587. .. rst-class:: classref-enumeration
  588. flags **LineBreakFlag**:
  589. .. _class_TextServer_constant_BREAK_NONE:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  592. Do not break the line.
  593. .. _class_TextServer_constant_BREAK_MANDATORY:
  594. .. rst-class:: classref-enumeration-constant
  595. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  596. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  597. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  600. Break the line between the words.
  601. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  604. Break the line between any unconnected graphemes.
  605. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  608. 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.
  609. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  612. Remove edge spaces from the broken line segments.
  613. .. _class_TextServer_constant_BREAK_TRIM_INDENT:
  614. .. rst-class:: classref-enumeration-constant
  615. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_INDENT** = ``32``
  616. Subtract first line indentation width from all lines after the first one.
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _enum_TextServer_VisibleCharactersBehavior:
  620. .. rst-class:: classref-enumeration
  621. enum **VisibleCharactersBehavior**:
  622. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  625. 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.
  626. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  629. 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.
  630. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  633. 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.
  634. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  637. 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.
  638. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  641. 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.
  642. .. rst-class:: classref-item-separator
  643. ----
  644. .. _enum_TextServer_OverrunBehavior:
  645. .. rst-class:: classref-enumeration
  646. enum **OverrunBehavior**:
  647. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  648. .. rst-class:: classref-enumeration-constant
  649. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  650. No text trimming is performed.
  651. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  652. .. rst-class:: classref-enumeration-constant
  653. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  654. Trims the text per character.
  655. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  656. .. rst-class:: classref-enumeration-constant
  657. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  658. Trims the text per word.
  659. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  662. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  663. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  664. .. rst-class:: classref-enumeration-constant
  665. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  666. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  667. .. rst-class:: classref-item-separator
  668. ----
  669. .. _enum_TextServer_TextOverrunFlag:
  670. .. rst-class:: classref-enumeration
  671. flags **TextOverrunFlag**:
  672. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  673. .. rst-class:: classref-enumeration-constant
  674. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  675. No trimming is performed.
  676. .. _class_TextServer_constant_OVERRUN_TRIM:
  677. .. rst-class:: classref-enumeration-constant
  678. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  679. Trims the text when it exceeds the given width.
  680. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  681. .. rst-class:: classref-enumeration-constant
  682. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  683. Trims the text per word instead of per grapheme.
  684. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  685. .. rst-class:: classref-enumeration-constant
  686. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  687. Determines whether an ellipsis should be added at the end of the text.
  688. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  691. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  692. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  693. .. rst-class:: classref-enumeration-constant
  694. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  695. Accounts for the text being justified before attempting to trim it (see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`).
  696. .. rst-class:: classref-item-separator
  697. ----
  698. .. _enum_TextServer_GraphemeFlag:
  699. .. rst-class:: classref-enumeration
  700. flags **GraphemeFlag**:
  701. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  704. Grapheme is supported by the font, and can be drawn.
  705. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  708. Grapheme is part of right-to-left or bottom-to-top run.
  709. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  712. Grapheme is not part of source text, it was added by justification process.
  713. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  716. Grapheme is whitespace.
  717. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  720. Grapheme is mandatory break point (e.g. ``"\n"``).
  721. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  724. Grapheme is optional break point (e.g. space).
  725. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  728. Grapheme is the tabulation character.
  729. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  732. Grapheme is kashida.
  733. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  734. .. rst-class:: classref-enumeration-constant
  735. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  736. Grapheme is punctuation character.
  737. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  740. Grapheme is underscore character.
  741. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  742. .. rst-class:: classref-enumeration-constant
  743. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  744. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  745. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  748. It is safe to insert a U+0640 before this grapheme for elongation.
  749. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  750. .. rst-class:: classref-enumeration-constant
  751. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  752. Grapheme is an object replacement character for the embedded object.
  753. .. _class_TextServer_constant_GRAPHEME_IS_SOFT_HYPHEN:
  754. .. rst-class:: classref-enumeration-constant
  755. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SOFT_HYPHEN** = ``8192``
  756. Grapheme is a soft hyphen.
  757. .. rst-class:: classref-item-separator
  758. ----
  759. .. _enum_TextServer_Hinting:
  760. .. rst-class:: classref-enumeration
  761. enum **Hinting**:
  762. .. _class_TextServer_constant_HINTING_NONE:
  763. .. rst-class:: classref-enumeration-constant
  764. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  765. Disables font hinting (smoother but less crisp).
  766. .. _class_TextServer_constant_HINTING_LIGHT:
  767. .. rst-class:: classref-enumeration-constant
  768. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  769. Use the light font hinting mode.
  770. .. _class_TextServer_constant_HINTING_NORMAL:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  773. Use the default font hinting mode (crisper but less smooth).
  774. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  775. .. rst-class:: classref-item-separator
  776. ----
  777. .. _enum_TextServer_SubpixelPositioning:
  778. .. rst-class:: classref-enumeration
  779. enum **SubpixelPositioning**:
  780. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  781. .. rst-class:: classref-enumeration-constant
  782. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  783. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  784. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  785. .. rst-class:: classref-enumeration-constant
  786. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  787. Glyph horizontal position is rounded based on font size.
  788. - 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>`.
  789. - 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>`.
  790. - To the whole pixel size for larger fonts.
  791. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  792. .. rst-class:: classref-enumeration-constant
  793. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  794. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  795. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  796. .. rst-class:: classref-enumeration-constant
  797. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  798. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  799. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  800. .. rst-class:: classref-enumeration-constant
  801. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  802. 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.
  803. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  804. .. rst-class:: classref-enumeration-constant
  805. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  806. 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.
  807. .. rst-class:: classref-item-separator
  808. ----
  809. .. _enum_TextServer_Feature:
  810. .. rst-class:: classref-enumeration
  811. enum **Feature**:
  812. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  813. .. rst-class:: classref-enumeration-constant
  814. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  815. TextServer supports simple text layouts.
  816. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  817. .. rst-class:: classref-enumeration-constant
  818. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  819. TextServer supports bidirectional text layouts.
  820. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  821. .. rst-class:: classref-enumeration-constant
  822. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  823. TextServer supports vertical layouts.
  824. .. _class_TextServer_constant_FEATURE_SHAPING:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  827. TextServer supports complex text shaping.
  828. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  831. TextServer supports justification using kashidas.
  832. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  833. .. rst-class:: classref-enumeration-constant
  834. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  835. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  836. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  839. TextServer supports loading bitmap fonts.
  840. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  841. .. rst-class:: classref-enumeration-constant
  842. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  843. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  844. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  845. .. rst-class:: classref-enumeration-constant
  846. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  847. TextServer supports multichannel signed distance field dynamic font rendering.
  848. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  849. .. rst-class:: classref-enumeration-constant
  850. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  851. TextServer supports loading system fonts.
  852. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  853. .. rst-class:: classref-enumeration-constant
  854. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  855. TextServer supports variable fonts.
  856. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  857. .. rst-class:: classref-enumeration-constant
  858. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  859. TextServer supports locale dependent and context sensitive case conversion.
  860. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  863. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  864. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  865. .. rst-class:: classref-enumeration-constant
  866. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  867. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  868. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  869. .. rst-class:: classref-enumeration-constant
  870. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  871. 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.
  872. .. rst-class:: classref-item-separator
  873. ----
  874. .. _enum_TextServer_ContourPointTag:
  875. .. rst-class:: classref-enumeration
  876. enum **ContourPointTag**:
  877. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  878. .. rst-class:: classref-enumeration-constant
  879. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  880. Contour point is on the curve.
  881. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  882. .. rst-class:: classref-enumeration-constant
  883. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  884. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  885. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  886. .. rst-class:: classref-enumeration-constant
  887. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  888. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  889. .. rst-class:: classref-item-separator
  890. ----
  891. .. _enum_TextServer_SpacingType:
  892. .. rst-class:: classref-enumeration
  893. enum **SpacingType**:
  894. .. _class_TextServer_constant_SPACING_GLYPH:
  895. .. rst-class:: classref-enumeration-constant
  896. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  897. Spacing for each glyph.
  898. .. _class_TextServer_constant_SPACING_SPACE:
  899. .. rst-class:: classref-enumeration-constant
  900. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  901. Spacing for the space character.
  902. .. _class_TextServer_constant_SPACING_TOP:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  905. Spacing at the top of the line.
  906. .. _class_TextServer_constant_SPACING_BOTTOM:
  907. .. rst-class:: classref-enumeration-constant
  908. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  909. Spacing at the bottom of the line.
  910. .. _class_TextServer_constant_SPACING_MAX:
  911. .. rst-class:: classref-enumeration-constant
  912. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  913. Represents the size of the :ref:`SpacingType<enum_TextServer_SpacingType>` enum.
  914. .. rst-class:: classref-item-separator
  915. ----
  916. .. _enum_TextServer_FontStyle:
  917. .. rst-class:: classref-enumeration
  918. flags **FontStyle**:
  919. .. _class_TextServer_constant_FONT_BOLD:
  920. .. rst-class:: classref-enumeration-constant
  921. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  922. Font is bold.
  923. .. _class_TextServer_constant_FONT_ITALIC:
  924. .. rst-class:: classref-enumeration-constant
  925. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  926. Font is italic or oblique.
  927. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  928. .. rst-class:: classref-enumeration-constant
  929. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  930. Font have fixed-width characters.
  931. .. rst-class:: classref-item-separator
  932. ----
  933. .. _enum_TextServer_StructuredTextParser:
  934. .. rst-class:: classref-enumeration
  935. enum **StructuredTextParser**:
  936. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  937. .. rst-class:: classref-enumeration-constant
  938. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  939. Use default Unicode BiDi algorithm.
  940. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  941. .. rst-class:: classref-enumeration-constant
  942. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  943. BiDi override for URI.
  944. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  945. .. rst-class:: classref-enumeration-constant
  946. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  947. BiDi override for file path.
  948. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  949. .. rst-class:: classref-enumeration-constant
  950. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  951. BiDi override for email.
  952. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  953. .. rst-class:: classref-enumeration-constant
  954. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  955. BiDi override for lists. Structured text options: list separator :ref:`String<class_String>`.
  956. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  957. .. rst-class:: classref-enumeration-constant
  958. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  959. BiDi override for GDScript.
  960. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  961. .. rst-class:: classref-enumeration-constant
  962. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  963. User defined structured text BiDi override function.
  964. .. rst-class:: classref-item-separator
  965. ----
  966. .. _enum_TextServer_FixedSizeScaleMode:
  967. .. rst-class:: classref-enumeration
  968. enum **FixedSizeScaleMode**:
  969. .. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE:
  970. .. rst-class:: classref-enumeration-constant
  971. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0``
  972. Bitmap font is not scaled.
  973. .. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY:
  974. .. rst-class:: classref-enumeration-constant
  975. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1``
  976. Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
  977. .. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED:
  978. .. rst-class:: classref-enumeration-constant
  979. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2``
  980. Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
  981. .. rst-class:: classref-section-separator
  982. ----
  983. .. rst-class:: classref-descriptions-group
  984. Method Descriptions
  985. -------------------
  986. .. _class_TextServer_method_create_font:
  987. .. rst-class:: classref-method
  988. :ref:`RID<class_RID>` **create_font**\ (\ )
  989. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  990. .. rst-class:: classref-item-separator
  991. ----
  992. .. _class_TextServer_method_create_font_linked_variation:
  993. .. rst-class:: classref-method
  994. :ref:`RID<class_RID>` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  995. Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_TextServer_method_create_shaped_text:
  999. .. rst-class:: classref-method
  1000. :ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  1001. 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.
  1002. \ **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>`).
  1003. \ **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>`).
  1004. .. rst-class:: classref-item-separator
  1005. ----
  1006. .. _class_TextServer_method_draw_hex_code_box:
  1007. .. rst-class:: classref-method
  1008. |void| **draw_hex_code_box**\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const|
  1009. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  1010. .. rst-class:: classref-item-separator
  1011. ----
  1012. .. _class_TextServer_method_font_clear_glyphs:
  1013. .. rst-class:: classref-method
  1014. |void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1015. Removes all rendered glyphs information from the cache entry.
  1016. \ **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.
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_TextServer_method_font_clear_kerning_map:
  1020. .. rst-class:: classref-method
  1021. |void| **font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ )
  1022. Removes all kerning overrides.
  1023. .. rst-class:: classref-item-separator
  1024. ----
  1025. .. _class_TextServer_method_font_clear_size_cache:
  1026. .. rst-class:: classref-method
  1027. |void| **font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1028. Removes all font sizes from the cache entry.
  1029. .. rst-class:: classref-item-separator
  1030. ----
  1031. .. _class_TextServer_method_font_clear_textures:
  1032. .. rst-class:: classref-method
  1033. |void| **font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1034. Removes all textures from font cache entry.
  1035. \ **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.
  1036. .. rst-class:: classref-item-separator
  1037. ----
  1038. .. _class_TextServer_method_font_draw_glyph:
  1039. .. rst-class:: classref-method
  1040. |void| **font_draw_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1041. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1042. \ **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>`.
  1043. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1044. .. rst-class:: classref-item-separator
  1045. ----
  1046. .. _class_TextServer_method_font_draw_glyph_outline:
  1047. .. rst-class:: classref-method
  1048. |void| **font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1049. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1050. \ **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>`.
  1051. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1052. .. rst-class:: classref-item-separator
  1053. ----
  1054. .. _class_TextServer_method_font_get_antialiasing:
  1055. .. rst-class:: classref-method
  1056. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1057. Returns font anti-aliasing mode.
  1058. .. rst-class:: classref-item-separator
  1059. ----
  1060. .. _class_TextServer_method_font_get_ascent:
  1061. .. rst-class:: classref-method
  1062. :ref:`float<class_float>` **font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1063. Returns the font ascent (number of pixels above the baseline).
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_TextServer_method_font_get_baseline_offset:
  1067. .. rst-class:: classref-method
  1068. :ref:`float<class_float>` **font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1069. Returns extra baseline offset (as a fraction of font height).
  1070. .. rst-class:: classref-item-separator
  1071. ----
  1072. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1073. .. rst-class:: classref-method
  1074. :ref:`int<class_int>` **font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const|
  1075. Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_TextServer_method_font_get_descent:
  1079. .. rst-class:: classref-method
  1080. :ref:`float<class_float>` **font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1081. Returns the font descent (number of pixels below the baseline).
  1082. .. rst-class:: classref-item-separator
  1083. ----
  1084. .. _class_TextServer_method_font_get_embolden:
  1085. .. rst-class:: classref-method
  1086. :ref:`float<class_float>` **font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1087. Returns font embolden strength.
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_TextServer_method_font_get_face_count:
  1091. .. rst-class:: classref-method
  1092. :ref:`int<class_int>` **font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1093. Returns number of faces in the TrueType / OpenType collection.
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_TextServer_method_font_get_face_index:
  1097. .. rst-class:: classref-method
  1098. :ref:`int<class_int>` **font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1099. Returns an active face index in the TrueType / OpenType collection.
  1100. .. rst-class:: classref-item-separator
  1101. ----
  1102. .. _class_TextServer_method_font_get_fixed_size:
  1103. .. rst-class:: classref-method
  1104. :ref:`int<class_int>` **font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1105. Returns bitmap font fixed size.
  1106. .. rst-class:: classref-item-separator
  1107. ----
  1108. .. _class_TextServer_method_font_get_fixed_size_scale_mode:
  1109. .. rst-class:: classref-method
  1110. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1111. Returns bitmap font scaling mode.
  1112. .. rst-class:: classref-item-separator
  1113. ----
  1114. .. _class_TextServer_method_font_get_generate_mipmaps:
  1115. .. rst-class:: classref-method
  1116. :ref:`bool<class_bool>` **font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1117. Returns ``true`` if font texture mipmap generation is enabled.
  1118. .. rst-class:: classref-item-separator
  1119. ----
  1120. .. _class_TextServer_method_font_get_global_oversampling:
  1121. .. rst-class:: classref-method
  1122. :ref:`float<class_float>` **font_get_global_oversampling**\ (\ ) |const|
  1123. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1124. .. rst-class:: classref-item-separator
  1125. ----
  1126. .. _class_TextServer_method_font_get_glyph_advance:
  1127. .. rst-class:: classref-method
  1128. :ref:`Vector2<class_Vector2>` **font_get_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1129. Returns glyph advance (offset of the next glyph).
  1130. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1131. .. rst-class:: classref-item-separator
  1132. ----
  1133. .. _class_TextServer_method_font_get_glyph_contours:
  1134. .. rst-class:: classref-method
  1135. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours**\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1136. Returns outline contours of the glyph as a :ref:`Dictionary<class_Dictionary>` with the following contents:
  1137. \ ``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.
  1138. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1139. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1140. .. rst-class:: classref-item-separator
  1141. ----
  1142. .. _class_TextServer_method_font_get_glyph_index:
  1143. .. rst-class:: classref-method
  1144. :ref:`int<class_int>` **font_get_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const|
  1145. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`.
  1146. .. rst-class:: classref-item-separator
  1147. ----
  1148. .. _class_TextServer_method_font_get_glyph_list:
  1149. .. rst-class:: classref-method
  1150. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1151. Returns list of rendered glyphs in the cache entry.
  1152. .. rst-class:: classref-item-separator
  1153. ----
  1154. .. _class_TextServer_method_font_get_glyph_offset:
  1155. .. rst-class:: classref-method
  1156. :ref:`Vector2<class_Vector2>` **font_get_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1157. Returns glyph offset from the baseline.
  1158. .. rst-class:: classref-item-separator
  1159. ----
  1160. .. _class_TextServer_method_font_get_glyph_size:
  1161. .. rst-class:: classref-method
  1162. :ref:`Vector2<class_Vector2>` **font_get_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1163. Returns size of the glyph.
  1164. .. rst-class:: classref-item-separator
  1165. ----
  1166. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1167. .. rst-class:: classref-method
  1168. :ref:`int<class_int>` **font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1169. Returns index of the cache texture containing the glyph.
  1170. .. rst-class:: classref-item-separator
  1171. ----
  1172. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1173. .. rst-class:: classref-method
  1174. :ref:`RID<class_RID>` **font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1175. Returns resource ID of the cache texture containing the glyph.
  1176. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_TextServer_method_font_get_glyph_texture_size:
  1180. .. rst-class:: classref-method
  1181. :ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1182. Returns size of the cache texture containing the glyph.
  1183. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1187. .. rst-class:: classref-method
  1188. :ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1189. Returns rectangle in the cache texture containing the glyph.
  1190. .. rst-class:: classref-item-separator
  1191. ----
  1192. .. _class_TextServer_method_font_get_hinting:
  1193. .. rst-class:: classref-method
  1194. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1195. Returns the font hinting mode. Used by dynamic fonts only.
  1196. .. rst-class:: classref-item-separator
  1197. ----
  1198. .. _class_TextServer_method_font_get_kerning:
  1199. .. rst-class:: classref-method
  1200. :ref:`Vector2<class_Vector2>` **font_get_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1201. Returns kerning for the pair of glyphs.
  1202. .. rst-class:: classref-item-separator
  1203. ----
  1204. .. _class_TextServer_method_font_get_kerning_list:
  1205. .. rst-class:: classref-method
  1206. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1207. Returns list of the kerning overrides.
  1208. .. rst-class:: classref-item-separator
  1209. ----
  1210. .. _class_TextServer_method_font_get_language_support_override:
  1211. .. rst-class:: classref-method
  1212. :ref:`bool<class_bool>` **font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1213. Returns ``true`` if support override is enabled for the ``language``.
  1214. .. rst-class:: classref-item-separator
  1215. ----
  1216. .. _class_TextServer_method_font_get_language_support_overrides:
  1217. .. rst-class:: classref-method
  1218. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1219. Returns list of language support overrides.
  1220. .. rst-class:: classref-item-separator
  1221. ----
  1222. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1223. .. rst-class:: classref-method
  1224. :ref:`int<class_int>` **font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1225. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1226. .. rst-class:: classref-item-separator
  1227. ----
  1228. .. _class_TextServer_method_font_get_msdf_size:
  1229. .. rst-class:: classref-method
  1230. :ref:`int<class_int>` **font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1231. Returns source font size used to generate MSDF textures.
  1232. .. rst-class:: classref-item-separator
  1233. ----
  1234. .. _class_TextServer_method_font_get_name:
  1235. .. rst-class:: classref-method
  1236. :ref:`String<class_String>` **font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1237. Returns font family name.
  1238. .. rst-class:: classref-item-separator
  1239. ----
  1240. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1241. .. rst-class:: classref-method
  1242. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1243. Returns font OpenType feature set override.
  1244. .. rst-class:: classref-item-separator
  1245. ----
  1246. .. _class_TextServer_method_font_get_ot_name_strings:
  1247. .. rst-class:: classref-method
  1248. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1249. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1250. .. rst-class:: classref-item-separator
  1251. ----
  1252. .. _class_TextServer_method_font_get_oversampling:
  1253. .. rst-class:: classref-method
  1254. :ref:`float<class_float>` **font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1255. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_TextServer_method_font_get_scale:
  1259. .. rst-class:: classref-method
  1260. :ref:`float<class_float>` **font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1261. Returns scaling factor of the color bitmap font.
  1262. .. rst-class:: classref-item-separator
  1263. ----
  1264. .. _class_TextServer_method_font_get_script_support_override:
  1265. .. rst-class:: classref-method
  1266. :ref:`bool<class_bool>` **font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1267. Returns ``true`` if support override is enabled for the ``script``.
  1268. .. rst-class:: classref-item-separator
  1269. ----
  1270. .. _class_TextServer_method_font_get_script_support_overrides:
  1271. .. rst-class:: classref-method
  1272. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1273. Returns list of script support overrides.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_TextServer_method_font_get_size_cache_list:
  1277. .. rst-class:: classref-method
  1278. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1279. Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size.
  1280. .. rst-class:: classref-item-separator
  1281. ----
  1282. .. _class_TextServer_method_font_get_spacing:
  1283. .. rst-class:: classref-method
  1284. :ref:`int<class_int>` **font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  1285. Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  1286. .. rst-class:: classref-item-separator
  1287. ----
  1288. .. _class_TextServer_method_font_get_stretch:
  1289. .. rst-class:: classref-method
  1290. :ref:`int<class_int>` **font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1291. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1292. .. rst-class:: classref-item-separator
  1293. ----
  1294. .. _class_TextServer_method_font_get_style:
  1295. .. rst-class:: classref-method
  1296. |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1297. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _class_TextServer_method_font_get_style_name:
  1301. .. rst-class:: classref-method
  1302. :ref:`String<class_String>` **font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1303. Returns font style name.
  1304. .. rst-class:: classref-item-separator
  1305. ----
  1306. .. _class_TextServer_method_font_get_subpixel_positioning:
  1307. .. rst-class:: classref-method
  1308. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1309. Returns font subpixel glyph positioning mode.
  1310. .. rst-class:: classref-item-separator
  1311. ----
  1312. .. _class_TextServer_method_font_get_supported_chars:
  1313. .. rst-class:: classref-method
  1314. :ref:`String<class_String>` **font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1315. Returns a string containing all the characters available in the font.
  1316. .. rst-class:: classref-item-separator
  1317. ----
  1318. .. _class_TextServer_method_font_get_texture_count:
  1319. .. rst-class:: classref-method
  1320. :ref:`int<class_int>` **font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1321. Returns number of textures used by font cache entry.
  1322. .. rst-class:: classref-item-separator
  1323. ----
  1324. .. _class_TextServer_method_font_get_texture_image:
  1325. .. rst-class:: classref-method
  1326. :ref:`Image<class_Image>` **font_get_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const|
  1327. Returns font cache texture image data.
  1328. .. rst-class:: classref-item-separator
  1329. ----
  1330. .. _class_TextServer_method_font_get_texture_offsets:
  1331. .. rst-class:: classref-method
  1332. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const|
  1333. Returns array containing glyph packing data.
  1334. .. rst-class:: classref-item-separator
  1335. ----
  1336. .. _class_TextServer_method_font_get_transform:
  1337. .. rst-class:: classref-method
  1338. :ref:`Transform2D<class_Transform2D>` **font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1339. Returns 2D transform applied to the font outlines.
  1340. .. rst-class:: classref-item-separator
  1341. ----
  1342. .. _class_TextServer_method_font_get_underline_position:
  1343. .. rst-class:: classref-method
  1344. :ref:`float<class_float>` **font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1345. Returns pixel offset of the underline below the baseline.
  1346. .. rst-class:: classref-item-separator
  1347. ----
  1348. .. _class_TextServer_method_font_get_underline_thickness:
  1349. .. rst-class:: classref-method
  1350. :ref:`float<class_float>` **font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1351. Returns thickness of the underline in pixels.
  1352. .. rst-class:: classref-item-separator
  1353. ----
  1354. .. _class_TextServer_method_font_get_variation_coordinates:
  1355. .. rst-class:: classref-method
  1356. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1357. 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.
  1358. .. rst-class:: classref-item-separator
  1359. ----
  1360. .. _class_TextServer_method_font_get_weight:
  1361. .. rst-class:: classref-method
  1362. :ref:`int<class_int>` **font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1363. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1364. .. rst-class:: classref-item-separator
  1365. ----
  1366. .. _class_TextServer_method_font_has_char:
  1367. .. rst-class:: classref-method
  1368. :ref:`bool<class_bool>` **font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const|
  1369. Returns ``true`` if a Unicode ``char`` is available in the font.
  1370. .. rst-class:: classref-item-separator
  1371. ----
  1372. .. _class_TextServer_method_font_is_allow_system_fallback:
  1373. .. rst-class:: classref-method
  1374. :ref:`bool<class_bool>` **font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1375. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1376. .. rst-class:: classref-item-separator
  1377. ----
  1378. .. _class_TextServer_method_font_is_force_autohinter:
  1379. .. rst-class:: classref-method
  1380. :ref:`bool<class_bool>` **font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1381. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1382. .. rst-class:: classref-item-separator
  1383. ----
  1384. .. _class_TextServer_method_font_is_language_supported:
  1385. .. rst-class:: classref-method
  1386. :ref:`bool<class_bool>` **font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const|
  1387. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1388. .. rst-class:: classref-item-separator
  1389. ----
  1390. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1391. .. rst-class:: classref-method
  1392. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1393. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1394. .. rst-class:: classref-item-separator
  1395. ----
  1396. .. _class_TextServer_method_font_is_script_supported:
  1397. .. rst-class:: classref-method
  1398. :ref:`bool<class_bool>` **font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const|
  1399. Returns ``true``, if font supports given script (ISO 15924 code).
  1400. .. rst-class:: classref-item-separator
  1401. ----
  1402. .. _class_TextServer_method_font_remove_glyph:
  1403. .. rst-class:: classref-method
  1404. |void| **font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ )
  1405. Removes specified rendered glyph information from the cache entry.
  1406. \ **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.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_TextServer_method_font_remove_kerning:
  1410. .. rst-class:: classref-method
  1411. |void| **font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ )
  1412. Removes kerning override for the pair of glyphs.
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_TextServer_method_font_remove_language_support_override:
  1416. .. rst-class:: classref-method
  1417. |void| **font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1418. Remove language support override.
  1419. .. rst-class:: classref-item-separator
  1420. ----
  1421. .. _class_TextServer_method_font_remove_script_support_override:
  1422. .. rst-class:: classref-method
  1423. |void| **font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1424. Removes script support override.
  1425. .. rst-class:: classref-item-separator
  1426. ----
  1427. .. _class_TextServer_method_font_remove_size_cache:
  1428. .. rst-class:: classref-method
  1429. |void| **font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1430. Removes specified font size from the cache entry.
  1431. .. rst-class:: classref-item-separator
  1432. ----
  1433. .. _class_TextServer_method_font_remove_texture:
  1434. .. rst-class:: classref-method
  1435. |void| **font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ )
  1436. Removes specified texture from the cache entry.
  1437. \ **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>`.
  1438. .. rst-class:: classref-item-separator
  1439. ----
  1440. .. _class_TextServer_method_font_render_glyph:
  1441. .. rst-class:: classref-method
  1442. |void| **font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ )
  1443. Renders specified glyph to the font cache texture.
  1444. .. rst-class:: classref-item-separator
  1445. ----
  1446. .. _class_TextServer_method_font_render_range:
  1447. .. rst-class:: classref-method
  1448. |void| **font_render_range**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ )
  1449. Renders the range of characters to the font cache texture.
  1450. .. rst-class:: classref-item-separator
  1451. ----
  1452. .. _class_TextServer_method_font_set_allow_system_fallback:
  1453. .. rst-class:: classref-method
  1454. |void| **font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ )
  1455. If set to ``true``, system fonts can be automatically used as fallbacks.
  1456. .. rst-class:: classref-item-separator
  1457. ----
  1458. .. _class_TextServer_method_font_set_antialiasing:
  1459. .. rst-class:: classref-method
  1460. |void| **font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ )
  1461. Sets font anti-aliasing mode.
  1462. .. rst-class:: classref-item-separator
  1463. ----
  1464. .. _class_TextServer_method_font_set_ascent:
  1465. .. rst-class:: classref-method
  1466. |void| **font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ )
  1467. Sets the font ascent (number of pixels above the baseline).
  1468. .. rst-class:: classref-item-separator
  1469. ----
  1470. .. _class_TextServer_method_font_set_baseline_offset:
  1471. .. rst-class:: classref-method
  1472. |void| **font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ )
  1473. Sets extra baseline offset (as a fraction of font height).
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_TextServer_method_font_set_data:
  1477. .. rst-class:: classref-method
  1478. |void| **font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ )
  1479. Sets font source data, e.g contents of the dynamic font source file.
  1480. .. rst-class:: classref-item-separator
  1481. ----
  1482. .. _class_TextServer_method_font_set_descent:
  1483. .. rst-class:: classref-method
  1484. |void| **font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ )
  1485. Sets the font descent (number of pixels below the baseline).
  1486. .. rst-class:: classref-item-separator
  1487. ----
  1488. .. _class_TextServer_method_font_set_embolden:
  1489. .. rst-class:: classref-method
  1490. |void| **font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ )
  1491. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1492. .. rst-class:: classref-item-separator
  1493. ----
  1494. .. _class_TextServer_method_font_set_face_index:
  1495. .. rst-class:: classref-method
  1496. |void| **font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ )
  1497. Sets an active face index in the TrueType / OpenType collection.
  1498. .. rst-class:: classref-item-separator
  1499. ----
  1500. .. _class_TextServer_method_font_set_fixed_size:
  1501. .. rst-class:: classref-method
  1502. |void| **font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ )
  1503. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1504. .. rst-class:: classref-item-separator
  1505. ----
  1506. .. _class_TextServer_method_font_set_fixed_size_scale_mode:
  1507. .. rst-class:: classref-method
  1508. |void| **font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ )
  1509. Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero.
  1510. .. rst-class:: classref-item-separator
  1511. ----
  1512. .. _class_TextServer_method_font_set_force_autohinter:
  1513. .. rst-class:: classref-method
  1514. |void| **font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ )
  1515. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1516. .. rst-class:: classref-item-separator
  1517. ----
  1518. .. _class_TextServer_method_font_set_generate_mipmaps:
  1519. .. rst-class:: classref-method
  1520. |void| **font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ )
  1521. If set to ``true`` font texture mipmap generation is enabled.
  1522. .. rst-class:: classref-item-separator
  1523. ----
  1524. .. _class_TextServer_method_font_set_global_oversampling:
  1525. .. rst-class:: classref-method
  1526. |void| **font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ )
  1527. Sets oversampling factor, shared by all font in the TextServer.
  1528. \ **Note:** This value can be automatically changed by display server.
  1529. .. rst-class:: classref-item-separator
  1530. ----
  1531. .. _class_TextServer_method_font_set_glyph_advance:
  1532. .. rst-class:: classref-method
  1533. |void| **font_set_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ )
  1534. Sets glyph advance (offset of the next glyph).
  1535. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1536. .. rst-class:: classref-item-separator
  1537. ----
  1538. .. _class_TextServer_method_font_set_glyph_offset:
  1539. .. rst-class:: classref-method
  1540. |void| **font_set_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ )
  1541. Sets glyph offset from the baseline.
  1542. .. rst-class:: classref-item-separator
  1543. ----
  1544. .. _class_TextServer_method_font_set_glyph_size:
  1545. .. rst-class:: classref-method
  1546. |void| **font_set_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ )
  1547. Sets size of the glyph.
  1548. .. rst-class:: classref-item-separator
  1549. ----
  1550. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1551. .. rst-class:: classref-method
  1552. |void| **font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ )
  1553. Sets index of the cache texture containing the glyph.
  1554. .. rst-class:: classref-item-separator
  1555. ----
  1556. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1557. .. rst-class:: classref-method
  1558. |void| **font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ )
  1559. Sets rectangle in the cache texture containing the glyph.
  1560. .. rst-class:: classref-item-separator
  1561. ----
  1562. .. _class_TextServer_method_font_set_hinting:
  1563. .. rst-class:: classref-method
  1564. |void| **font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ )
  1565. Sets font hinting mode. Used by dynamic fonts only.
  1566. .. rst-class:: classref-item-separator
  1567. ----
  1568. .. _class_TextServer_method_font_set_kerning:
  1569. .. rst-class:: classref-method
  1570. |void| **font_set_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ )
  1571. Sets kerning for the pair of glyphs.
  1572. .. rst-class:: classref-item-separator
  1573. ----
  1574. .. _class_TextServer_method_font_set_language_support_override:
  1575. .. rst-class:: classref-method
  1576. |void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1577. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1578. .. rst-class:: classref-item-separator
  1579. ----
  1580. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1581. .. rst-class:: classref-method
  1582. |void| **font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ )
  1583. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1584. .. rst-class:: classref-item-separator
  1585. ----
  1586. .. _class_TextServer_method_font_set_msdf_size:
  1587. .. rst-class:: classref-method
  1588. |void| **font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ )
  1589. Sets source font size used to generate MSDF textures.
  1590. .. rst-class:: classref-item-separator
  1591. ----
  1592. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1593. .. rst-class:: classref-method
  1594. |void| **font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ )
  1595. 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.
  1596. \ **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.
  1597. .. rst-class:: classref-item-separator
  1598. ----
  1599. .. _class_TextServer_method_font_set_name:
  1600. .. rst-class:: classref-method
  1601. |void| **font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1602. Sets the font family name.
  1603. .. rst-class:: classref-item-separator
  1604. ----
  1605. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1606. .. rst-class:: classref-method
  1607. |void| **font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ )
  1608. Sets font OpenType feature set override.
  1609. .. rst-class:: classref-item-separator
  1610. ----
  1611. .. _class_TextServer_method_font_set_oversampling:
  1612. .. rst-class:: classref-method
  1613. |void| **font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ )
  1614. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1615. .. rst-class:: classref-item-separator
  1616. ----
  1617. .. _class_TextServer_method_font_set_scale:
  1618. .. rst-class:: classref-method
  1619. |void| **font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ )
  1620. Sets scaling factor of the color bitmap font.
  1621. .. rst-class:: classref-item-separator
  1622. ----
  1623. .. _class_TextServer_method_font_set_script_support_override:
  1624. .. rst-class:: classref-method
  1625. |void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1626. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1627. .. rst-class:: classref-item-separator
  1628. ----
  1629. .. _class_TextServer_method_font_set_spacing:
  1630. .. rst-class:: classref-method
  1631. |void| **font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  1632. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  1633. .. rst-class:: classref-item-separator
  1634. ----
  1635. .. _class_TextServer_method_font_set_stretch:
  1636. .. rst-class:: classref-method
  1637. |void| **font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1638. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1639. \ **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.
  1640. .. rst-class:: classref-item-separator
  1641. ----
  1642. .. _class_TextServer_method_font_set_style:
  1643. .. rst-class:: classref-method
  1644. |void| **font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ )
  1645. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1646. \ **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.
  1647. .. rst-class:: classref-item-separator
  1648. ----
  1649. .. _class_TextServer_method_font_set_style_name:
  1650. .. rst-class:: classref-method
  1651. |void| **font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1652. Sets the font style name.
  1653. .. rst-class:: classref-item-separator
  1654. ----
  1655. .. _class_TextServer_method_font_set_subpixel_positioning:
  1656. .. rst-class:: classref-method
  1657. |void| **font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ )
  1658. Sets font subpixel glyph positioning mode.
  1659. .. rst-class:: classref-item-separator
  1660. ----
  1661. .. _class_TextServer_method_font_set_texture_image:
  1662. .. rst-class:: classref-method
  1663. |void| **font_set_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ )
  1664. Sets font cache texture image data.
  1665. .. rst-class:: classref-item-separator
  1666. ----
  1667. .. _class_TextServer_method_font_set_texture_offsets:
  1668. .. rst-class:: classref-method
  1669. |void| **font_set_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ )
  1670. Sets array containing glyph packing data.
  1671. .. rst-class:: classref-item-separator
  1672. ----
  1673. .. _class_TextServer_method_font_set_transform:
  1674. .. rst-class:: classref-method
  1675. |void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ )
  1676. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1677. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1678. .. rst-class:: classref-item-separator
  1679. ----
  1680. .. _class_TextServer_method_font_set_underline_position:
  1681. .. rst-class:: classref-method
  1682. |void| **font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ )
  1683. Sets pixel offset of the underline below the baseline.
  1684. .. rst-class:: classref-item-separator
  1685. ----
  1686. .. _class_TextServer_method_font_set_underline_thickness:
  1687. .. rst-class:: classref-method
  1688. |void| **font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ )
  1689. Sets thickness of the underline in pixels.
  1690. .. rst-class:: classref-item-separator
  1691. ----
  1692. .. _class_TextServer_method_font_set_variation_coordinates:
  1693. .. rst-class:: classref-method
  1694. |void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ )
  1695. 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.
  1696. .. rst-class:: classref-item-separator
  1697. ----
  1698. .. _class_TextServer_method_font_set_weight:
  1699. .. rst-class:: classref-method
  1700. |void| **font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1701. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1702. \ **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.
  1703. .. rst-class:: classref-item-separator
  1704. ----
  1705. .. _class_TextServer_method_font_supported_feature_list:
  1706. .. rst-class:: classref-method
  1707. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1708. Returns the dictionary of the supported OpenType features.
  1709. .. rst-class:: classref-item-separator
  1710. ----
  1711. .. _class_TextServer_method_font_supported_variation_list:
  1712. .. rst-class:: classref-method
  1713. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1714. Returns the dictionary of the supported OpenType variation coordinates.
  1715. .. rst-class:: classref-item-separator
  1716. ----
  1717. .. _class_TextServer_method_format_number:
  1718. .. rst-class:: classref-method
  1719. :ref:`String<class_String>` **format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1720. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1721. If ``language`` is omitted, the active locale will be used.
  1722. .. rst-class:: classref-item-separator
  1723. ----
  1724. .. _class_TextServer_method_free_rid:
  1725. .. rst-class:: classref-method
  1726. |void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1727. Frees an object created by this **TextServer**.
  1728. .. rst-class:: classref-item-separator
  1729. ----
  1730. .. _class_TextServer_method_get_features:
  1731. .. rst-class:: classref-method
  1732. :ref:`int<class_int>` **get_features**\ (\ ) |const|
  1733. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1734. .. rst-class:: classref-item-separator
  1735. ----
  1736. .. _class_TextServer_method_get_hex_code_box_size:
  1737. .. rst-class:: classref-method
  1738. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1739. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1740. .. rst-class:: classref-item-separator
  1741. ----
  1742. .. _class_TextServer_method_get_name:
  1743. .. rst-class:: classref-method
  1744. :ref:`String<class_String>` **get_name**\ (\ ) |const|
  1745. Returns the name of the server interface.
  1746. .. rst-class:: classref-item-separator
  1747. ----
  1748. .. _class_TextServer_method_get_support_data_filename:
  1749. .. rst-class:: classref-method
  1750. :ref:`String<class_String>` **get_support_data_filename**\ (\ ) |const|
  1751. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1752. .. rst-class:: classref-item-separator
  1753. ----
  1754. .. _class_TextServer_method_get_support_data_info:
  1755. .. rst-class:: classref-method
  1756. :ref:`String<class_String>` **get_support_data_info**\ (\ ) |const|
  1757. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1758. .. rst-class:: classref-item-separator
  1759. ----
  1760. .. _class_TextServer_method_has:
  1761. .. rst-class:: classref-method
  1762. :ref:`bool<class_bool>` **has**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1763. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1764. .. rst-class:: classref-item-separator
  1765. ----
  1766. .. _class_TextServer_method_has_feature:
  1767. .. rst-class:: classref-method
  1768. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const|
  1769. Returns ``true`` if the server supports a feature.
  1770. .. rst-class:: classref-item-separator
  1771. ----
  1772. .. _class_TextServer_method_is_confusable:
  1773. .. rst-class:: classref-method
  1774. :ref:`int<class_int>` **is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const|
  1775. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1776. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1777. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1778. .. rst-class:: classref-item-separator
  1779. ----
  1780. .. _class_TextServer_method_is_locale_right_to_left:
  1781. .. rst-class:: classref-method
  1782. :ref:`bool<class_bool>` **is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |const|
  1783. Returns ``true`` if locale is right-to-left.
  1784. .. rst-class:: classref-item-separator
  1785. ----
  1786. .. _class_TextServer_method_is_valid_identifier:
  1787. .. rst-class:: classref-method
  1788. :ref:`bool<class_bool>` **is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  1789. Returns ``true`` if ``string`` is a valid identifier.
  1790. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1791. - Conform to normalization form C.
  1792. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1793. - May contain Unicode characters of class XID_Continue in the other positions.
  1794. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1795. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1796. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1797. - May contain Unicode characters of class XID_Continue in the other positions.
  1798. .. rst-class:: classref-item-separator
  1799. ----
  1800. .. _class_TextServer_method_load_support_data:
  1801. .. rst-class:: classref-method
  1802. :ref:`bool<class_bool>` **load_support_data**\ (\ filename\: :ref:`String<class_String>`\ )
  1803. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1804. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1805. .. rst-class:: classref-item-separator
  1806. ----
  1807. .. _class_TextServer_method_name_to_tag:
  1808. .. rst-class:: classref-method
  1809. :ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const|
  1810. Converts readable feature, variation, script or language name to OpenType tag.
  1811. .. rst-class:: classref-item-separator
  1812. ----
  1813. .. _class_TextServer_method_parse_number:
  1814. .. rst-class:: classref-method
  1815. :ref:`String<class_String>` **parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1816. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1817. .. rst-class:: classref-item-separator
  1818. ----
  1819. .. _class_TextServer_method_parse_structured_text:
  1820. .. rst-class:: classref-method
  1821. :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const|
  1822. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1823. .. rst-class:: classref-item-separator
  1824. ----
  1825. .. _class_TextServer_method_percent_sign:
  1826. .. rst-class:: classref-method
  1827. :ref:`String<class_String>` **percent_sign**\ (\ language\: :ref:`String<class_String>` = ""\ ) |const|
  1828. Returns percent sign used in the ``language``.
  1829. .. rst-class:: classref-item-separator
  1830. ----
  1831. .. _class_TextServer_method_save_support_data:
  1832. .. rst-class:: classref-method
  1833. :ref:`bool<class_bool>` **save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |const|
  1834. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1835. \ **Note:** This function is used by during project export, to include TextServer database.
  1836. .. rst-class:: classref-item-separator
  1837. ----
  1838. .. _class_TextServer_method_shaped_get_span_count:
  1839. .. rst-class:: classref-method
  1840. :ref:`int<class_int>` **shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1841. 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>`.
  1842. .. rst-class:: classref-item-separator
  1843. ----
  1844. .. _class_TextServer_method_shaped_get_span_meta:
  1845. .. rst-class:: classref-method
  1846. :ref:`Variant<class_Variant>` **shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const|
  1847. Returns text span metadata.
  1848. .. rst-class:: classref-item-separator
  1849. ----
  1850. .. _class_TextServer_method_shaped_set_span_update_font:
  1851. .. rst-class:: classref-method
  1852. |void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ )
  1853. Changes text span font, font size and OpenType features, without changing the text.
  1854. .. rst-class:: classref-item-separator
  1855. ----
  1856. .. _class_TextServer_method_shaped_text_add_object:
  1857. .. rst-class:: classref-method
  1858. :ref:`bool<class_bool>` **shaped_text_add_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ )
  1859. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1860. .. rst-class:: classref-item-separator
  1861. ----
  1862. .. _class_TextServer_method_shaped_text_add_string:
  1863. .. rst-class:: classref-method
  1864. :ref:`bool<class_bool>` **shaped_text_add_string**\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ )
  1865. Adds text span and font to draw it to the text buffer.
  1866. .. rst-class:: classref-item-separator
  1867. ----
  1868. .. _class_TextServer_method_shaped_text_clear:
  1869. .. rst-class:: classref-method
  1870. |void| **shaped_text_clear**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1871. Clears text buffer (removes text and inline objects).
  1872. .. rst-class:: classref-item-separator
  1873. ----
  1874. .. _class_TextServer_method_shaped_text_closest_character_pos:
  1875. .. rst-class:: classref-method
  1876. :ref:`int<class_int>` **shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  1877. Returns composite character position closest to the ``pos``.
  1878. .. rst-class:: classref-item-separator
  1879. ----
  1880. .. _class_TextServer_method_shaped_text_draw:
  1881. .. rst-class:: classref-method
  1882. |void| **shaped_text_draw**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1883. 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).
  1884. .. rst-class:: classref-item-separator
  1885. ----
  1886. .. _class_TextServer_method_shaped_text_draw_outline:
  1887. .. rst-class:: classref-method
  1888. |void| **shaped_text_draw_outline**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1889. 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).
  1890. .. rst-class:: classref-item-separator
  1891. ----
  1892. .. _class_TextServer_method_shaped_text_fit_to_width:
  1893. .. rst-class:: classref-method
  1894. :ref:`float<class_float>` **shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ )
  1895. Adjusts text width to fit to specified width, returns new text width.
  1896. .. rst-class:: classref-item-separator
  1897. ----
  1898. .. _class_TextServer_method_shaped_text_get_ascent:
  1899. .. rst-class:: classref-method
  1900. :ref:`float<class_float>` **shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1901. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1902. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1903. .. rst-class:: classref-item-separator
  1904. ----
  1905. .. _class_TextServer_method_shaped_text_get_carets:
  1906. .. rst-class:: classref-method
  1907. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const|
  1908. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1909. .. rst-class:: classref-item-separator
  1910. ----
  1911. .. _class_TextServer_method_shaped_text_get_character_breaks:
  1912. .. rst-class:: classref-method
  1913. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1914. Returns array of the composite character boundaries.
  1915. .. rst-class:: classref-item-separator
  1916. ----
  1917. .. _class_TextServer_method_shaped_text_get_custom_ellipsis:
  1918. .. rst-class:: classref-method
  1919. :ref:`int<class_int>` **shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1920. Returns ellipsis character used for text clipping.
  1921. .. rst-class:: classref-item-separator
  1922. ----
  1923. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1924. .. rst-class:: classref-method
  1925. :ref:`String<class_String>` **shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1926. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1927. .. rst-class:: classref-item-separator
  1928. ----
  1929. .. _class_TextServer_method_shaped_text_get_descent:
  1930. .. rst-class:: classref-method
  1931. :ref:`float<class_float>` **shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1932. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1933. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1934. .. rst-class:: classref-item-separator
  1935. ----
  1936. .. _class_TextServer_method_shaped_text_get_direction:
  1937. .. rst-class:: classref-method
  1938. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1939. Returns direction of the text.
  1940. .. rst-class:: classref-item-separator
  1941. ----
  1942. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1943. .. rst-class:: classref-method
  1944. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const|
  1945. Returns dominant direction of in the range of text.
  1946. .. rst-class:: classref-item-separator
  1947. ----
  1948. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1949. .. rst-class:: classref-method
  1950. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1951. Returns number of glyphs in the ellipsis.
  1952. .. rst-class:: classref-item-separator
  1953. ----
  1954. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1955. .. rst-class:: classref-method
  1956. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1957. Returns array of the glyphs in the ellipsis.
  1958. .. rst-class:: classref-item-separator
  1959. ----
  1960. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1961. .. rst-class:: classref-method
  1962. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1963. Returns position of the ellipsis.
  1964. .. rst-class:: classref-item-separator
  1965. ----
  1966. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1967. .. rst-class:: classref-method
  1968. :ref:`int<class_int>` **shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1969. Returns number of glyphs in the buffer.
  1970. .. rst-class:: classref-item-separator
  1971. ----
  1972. .. _class_TextServer_method_shaped_text_get_glyphs:
  1973. .. rst-class:: classref-method
  1974. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1975. Returns an array of glyphs in the visual order.
  1976. .. rst-class:: classref-item-separator
  1977. ----
  1978. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1979. .. rst-class:: classref-method
  1980. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  1981. Returns composite character's bounds as offsets from the start of the line.
  1982. .. rst-class:: classref-item-separator
  1983. ----
  1984. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1985. .. rst-class:: classref-method
  1986. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1987. Returns direction of the text, inferred by the BiDi algorithm.
  1988. .. rst-class:: classref-item-separator
  1989. ----
  1990. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1991. .. rst-class:: classref-method
  1992. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const|
  1993. Breaks text to the lines and returns character ranges for each line.
  1994. .. rst-class:: classref-item-separator
  1995. ----
  1996. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1997. .. rst-class:: classref-method
  1998. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const|
  1999. Breaks text to the lines and columns. Returns character ranges for each segment.
  2000. .. rst-class:: classref-item-separator
  2001. ----
  2002. .. _class_TextServer_method_shaped_text_get_object_rect:
  2003. .. rst-class:: classref-method
  2004. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2005. Returns bounding rectangle of the inline object.
  2006. .. rst-class:: classref-item-separator
  2007. ----
  2008. .. _class_TextServer_method_shaped_text_get_objects:
  2009. .. rst-class:: classref-method
  2010. :ref:`Array<class_Array>` **shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2011. Returns array of inline objects.
  2012. .. rst-class:: classref-item-separator
  2013. ----
  2014. .. _class_TextServer_method_shaped_text_get_orientation:
  2015. .. rst-class:: classref-method
  2016. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2017. Returns text orientation.
  2018. .. rst-class:: classref-item-separator
  2019. ----
  2020. .. _class_TextServer_method_shaped_text_get_parent:
  2021. .. rst-class:: classref-method
  2022. :ref:`RID<class_RID>` **shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2023. Returns the parent buffer from which the substring originates.
  2024. .. rst-class:: classref-item-separator
  2025. ----
  2026. .. _class_TextServer_method_shaped_text_get_preserve_control:
  2027. .. rst-class:: classref-method
  2028. :ref:`bool<class_bool>` **shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2029. Returns ``true`` if text buffer is configured to display control characters.
  2030. .. rst-class:: classref-item-separator
  2031. ----
  2032. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  2033. .. rst-class:: classref-method
  2034. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2035. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  2036. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  2037. .. rst-class:: classref-item-separator
  2038. ----
  2039. .. _class_TextServer_method_shaped_text_get_range:
  2040. .. rst-class:: classref-method
  2041. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2042. Returns substring buffer character range in the parent buffer.
  2043. .. rst-class:: classref-item-separator
  2044. ----
  2045. .. _class_TextServer_method_shaped_text_get_selection:
  2046. .. rst-class:: classref-method
  2047. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const|
  2048. Returns selection rectangles for the specified character range.
  2049. .. rst-class:: classref-item-separator
  2050. ----
  2051. .. _class_TextServer_method_shaped_text_get_size:
  2052. .. rst-class:: classref-method
  2053. :ref:`Vector2<class_Vector2>` **shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2054. Returns size of the text.
  2055. .. rst-class:: classref-item-separator
  2056. ----
  2057. .. _class_TextServer_method_shaped_text_get_spacing:
  2058. .. rst-class:: classref-method
  2059. :ref:`int<class_int>` **shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  2060. Returns extra spacing added between glyphs or lines in pixels.
  2061. .. rst-class:: classref-item-separator
  2062. ----
  2063. .. _class_TextServer_method_shaped_text_get_trim_pos:
  2064. .. rst-class:: classref-method
  2065. :ref:`int<class_int>` **shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2066. Returns the position of the overrun trim.
  2067. .. rst-class:: classref-item-separator
  2068. ----
  2069. .. _class_TextServer_method_shaped_text_get_underline_position:
  2070. .. rst-class:: classref-method
  2071. :ref:`float<class_float>` **shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2072. Returns pixel offset of the underline below the baseline.
  2073. .. rst-class:: classref-item-separator
  2074. ----
  2075. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  2076. .. rst-class:: classref-method
  2077. :ref:`float<class_float>` **shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2078. Returns thickness of the underline.
  2079. .. rst-class:: classref-item-separator
  2080. ----
  2081. .. _class_TextServer_method_shaped_text_get_width:
  2082. .. rst-class:: classref-method
  2083. :ref:`float<class_float>` **shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2084. Returns width (for horizontal layout) or height (for vertical) of the text.
  2085. .. rst-class:: classref-item-separator
  2086. ----
  2087. .. _class_TextServer_method_shaped_text_get_word_breaks:
  2088. .. rst-class:: classref-method
  2089. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264\ ) |const|
  2090. 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>`).
  2091. .. rst-class:: classref-item-separator
  2092. ----
  2093. .. _class_TextServer_method_shaped_text_has_visible_chars:
  2094. .. rst-class:: classref-method
  2095. :ref:`bool<class_bool>` **shaped_text_has_visible_chars**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2096. Returns ``true`` if text buffer contains any visible characters.
  2097. .. rst-class:: classref-item-separator
  2098. ----
  2099. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  2100. .. rst-class:: classref-method
  2101. :ref:`int<class_int>` **shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2102. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  2103. .. rst-class:: classref-item-separator
  2104. ----
  2105. .. _class_TextServer_method_shaped_text_hit_test_position:
  2106. .. rst-class:: classref-method
  2107. :ref:`int<class_int>` **shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2108. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  2109. .. rst-class:: classref-item-separator
  2110. ----
  2111. .. _class_TextServer_method_shaped_text_is_ready:
  2112. .. rst-class:: classref-method
  2113. :ref:`bool<class_bool>` **shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2114. Returns ``true`` if buffer is successfully shaped.
  2115. .. rst-class:: classref-item-separator
  2116. ----
  2117. .. _class_TextServer_method_shaped_text_next_character_pos:
  2118. .. rst-class:: classref-method
  2119. :ref:`int<class_int>` **shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2120. Returns composite character end position closest to the ``pos``.
  2121. .. rst-class:: classref-item-separator
  2122. ----
  2123. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2124. .. rst-class:: classref-method
  2125. :ref:`int<class_int>` **shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2126. Returns grapheme end position closest to the ``pos``.
  2127. .. rst-class:: classref-item-separator
  2128. ----
  2129. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2130. .. rst-class:: classref-method
  2131. |void| **shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ )
  2132. Trims text if it exceeds the given width.
  2133. .. rst-class:: classref-item-separator
  2134. ----
  2135. .. _class_TextServer_method_shaped_text_prev_character_pos:
  2136. .. rst-class:: classref-method
  2137. :ref:`int<class_int>` **shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2138. Returns composite character start position closest to the ``pos``.
  2139. .. rst-class:: classref-item-separator
  2140. ----
  2141. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2142. .. rst-class:: classref-method
  2143. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2144. Returns grapheme start position closest to the ``pos``.
  2145. .. rst-class:: classref-item-separator
  2146. ----
  2147. .. _class_TextServer_method_shaped_text_resize_object:
  2148. .. rst-class:: classref-method
  2149. :ref:`bool<class_bool>` **shaped_text_resize_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ )
  2150. Sets new size and alignment of embedded object.
  2151. .. rst-class:: classref-item-separator
  2152. ----
  2153. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2154. .. rst-class:: classref-method
  2155. |void| **shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ )
  2156. Overrides BiDi for the structured text.
  2157. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2158. .. rst-class:: classref-item-separator
  2159. ----
  2160. .. _class_TextServer_method_shaped_text_set_custom_ellipsis:
  2161. .. rst-class:: classref-method
  2162. |void| **shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ )
  2163. Sets ellipsis character used for text clipping.
  2164. .. rst-class:: classref-item-separator
  2165. ----
  2166. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2167. .. rst-class:: classref-method
  2168. |void| **shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ )
  2169. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2170. .. rst-class:: classref-item-separator
  2171. ----
  2172. .. _class_TextServer_method_shaped_text_set_direction:
  2173. .. rst-class:: classref-method
  2174. |void| **shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ )
  2175. 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.
  2176. \ **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>`).
  2177. .. rst-class:: classref-item-separator
  2178. ----
  2179. .. _class_TextServer_method_shaped_text_set_orientation:
  2180. .. rst-class:: classref-method
  2181. |void| **shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  2182. Sets desired text orientation.
  2183. \ **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>`).
  2184. .. rst-class:: classref-item-separator
  2185. ----
  2186. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2187. .. rst-class:: classref-method
  2188. |void| **shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2189. If set to ``true`` text buffer will display control characters.
  2190. .. rst-class:: classref-item-separator
  2191. ----
  2192. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2193. .. rst-class:: classref-method
  2194. |void| **shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2195. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2196. .. rst-class:: classref-item-separator
  2197. ----
  2198. .. _class_TextServer_method_shaped_text_set_spacing:
  2199. .. rst-class:: classref-method
  2200. |void| **shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  2201. Sets extra spacing added between glyphs or lines in pixels.
  2202. .. rst-class:: classref-item-separator
  2203. ----
  2204. .. _class_TextServer_method_shaped_text_shape:
  2205. .. rst-class:: classref-method
  2206. :ref:`bool<class_bool>` **shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2207. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2208. \ **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.
  2209. .. rst-class:: classref-item-separator
  2210. ----
  2211. .. _class_TextServer_method_shaped_text_sort_logical:
  2212. .. rst-class:: classref-method
  2213. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2214. Returns text glyphs in the logical order.
  2215. .. rst-class:: classref-item-separator
  2216. ----
  2217. .. _class_TextServer_method_shaped_text_substr:
  2218. .. rst-class:: classref-method
  2219. :ref:`RID<class_RID>` **shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const|
  2220. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2221. .. rst-class:: classref-item-separator
  2222. ----
  2223. .. _class_TextServer_method_shaped_text_tab_align:
  2224. .. rst-class:: classref-method
  2225. :ref:`float<class_float>` **shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
  2226. Aligns shaped text to the given tab-stops.
  2227. .. rst-class:: classref-item-separator
  2228. ----
  2229. .. _class_TextServer_method_spoof_check:
  2230. .. rst-class:: classref-method
  2231. :ref:`bool<class_bool>` **spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2232. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2233. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2234. .. rst-class:: classref-item-separator
  2235. ----
  2236. .. _class_TextServer_method_string_get_character_breaks:
  2237. .. rst-class:: classref-method
  2238. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2239. Returns array of the composite character boundaries.
  2240. ::
  2241. var ts = TextServerManager.get_primary_interface()
  2242. print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
  2243. .. rst-class:: classref-item-separator
  2244. ----
  2245. .. _class_TextServer_method_string_get_word_breaks:
  2246. .. rst-class:: classref-method
  2247. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const|
  2248. 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.
  2249. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2250. ::
  2251. var ts = TextServerManager.get_primary_interface()
  2252. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2253. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2254. .. rst-class:: classref-item-separator
  2255. ----
  2256. .. _class_TextServer_method_string_to_lower:
  2257. .. rst-class:: classref-method
  2258. :ref:`String<class_String>` **string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2259. Returns the string converted to lowercase.
  2260. \ **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>`).
  2261. \ **Note:** The result may be longer or shorter than the original.
  2262. .. rst-class:: classref-item-separator
  2263. ----
  2264. .. _class_TextServer_method_string_to_upper:
  2265. .. rst-class:: classref-method
  2266. :ref:`String<class_String>` **string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2267. Returns the string converted to uppercase.
  2268. \ **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>`).
  2269. \ **Note:** The result may be longer or shorter than the original.
  2270. .. rst-class:: classref-item-separator
  2271. ----
  2272. .. _class_TextServer_method_strip_diacritics:
  2273. .. rst-class:: classref-method
  2274. :ref:`String<class_String>` **strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2275. Strips diacritics from the string.
  2276. \ **Note:** The result may be longer or shorter than the original.
  2277. .. rst-class:: classref-item-separator
  2278. ----
  2279. .. _class_TextServer_method_tag_to_name:
  2280. .. rst-class:: classref-method
  2281. :ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const|
  2282. Converts OpenType tag to readable feature, variation, script or language name.
  2283. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2284. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2285. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2286. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2287. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2288. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2289. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2290. .. |void| replace:: :abbr:`void (No return value.)`