12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/TextServer.xml.
- .. _class_TextServer:
- TextServer
- ==========
- **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
- A server interface for font management and text rendering.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **TextServer** is the API backend for managing fonts and rendering text.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>` **(** **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_render_range<class_TextServer_method_font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_descent<class_TextServer_method_font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_scale<class_TextServer_method_font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3i[]<class_Vector3i>` | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
- +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_TextServer_FontAntialiasing:
- .. rst-class:: classref-enumeration
- enum **FontAntialiasing**:
- .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
- Font glyphs are rasterized as 1-bit bitmaps.
- .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
- Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
- .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
- Font glyphs are rasterized for LCD screens.
- LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
- LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_FontLCDSubpixelLayout:
- .. rst-class:: classref-enumeration
- enum **FontLCDSubpixelLayout**:
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
- Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
- Horizontal RGB subpixel layout.
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
- Horizontal BGR subpixel layout.
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
- Vertical RGB subpixel layout.
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
- Vertical BGR subpixel layout.
- .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_Direction:
- .. rst-class:: classref-enumeration
- enum **Direction**:
- .. _class_TextServer_constant_DIRECTION_AUTO:
- .. rst-class:: classref-enumeration-constant
- :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
- Text direction is determined based on contents and current locale.
- .. _class_TextServer_constant_DIRECTION_LTR:
- .. rst-class:: classref-enumeration-constant
- :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
- Text is written from left to right.
- .. _class_TextServer_constant_DIRECTION_RTL:
- .. rst-class:: classref-enumeration-constant
- :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
- Text is written from right to left.
- .. _class_TextServer_constant_DIRECTION_INHERITED:
- .. rst-class:: classref-enumeration-constant
- :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
- Text writing direction is the same as base string writing direction. Used for BiDi override only.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_Orientation:
- .. rst-class:: classref-enumeration
- enum **Orientation**:
- .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
- .. rst-class:: classref-enumeration-constant
- :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
- Text is written horizontally.
- .. _class_TextServer_constant_ORIENTATION_VERTICAL:
- .. rst-class:: classref-enumeration-constant
- :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
- Left to right text is written vertically from top to bottom.
- Right to left text is written vertically from bottom to top.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_JustificationFlag:
- .. rst-class:: classref-enumeration
- flags **JustificationFlag**:
- .. _class_TextServer_constant_JUSTIFICATION_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
- Do not justify text.
- .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
- Justify text by adding and removing kashidas.
- .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
- Justify text by changing width of the spaces between the words.
- .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
- Remove trailing and leading spaces from the justified text.
- .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
- Only apply justification to the part of the text after the last tab.
- .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
- .. rst-class:: classref-enumeration-constant
- :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
- Apply justification to the trimmed line with ellipsis.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_AutowrapMode:
- .. rst-class:: classref-enumeration
- enum **AutowrapMode**:
- .. _class_TextServer_constant_AUTOWRAP_OFF:
- .. rst-class:: classref-enumeration-constant
- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
- Autowrap is disabled.
- .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
- .. rst-class:: classref-enumeration-constant
- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- .. _class_TextServer_constant_AUTOWRAP_WORD:
- .. rst-class:: classref-enumeration-constant
- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
- .. rst-class:: classref-enumeration-constant
- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
- Behaves similarly to :ref:`AUTOWRAP_WORD<class_TextServer_constant_AUTOWRAP_WORD>`, but force-breaks a word if that single word does not fit in one line.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_LineBreakFlag:
- .. rst-class:: classref-enumeration
- flags **LineBreakFlag**:
- .. _class_TextServer_constant_BREAK_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
- Do not break the line.
- .. _class_TextServer_constant_BREAK_MANDATORY:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
- Break the line at the line mandatory break characters (e.g. ``"\n"``).
- .. _class_TextServer_constant_BREAK_WORD_BOUND:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
- Break the line between the words.
- .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
- Break the line between any unconnected graphemes.
- .. _class_TextServer_constant_BREAK_ADAPTIVE:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
- 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.
- .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
- .. rst-class:: classref-enumeration-constant
- :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
- Remove edge spaces from the broken line segments.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_VisibleCharactersBehavior:
- .. rst-class:: classref-enumeration
- enum **VisibleCharactersBehavior**:
- .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
- Trims text before the shaping. e.g, increasing :ref:`Label.visible_characters<class_Label_property_visible_characters>` or :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` value is visually identical to typing the text.
- .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
- Displays glyphs that are mapped to the first :ref:`Label.visible_characters<class_Label_property_visible_characters>` or :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` characters from the beginning of the text.
- .. _class_TextServer_constant_VC_GLYPHS_AUTO:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
- 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.
- .. _class_TextServer_constant_VC_GLYPHS_LTR:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
- 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.
- .. _class_TextServer_constant_VC_GLYPHS_RTL:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_OverrunBehavior:
- .. rst-class:: classref-enumeration
- enum **OverrunBehavior**:
- .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
- .. rst-class:: classref-enumeration-constant
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
- No text trimming is performed.
- .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
- .. rst-class:: classref-enumeration-constant
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
- Trims the text per character.
- .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
- .. rst-class:: classref-enumeration-constant
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
- Trims the text per word.
- .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
- .. rst-class:: classref-enumeration-constant
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
- .. rst-class:: classref-enumeration-constant
- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_TextOverrunFlag:
- .. rst-class:: classref-enumeration
- flags **TextOverrunFlag**:
- .. _class_TextServer_constant_OVERRUN_NO_TRIM:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
- No trimming is performed.
- .. _class_TextServer_constant_OVERRUN_TRIM:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
- Trims the text when it exceeds the given width.
- .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
- Trims the text per word instead of per grapheme.
- .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
- Determines whether an ellipsis should be added at the end of the text.
- .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
- Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
- .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_GraphemeFlag:
- .. rst-class:: classref-enumeration
- flags **GraphemeFlag**:
- .. _class_TextServer_constant_GRAPHEME_IS_VALID:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
- Grapheme is supported by the font, and can be drawn.
- .. _class_TextServer_constant_GRAPHEME_IS_RTL:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
- Grapheme is part of right-to-left or bottom-to-top run.
- .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
- Grapheme is not part of source text, it was added by justification process.
- .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
- Grapheme is whitespace.
- .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
- Grapheme is mandatory break point (e.g. ``"\n"``).
- .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
- Grapheme is optional break point (e.g. space).
- .. _class_TextServer_constant_GRAPHEME_IS_TAB:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
- Grapheme is the tabulation character.
- .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
- Grapheme is kashida.
- .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
- Grapheme is punctuation character.
- .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
- Grapheme is underscore character.
- .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
- Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
- .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
- It is safe to insert a U+0640 before this grapheme for elongation.
- .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
- .. rst-class:: classref-enumeration-constant
- :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
- Grapheme is an object replacement character for the embedded object.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_Hinting:
- .. rst-class:: classref-enumeration
- enum **Hinting**:
- .. _class_TextServer_constant_HINTING_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
- Disables font hinting (smoother but less crisp).
- .. _class_TextServer_constant_HINTING_LIGHT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
- Use the light font hinting mode.
- .. _class_TextServer_constant_HINTING_NORMAL:
- .. rst-class:: classref-enumeration-constant
- :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
- Use the default font hinting mode (crisper but less smooth).
- \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_SubpixelPositioning:
- .. rst-class:: classref-enumeration
- enum **SubpixelPositioning**:
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
- Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
- Glyph horizontal position is rounded based on font size.
- - 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>`.
- - 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>`.
- - To the whole pixel size for larger fonts.
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
- Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
- Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
- Maximum font size which will use one half of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` mode.
- .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
- Maximum font size which will use one quarter of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` mode.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_Feature:
- .. rst-class:: classref-enumeration
- enum **Feature**:
- .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
- TextServer supports simple text layouts.
- .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
- TextServer supports bidirectional text layouts.
- .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
- TextServer supports vertical layouts.
- .. _class_TextServer_constant_FEATURE_SHAPING:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
- TextServer supports complex text shaping.
- .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
- TextServer supports justification using kashidas.
- .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
- TextServer supports complex line/word breaking rules (e.g. dictionary based).
- .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
- TextServer supports loading bitmap fonts.
- .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
- TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
- .. _class_TextServer_constant_FEATURE_FONT_MSDF:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
- TextServer supports multichannel signed distance field dynamic font rendering.
- .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
- TextServer supports loading system fonts.
- .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
- TextServer supports variable fonts.
- .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
- TextServer supports locale dependent and context sensitive case conversion.
- .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
- TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
- .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
- TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
- .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
- .. rst-class:: classref-enumeration-constant
- :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_ContourPointTag:
- .. rst-class:: classref-enumeration
- enum **ContourPointTag**:
- .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
- .. rst-class:: classref-enumeration-constant
- :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
- Contour point is on the curve.
- .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
- Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
- .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
- Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_SpacingType:
- .. rst-class:: classref-enumeration
- enum **SpacingType**:
- .. _class_TextServer_constant_SPACING_GLYPH:
- .. rst-class:: classref-enumeration-constant
- :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
- Spacing for each glyph.
- .. _class_TextServer_constant_SPACING_SPACE:
- .. rst-class:: classref-enumeration-constant
- :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
- Spacing for the space character.
- .. _class_TextServer_constant_SPACING_TOP:
- .. rst-class:: classref-enumeration-constant
- :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
- Spacing at the top of the line.
- .. _class_TextServer_constant_SPACING_BOTTOM:
- .. rst-class:: classref-enumeration-constant
- :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
- Spacing at the bottom of the line.
- .. _class_TextServer_constant_SPACING_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_FontStyle:
- .. rst-class:: classref-enumeration
- flags **FontStyle**:
- .. _class_TextServer_constant_FONT_BOLD:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
- Font is bold.
- .. _class_TextServer_constant_FONT_ITALIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
- Font is italic or oblique.
- .. _class_TextServer_constant_FONT_FIXED_WIDTH:
- .. rst-class:: classref-enumeration-constant
- :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
- Font have fixed-width characters.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_TextServer_StructuredTextParser:
- .. rst-class:: classref-enumeration
- enum **StructuredTextParser**:
- .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
- Use default Unicode BiDi algorithm.
- .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
- BiDi override for URI.
- .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
- BiDi override for file path.
- .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
- BiDi override for email.
- .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
- BiDi override for lists.
- Structured text options: list separator ``String``.
- .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
- BiDi override for GDScript.
- .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
- .. rst-class:: classref-enumeration-constant
- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
- User defined structured text BiDi override function.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_TextServer_method_create_font:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **create_font** **(** **)**
- Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_create_shaped_text:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
- 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.
- \ **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>`).
- \ **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>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_draw_hex_code_box:
- .. rst-class:: classref-method
- void **draw_hex_code_box** **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const|
- Draws box displaying character hexadecimal code. Used for replacing missing characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_clear_glyphs:
- .. rst-class:: classref-method
- void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
- Removes all rendered glyphs information from the cache entry.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_clear_kerning_map:
- .. rst-class:: classref-method
- void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
- Removes all kerning overrides.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_clear_size_cache:
- .. rst-class:: classref-method
- void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
- Removes all font sizes from the cache entry.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_clear_textures:
- .. rst-class:: classref-method
- void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
- Removes all textures from font cache entry.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_draw_glyph:
- .. rst-class:: classref-method
- void **font_draw_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
- Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
- \ **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>`.
- \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_draw_glyph_outline:
- .. rst-class:: classref-method
- void **font_draw_glyph_outline** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
- Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
- \ **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>`.
- \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_antialiasing:
- .. rst-class:: classref-method
- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font anti-aliasing mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_ascent:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns the font ascent (number of pixels above the baseline).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_descent:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns the font descent (number of pixels below the baseline).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_embolden:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font embolden strength.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_face_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns number of faces in the TrueType / OpenType collection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_face_index:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Recturns an active face index in the TrueType / OpenType collection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_fixed_size:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns bitmap font fixed size.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_generate_mipmaps:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns ``true`` if font texture mipmap generation is enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_global_oversampling:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
- Returns the font oversampling factor, shared by all fonts in the TextServer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_advance:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **font_get_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns glyph advance (offset of the next glyph).
- \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_contours:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
- Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
- \ ``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.
- \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
- \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_index:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const|
- Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_list:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
- Returns list of rendered glyphs in the cache entry.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_offset:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **font_get_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns glyph offset from the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_size:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **font_get_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns size of the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_texture_idx:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns index of the cache texture containing the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_texture_rid:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **font_get_glyph_texture_rid** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns resource ID of the cache texture containing the glyph.
- \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_texture_size:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns size of the cache texture containing the glyph.
- \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_glyph_uv_rect:
- .. rst-class:: classref-method
- :ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
- Returns rectangle in the cache texture containing the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_hinting:
- .. rst-class:: classref-method
- :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns the font hinting mode. Used by dynamic fonts only.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_kerning:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **font_get_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const|
- Returns kerning for the pair of glyphs.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_kerning_list:
- .. rst-class:: classref-method
- :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns list of the kerning overrides.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_language_support_override:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
- Returns ``true`` if support override is enabled for the ``language``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_language_support_overrides:
- .. rst-class:: classref-method
- :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
- Returns list of language support overrides.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_msdf_pixel_range:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns the width of the range around the shape between the minimum and maximum representable signed distance.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_msdf_size:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns source font size used to generate MSDF textures.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_name:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font family name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_opentype_feature_overrides:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font OpenType feature set override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_oversampling:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_scale:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns scaling factor of the color bitmap font.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_script_support_override:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
- Returns ``true`` if support override is enabled for the ``script``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_script_support_overrides:
- .. rst-class:: classref-method
- :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
- Returns list of script support overrides.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_size_cache_list:
- .. rst-class:: classref-method
- :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_stretch:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_style:
- .. rst-class:: classref-method
- :ref:`FontStyle<enum_TextServer_FontStyle>` **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_style_name:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font style name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_subpixel_positioning:
- .. rst-class:: classref-method
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns font subpixel glyph positioning mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_supported_chars:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns a string containing all the characters available in the font.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_texture_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
- Returns number of textures used by font cache entry.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_texture_image:
- .. rst-class:: classref-method
- :ref:`Image<class_Image>` **font_get_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
- Returns font cache texture image data.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_texture_offsets:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
- Returns array containing glyph packing data.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_transform:
- .. rst-class:: classref-method
- :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns 2D transform applied to the font outlines.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_underline_position:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns pixel offset of the underline below the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_underline_thickness:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
- Returns thickness of the underline in pixels.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_variation_coordinates:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_get_weight:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_has_char:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
- Returns ``true`` if a Unicode ``char`` is available in the font.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_is_allow_system_fallback:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns ``true`` if system fonts can be automatically used as fallbacks.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_is_force_autohinter:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_is_language_supported:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
- Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_is_script_supported:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
- Returns ``true``, if font supports given script (ISO 15924 code).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_glyph:
- .. rst-class:: classref-method
- void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
- Removes specified rendered glyph information from the cache entry.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_kerning:
- .. rst-class:: classref-method
- void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
- Removes kerning override for the pair of glyphs.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_language_support_override:
- .. rst-class:: classref-method
- void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
- Remove language support override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_script_support_override:
- .. rst-class:: classref-method
- void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
- Removes script support override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_size_cache:
- .. rst-class:: classref-method
- void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
- Removes specified font size from the cache entry.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_remove_texture:
- .. rst-class:: classref-method
- void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
- Removes specified texture from the cache entry.
- \ **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>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_render_glyph:
- .. rst-class:: classref-method
- void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
- Renders specified glyph to the font cache texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_render_range:
- .. rst-class:: classref-method
- void **font_render_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)**
- Renders the range of characters to the font cache texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_allow_system_fallback:
- .. rst-class:: classref-method
- void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
- If set to ``true``, system fonts can be automatically used as fallbacks.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_antialiasing:
- .. rst-class:: classref-method
- void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
- Sets font anti-aliasing mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_ascent:
- .. rst-class:: classref-method
- void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
- Sets the font ascent (number of pixels above the baseline).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_data:
- .. rst-class:: classref-method
- void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
- Sets font source data, e.g contents of the dynamic font source file.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_descent:
- .. rst-class:: classref-method
- void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
- Sets the font descent (number of pixels below the baseline).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_embolden:
- .. rst-class:: classref-method
- void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
- Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_face_index:
- .. rst-class:: classref-method
- void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
- Sets an active face index in the TrueType / OpenType collection.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_fixed_size:
- .. rst-class:: classref-method
- void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
- Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_force_autohinter:
- .. rst-class:: classref-method
- void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
- If set to ``true`` auto-hinting is preferred over font built-in hinting.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_generate_mipmaps:
- .. rst-class:: classref-method
- void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
- If set to ``true`` font texture mipmap generation is enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_global_oversampling:
- .. rst-class:: classref-method
- void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
- Sets oversampling factor, shared by all font in the TextServer.
- \ **Note:** This value can be automatically changed by display server.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_glyph_advance:
- .. rst-class:: classref-method
- void **font_set_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)**
- Sets glyph advance (offset of the next glyph).
- \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_glyph_offset:
- .. rst-class:: classref-method
- void **font_set_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)**
- Sets glyph offset from the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_glyph_size:
- .. rst-class:: classref-method
- void **font_set_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)**
- Sets size of the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_glyph_texture_idx:
- .. rst-class:: classref-method
- void **font_set_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)**
- Sets index of the cache texture containing the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_glyph_uv_rect:
- .. rst-class:: classref-method
- void **font_set_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)**
- Sets rectangle in the cache texture containing the glyph.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_hinting:
- .. rst-class:: classref-method
- void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
- Sets font hinting mode. Used by dynamic fonts only.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_kerning:
- .. rst-class:: classref-method
- void **font_set_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)**
- Sets kerning for the pair of glyphs.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_language_support_override:
- .. rst-class:: classref-method
- void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
- Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_msdf_pixel_range:
- .. rst-class:: classref-method
- void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
- Sets the width of the range around the shape between the minimum and maximum representable signed distance.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_msdf_size:
- .. rst-class:: classref-method
- void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
- Sets source font size used to generate MSDF textures.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
- .. rst-class:: classref-method
- void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
- 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.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_name:
- .. rst-class:: classref-method
- void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
- Sets the font family name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_opentype_feature_overrides:
- .. rst-class:: classref-method
- void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
- Sets font OpenType feature set override.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_oversampling:
- .. rst-class:: classref-method
- void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
- Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_scale:
- .. rst-class:: classref-method
- void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
- Sets scaling factor of the color bitmap font.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_script_support_override:
- .. rst-class:: classref-method
- void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
- Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_stretch:
- .. rst-class:: classref-method
- void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
- Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_style:
- .. rst-class:: classref-method
- void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)**
- Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_style_name:
- .. rst-class:: classref-method
- void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
- Sets the font style name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_subpixel_positioning:
- .. rst-class:: classref-method
- void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
- Sets font subpixel glyph positioning mode.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_texture_image:
- .. rst-class:: classref-method
- void **font_set_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)**
- Sets font cache texture image data.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_texture_offsets:
- .. rst-class:: classref-method
- void **font_set_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)**
- Sets array containing glyph packing data.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_transform:
- .. rst-class:: classref-method
- void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
- Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
- For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_underline_position:
- .. rst-class:: classref-method
- void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
- Sets pixel offset of the underline below the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_underline_thickness:
- .. rst-class:: classref-method
- void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
- Sets thickness of the underline in pixels.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_variation_coordinates:
- .. rst-class:: classref-method
- void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_set_weight:
- .. rst-class:: classref-method
- void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
- Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_supported_feature_list:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns the dictionary of the supported OpenType features.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_font_supported_variation_list:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
- Returns the dictionary of the supported OpenType variation coordinates.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_format_number:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
- Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
- If ``language`` is omitted, the active locale will be used.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_free_rid:
- .. rst-class:: classref-method
- void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
- Frees an object created by this **TextServer**.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_get_features:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_features** **(** **)** |const|
- Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_get_hex_code_box_size:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
- Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_get_name:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_name** **(** **)** |const|
- Returns the name of the server interface.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_get_support_data_filename:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
- Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_get_support_data_info:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
- Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_has:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
- Returns ``true`` if ``rid`` is valid resource owned by this text server.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_has_feature:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
- Returns ``true`` if the server supports a feature.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_is_confusable:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
- Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
- \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
- \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_is_locale_right_to_left:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
- Returns ``true`` if locale is right-to-left.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_is_valid_identifier:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
- Returns ``true`` if ``string`` is a valid identifier.
- If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
- - Conform to normalization form C.
- - Begin with a Unicode character of class XID_Start or ``"_"``.
- - May contain Unicode characters of class XID_Continue in the other positions.
- - Use UAX #31 recommended scripts only (mixed scripts are allowed).
- If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
- - Begin with a Unicode character of class XID_Start or ``"_"``.
- - May contain Unicode characters of class XID_Continue in the other positions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_load_support_data:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
- Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
- \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_name_to_tag:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
- Converts readable feature, variation, script or language name to OpenType tag.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_parse_number:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
- Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_parse_structured_text:
- .. rst-class:: classref-method
- :ref:`Vector3i[]<class_Vector3i>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const|
- Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_percent_sign:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
- Returns percent sign used in the ``language``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_save_support_data:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
- Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
- \ **Note:** This function is used by during project export, to include TextServer database.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_get_span_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
- 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>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_get_span_meta:
- .. rst-class:: classref-method
- :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
- Returns text span metadata.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_set_span_update_font:
- .. rst-class:: classref-method
- void **shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)**
- Changes text span font, font size and OpenType features, without changing the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_add_object:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_add_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)**
- Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_add_string:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)**
- Adds text span and font to draw it to the text buffer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_clear:
- .. rst-class:: classref-method
- void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
- Clears text buffer (removes text and inline objects).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_draw:
- .. rst-class:: classref-method
- void **shaped_text_draw** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
- 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).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_draw_outline:
- .. rst-class:: classref-method
- void **shaped_text_draw_outline** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
- 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).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_fit_to_width:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` jst_flags=3 **)**
- Adjusts text width to fit to specified width, returns new text width.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_ascent:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
- \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_carets:
- .. rst-class:: classref-method
- :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
- Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_custom_punctuation:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_descent:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
- \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_direction:
- .. rst-class:: classref-method
- :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns direction of the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
- .. rst-class:: classref-method
- :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
- Returns dominant direction of in the range of text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns number of glyphs in the ellipsis.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
- .. rst-class:: classref-method
- :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns array of the glyphs in the ellipsis.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns position of the ellipsis.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_glyph_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns number of glyphs in the buffer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_glyphs:
- .. rst-class:: classref-method
- :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns an array of glyphs in the visual order.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
- Returns composite character's bounds as offsets from the start of the line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_inferred_direction:
- .. rst-class:: classref-method
- :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns direction of the text, inferred by the BiDi algorithm.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_line_breaks:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
- Breaks text to the lines and returns character ranges for each line.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
- Breaks text to the lines and columns. Returns character ranges for each segment.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_object_rect:
- .. rst-class:: classref-method
- :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
- Returns bounding rectangle of the inline object.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_objects:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns array of inline objects.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_orientation:
- .. rst-class:: classref-method
- :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns text orientation.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_parent:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns the parent buffer from which the substring originates.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_preserve_control:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns ``true`` if text buffer is configured to display control characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_preserve_invalid:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
- \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_range:
- .. rst-class:: classref-method
- :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns substring buffer character range in the parent buffer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_selection:
- .. rst-class:: classref-method
- :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
- Returns selection rectangles for the specified character range.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_size:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns size of the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_spacing:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
- Returns extra spacing added between glyphs or lines in pixels.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_trim_pos:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns the position of the overrun trim.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_underline_position:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns pixel offset of the underline below the baseline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_underline_thickness:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns thickness of the underline.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_width:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns width (for horizontal layout) or height (for vertical) of the text.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_get_word_breaks:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const|
- 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>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_hit_test_grapheme:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
- Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_hit_test_position:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
- Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_is_ready:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
- Returns ``true`` if buffer is successfully shaped.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_next_grapheme_pos:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
- Returns composite character end position closest to the ``pos``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
- .. rst-class:: classref-method
- void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)**
- Trims text if it exceeds the given width.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
- Returns composite character start position closest to the ``pos``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_resize_object:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_resize_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)**
- Sets new size and alignment of embedded object.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_bidi_override:
- .. rst-class:: classref-method
- void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
- Overrides BiDi for the structured text.
- Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_custom_punctuation:
- .. rst-class:: classref-method
- void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
- Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_direction:
- .. rst-class:: classref-method
- void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
- 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.
- \ **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>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_orientation:
- .. rst-class:: classref-method
- void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
- Sets desired text orientation.
- \ **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>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_preserve_control:
- .. rst-class:: classref-method
- void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
- If set to ``true`` text buffer will display control characters.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_preserve_invalid:
- .. rst-class:: classref-method
- void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
- If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_set_spacing:
- .. rst-class:: classref-method
- void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
- Sets extra spacing added between glyphs or lines in pixels.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_shape:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
- Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
- \ **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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_sort_logical:
- .. rst-class:: classref-method
- :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
- Returns text glyphs in the logical order.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_substr:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
- Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_shaped_text_tab_align:
- .. rst-class:: classref-method
- :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
- Aligns shaped text to the given tab-stops.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_spoof_check:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
- Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
- \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_string_get_word_breaks:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const|
- 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.
- When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
- ::
- var ts = TextServerManager.get_primary_interface()
- print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
- print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_string_to_lower:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
- Returns the string converted to lowercase.
- \ **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>`).
- \ **Note:** The result may be longer or shorter than the original.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_string_to_upper:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
- Returns the string converted to uppercase.
- \ **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>`).
- \ **Note:** The result may be longer or shorter than the original.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_strip_diacritics:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
- Strips diacritics from the string.
- \ **Note:** The result may be longer or shorter than the original.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextServer_method_tag_to_name:
- .. rst-class:: classref-method
- :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
- Converts OpenType tag to readable feature, variation, script or language name.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|