class_textserver.rst 307 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServer.xml.
  6. .. _class_TextServer:
  7. TextServer
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`TextServerExtension<class_TextServerExtension>`
  11. A server interface for font management and text rendering.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **TextServer** is the API backend for managing fonts and rendering text.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>`\ (\ ) |
  23. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`RID<class_RID>` | :ref:`create_font_linked_variation<class_TextServer_method_create_font_linked_variation>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  25. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>`\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
  27. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | |void| | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>`\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| |
  29. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | |void| | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  31. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | |void| | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |
  33. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  35. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  37. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  39. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  41. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  43. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  45. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`font_get_baseline_offset<class_TextServer_method_font_get_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  47. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| |
  49. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  51. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`bool<class_bool>` | :ref:`font_get_disable_embedded_bitmaps<class_TextServer_method_font_get_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  53. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  55. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  57. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  59. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  61. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`font_get_fixed_size_scale_mode<class_TextServer_method_font_get_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  63. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  65. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>`\ (\ ) |const| |
  67. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  69. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>`\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
  71. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| |
  73. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  75. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  77. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  79. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  81. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  83. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  85. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
  87. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  89. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  91. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  93. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
  95. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  97. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  99. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  101. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  103. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  105. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  107. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  109. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  111. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
  113. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
  115. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  117. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
  119. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  121. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_get_style<class_TextServer_method_font_get_style>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  123. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  125. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  127. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  129. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
  131. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
  133. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
  135. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  137. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  139. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
  141. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  143. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  145. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>`\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| |
  147. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  149. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  151. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| |
  153. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  155. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| |
  157. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | |void| | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |
  159. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |
  161. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
  163. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |void| | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
  165. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |void| | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  167. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |void| | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |
  169. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |void| | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |
  171. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |void| | :ref:`font_render_range<class_TextServer_method_font_render_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |
  173. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |void| | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) |
  175. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |void| | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) |
  177. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |void| | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |
  179. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | |void| | :ref:`font_set_baseline_offset<class_TextServer_method_font_set_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) |
  181. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | |void| | :ref:`font_set_data<class_TextServer_method_font_set_data>`\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  183. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | |void| | :ref:`font_set_descent<class_TextServer_method_font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |
  185. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | |void| | :ref:`font_set_disable_embedded_bitmaps<class_TextServer_method_font_set_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) |
  187. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | |void| | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |
  189. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | |void| | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |
  191. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | |void| | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) |
  193. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | |void| | :ref:`font_set_fixed_size_scale_mode<class_TextServer_method_font_set_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) |
  195. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | |void| | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |
  197. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | |void| | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) |
  199. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | |void| | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>`\ (\ oversampling\: :ref:`float<class_float>`\ ) |
  201. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | |void| | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |
  203. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | |void| | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |
  205. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | |void| | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |
  207. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | |void| | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |
  209. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | |void| | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |
  211. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | |void| | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) |
  213. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |
  215. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | |void| | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
  217. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | |void| | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) |
  219. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | |void| | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) |
  221. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) |
  223. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | |void| | :ref:`font_set_name<class_TextServer_method_font_set_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
  225. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | |void| | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) |
  227. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | |void| | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) |
  229. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | |void| | :ref:`font_set_scale<class_TextServer_method_font_set_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |
  231. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | |void| | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
  233. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | |void| | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
  235. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | |void| | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
  237. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | |void| | :ref:`font_set_style<class_TextServer_method_font_set_style>`\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) |
  239. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | |void| | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
  241. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | |void| | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) |
  243. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | |void| | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |
  245. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | |void| | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
  247. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | |void| | :ref:`font_set_transform<class_TextServer_method_font_set_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |
  249. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | |void| | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |
  251. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | |void| | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |
  253. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | |void| | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |
  255. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | |void| | :ref:`font_set_weight<class_TextServer_method_font_set_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
  257. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  259. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
  261. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  263. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | |void| | :ref:`free_rid<class_TextServer_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  265. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>`\ (\ ) |const| |
  267. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>`\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
  269. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>`\ (\ ) |const| |
  271. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>`\ (\ ) |const| |
  273. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>`\ (\ ) |const| |
  275. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  277. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| |
  279. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>`\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| |
  281. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| |
  283. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  285. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  287. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
  289. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  291. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>`\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| |
  293. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>`\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| |
  295. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |const| |
  297. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  299. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
  301. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | |void| | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |
  303. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) |
  305. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>`\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) |
  307. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | |void| | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  309. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  311. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | |void| | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  313. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | |void| | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| |
  315. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) |
  317. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  319. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>`\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| |
  321. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  323. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  325. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  327. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  329. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  331. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
  333. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  335. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  337. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  339. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  341. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  343. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  345. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  347. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
  349. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
  351. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`int<class_int>` | :ref:`shaped_text_get_object_glyph<class_TextServer_method_shaped_text_get_object_glyph>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
  353. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_object_range<class_TextServer_method_shaped_text_get_object_range>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
  355. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
  357. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  359. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  361. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  363. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  365. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  367. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  369. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
  371. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  373. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
  375. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  377. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  379. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  381. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  383. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264\ ) |const| |
  385. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  387. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
  389. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
  391. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  393. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  395. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  397. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | |void| | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) |
  399. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  401. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
  403. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) |
  405. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | |void| | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>`\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) |
  407. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. | |void| | :ref:`shaped_text_set_custom_ellipsis<class_TextServer_method_shaped_text_set_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |
  409. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  410. | |void| | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) |
  411. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  412. | |void| | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) |
  413. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  414. | |void| | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
  415. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  416. | |void| | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
  417. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  418. | |void| | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
  419. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  420. | |void| | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
  421. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  422. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
  423. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  424. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
  425. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  426. | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| |
  427. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  428. | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>`\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |
  429. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  430. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  431. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  432. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  433. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  434. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| |
  435. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  436. | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  437. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  438. | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  439. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  440. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  441. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  442. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |const| |
  443. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  444. .. rst-class:: classref-section-separator
  445. ----
  446. .. rst-class:: classref-descriptions-group
  447. Enumerations
  448. ------------
  449. .. _enum_TextServer_FontAntialiasing:
  450. .. rst-class:: classref-enumeration
  451. enum **FontAntialiasing**:
  452. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  455. Font glyphs are rasterized as 1-bit bitmaps.
  456. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  459. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  460. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  461. .. rst-class:: classref-enumeration-constant
  462. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  463. Font glyphs are rasterized for LCD screens.
  464. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  465. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  466. .. rst-class:: classref-item-separator
  467. ----
  468. .. _enum_TextServer_FontLCDSubpixelLayout:
  469. .. rst-class:: classref-enumeration
  470. enum **FontLCDSubpixelLayout**:
  471. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  474. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  475. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  478. Horizontal RGB subpixel layout.
  479. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  482. Horizontal BGR subpixel layout.
  483. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  486. Vertical RGB subpixel layout.
  487. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  490. Vertical BGR subpixel layout.
  491. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  494. Represents the size of the :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` enum.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _enum_TextServer_Direction:
  498. .. rst-class:: classref-enumeration
  499. enum **Direction**:
  500. .. _class_TextServer_constant_DIRECTION_AUTO:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  503. Text direction is determined based on contents and current locale.
  504. .. _class_TextServer_constant_DIRECTION_LTR:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  507. Text is written from left to right.
  508. .. _class_TextServer_constant_DIRECTION_RTL:
  509. .. rst-class:: classref-enumeration-constant
  510. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  511. Text is written from right to left.
  512. .. _class_TextServer_constant_DIRECTION_INHERITED:
  513. .. rst-class:: classref-enumeration-constant
  514. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  515. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  516. .. rst-class:: classref-item-separator
  517. ----
  518. .. _enum_TextServer_Orientation:
  519. .. rst-class:: classref-enumeration
  520. enum **Orientation**:
  521. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  522. .. rst-class:: classref-enumeration-constant
  523. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  524. Text is written horizontally.
  525. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  526. .. rst-class:: classref-enumeration-constant
  527. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  528. Left to right text is written vertically from top to bottom.
  529. Right to left text is written vertically from bottom to top.
  530. .. rst-class:: classref-item-separator
  531. ----
  532. .. _enum_TextServer_JustificationFlag:
  533. .. rst-class:: classref-enumeration
  534. flags **JustificationFlag**:
  535. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  538. Do not justify text.
  539. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  542. Justify text by adding and removing kashidas.
  543. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  546. Justify text by changing width of the spaces between the words.
  547. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  550. Remove trailing and leading spaces from the justified text.
  551. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  554. Only apply justification to the part of the text after the last tab.
  555. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  556. .. rst-class:: classref-enumeration-constant
  557. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  558. Apply justification to the trimmed line with ellipsis.
  559. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  560. .. rst-class:: classref-enumeration-constant
  561. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  562. Do not apply justification to the last line of the paragraph.
  563. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  564. .. rst-class:: classref-enumeration-constant
  565. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  566. Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>`).
  567. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  568. .. rst-class:: classref-enumeration-constant
  569. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  570. Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS>` are ignored).
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _enum_TextServer_AutowrapMode:
  574. .. rst-class:: classref-enumeration
  575. enum **AutowrapMode**:
  576. .. _class_TextServer_constant_AUTOWRAP_OFF:
  577. .. rst-class:: classref-enumeration-constant
  578. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  579. Autowrap is disabled.
  580. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  583. 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.
  584. .. _class_TextServer_constant_AUTOWRAP_WORD:
  585. .. rst-class:: classref-enumeration-constant
  586. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  587. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  588. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  589. .. rst-class:: classref-enumeration-constant
  590. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  591. 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.
  592. .. rst-class:: classref-item-separator
  593. ----
  594. .. _enum_TextServer_LineBreakFlag:
  595. .. rst-class:: classref-enumeration
  596. flags **LineBreakFlag**:
  597. .. _class_TextServer_constant_BREAK_NONE:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  600. Do not break the line.
  601. .. _class_TextServer_constant_BREAK_MANDATORY:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  604. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  605. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  608. Break the line between the words.
  609. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  612. Break the line between any unconnected graphemes.
  613. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  614. .. rst-class:: classref-enumeration-constant
  615. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  616. 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.
  617. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  618. .. rst-class:: classref-enumeration-constant
  619. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  620. Remove edge spaces from the broken line segments.
  621. .. _class_TextServer_constant_BREAK_TRIM_INDENT:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_INDENT** = ``32``
  624. Subtract first line indentation width from all lines after the first one.
  625. .. rst-class:: classref-item-separator
  626. ----
  627. .. _enum_TextServer_VisibleCharactersBehavior:
  628. .. rst-class:: classref-enumeration
  629. enum **VisibleCharactersBehavior**:
  630. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  633. 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.
  634. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  637. 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.
  638. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  641. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction<class_Control_property_layout_direction>` value.
  642. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  643. .. rst-class:: classref-enumeration-constant
  644. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  645. 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.
  646. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  647. .. rst-class:: classref-enumeration-constant
  648. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  649. 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.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _enum_TextServer_OverrunBehavior:
  653. .. rst-class:: classref-enumeration
  654. enum **OverrunBehavior**:
  655. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  656. .. rst-class:: classref-enumeration-constant
  657. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  658. No text trimming is performed.
  659. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  662. Trims the text per character.
  663. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  664. .. rst-class:: classref-enumeration-constant
  665. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  666. Trims the text per word.
  667. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  668. .. rst-class:: classref-enumeration-constant
  669. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  670. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  671. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  672. .. rst-class:: classref-enumeration-constant
  673. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  674. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  675. .. rst-class:: classref-item-separator
  676. ----
  677. .. _enum_TextServer_TextOverrunFlag:
  678. .. rst-class:: classref-enumeration
  679. flags **TextOverrunFlag**:
  680. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  681. .. rst-class:: classref-enumeration-constant
  682. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  683. No trimming is performed.
  684. .. _class_TextServer_constant_OVERRUN_TRIM:
  685. .. rst-class:: classref-enumeration-constant
  686. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  687. Trims the text when it exceeds the given width.
  688. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  691. Trims the text per word instead of per grapheme.
  692. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  693. .. rst-class:: classref-enumeration-constant
  694. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  695. Determines whether an ellipsis should be added at the end of the text.
  696. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  697. .. rst-class:: classref-enumeration-constant
  698. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  699. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  700. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  701. .. rst-class:: classref-enumeration-constant
  702. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  703. Accounts for the text being justified before attempting to trim it (see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`).
  704. .. rst-class:: classref-item-separator
  705. ----
  706. .. _enum_TextServer_GraphemeFlag:
  707. .. rst-class:: classref-enumeration
  708. flags **GraphemeFlag**:
  709. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  712. Grapheme is supported by the font, and can be drawn.
  713. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  716. Grapheme is part of right-to-left or bottom-to-top run.
  717. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  720. Grapheme is not part of source text, it was added by justification process.
  721. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  724. Grapheme is whitespace.
  725. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  728. Grapheme is mandatory break point (e.g. ``"\n"``).
  729. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  732. Grapheme is optional break point (e.g. space).
  733. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  734. .. rst-class:: classref-enumeration-constant
  735. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  736. Grapheme is the tabulation character.
  737. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  740. Grapheme is kashida.
  741. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  742. .. rst-class:: classref-enumeration-constant
  743. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  744. Grapheme is punctuation character.
  745. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  748. Grapheme is underscore character.
  749. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  750. .. rst-class:: classref-enumeration-constant
  751. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  752. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  753. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  754. .. rst-class:: classref-enumeration-constant
  755. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  756. It is safe to insert a U+0640 before this grapheme for elongation.
  757. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  758. .. rst-class:: classref-enumeration-constant
  759. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  760. Grapheme is an object replacement character for the embedded object.
  761. .. _class_TextServer_constant_GRAPHEME_IS_SOFT_HYPHEN:
  762. .. rst-class:: classref-enumeration-constant
  763. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SOFT_HYPHEN** = ``8192``
  764. Grapheme is a soft hyphen.
  765. .. rst-class:: classref-item-separator
  766. ----
  767. .. _enum_TextServer_Hinting:
  768. .. rst-class:: classref-enumeration
  769. enum **Hinting**:
  770. .. _class_TextServer_constant_HINTING_NONE:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  773. Disables font hinting (smoother but less crisp).
  774. .. _class_TextServer_constant_HINTING_LIGHT:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  777. Use the light font hinting mode.
  778. .. _class_TextServer_constant_HINTING_NORMAL:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  781. Use the default font hinting mode (crisper but less smooth).
  782. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  783. .. rst-class:: classref-item-separator
  784. ----
  785. .. _enum_TextServer_SubpixelPositioning:
  786. .. rst-class:: classref-enumeration
  787. enum **SubpixelPositioning**:
  788. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  789. .. rst-class:: classref-enumeration-constant
  790. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  791. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  792. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  795. Glyph horizontal position is rounded based on font size.
  796. - 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>`.
  797. - 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>`.
  798. - To the whole pixel size for larger fonts.
  799. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  800. .. rst-class:: classref-enumeration-constant
  801. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  802. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  803. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  804. .. rst-class:: classref-enumeration-constant
  805. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  806. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  807. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  808. .. rst-class:: classref-enumeration-constant
  809. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  810. 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.
  811. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  812. .. rst-class:: classref-enumeration-constant
  813. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  814. 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.
  815. .. rst-class:: classref-item-separator
  816. ----
  817. .. _enum_TextServer_Feature:
  818. .. rst-class:: classref-enumeration
  819. enum **Feature**:
  820. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  821. .. rst-class:: classref-enumeration-constant
  822. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  823. TextServer supports simple text layouts.
  824. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  827. TextServer supports bidirectional text layouts.
  828. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  831. TextServer supports vertical layouts.
  832. .. _class_TextServer_constant_FEATURE_SHAPING:
  833. .. rst-class:: classref-enumeration-constant
  834. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  835. TextServer supports complex text shaping.
  836. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  839. TextServer supports justification using kashidas.
  840. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  841. .. rst-class:: classref-enumeration-constant
  842. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  843. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  844. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  845. .. rst-class:: classref-enumeration-constant
  846. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  847. TextServer supports loading bitmap fonts.
  848. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  849. .. rst-class:: classref-enumeration-constant
  850. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  851. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  852. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  853. .. rst-class:: classref-enumeration-constant
  854. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  855. TextServer supports multichannel signed distance field dynamic font rendering.
  856. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  857. .. rst-class:: classref-enumeration-constant
  858. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  859. TextServer supports loading system fonts.
  860. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  863. TextServer supports variable fonts.
  864. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  865. .. rst-class:: classref-enumeration-constant
  866. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  867. TextServer supports locale dependent and context sensitive case conversion.
  868. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  869. .. rst-class:: classref-enumeration-constant
  870. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  871. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  872. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  873. .. rst-class:: classref-enumeration-constant
  874. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  875. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  876. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  877. .. rst-class:: classref-enumeration-constant
  878. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  879. 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.
  880. .. rst-class:: classref-item-separator
  881. ----
  882. .. _enum_TextServer_ContourPointTag:
  883. .. rst-class:: classref-enumeration
  884. enum **ContourPointTag**:
  885. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  886. .. rst-class:: classref-enumeration-constant
  887. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  888. Contour point is on the curve.
  889. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  890. .. rst-class:: classref-enumeration-constant
  891. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  892. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  893. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  894. .. rst-class:: classref-enumeration-constant
  895. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  896. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  897. .. rst-class:: classref-item-separator
  898. ----
  899. .. _enum_TextServer_SpacingType:
  900. .. rst-class:: classref-enumeration
  901. enum **SpacingType**:
  902. .. _class_TextServer_constant_SPACING_GLYPH:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  905. Spacing for each glyph.
  906. .. _class_TextServer_constant_SPACING_SPACE:
  907. .. rst-class:: classref-enumeration-constant
  908. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  909. Spacing for the space character.
  910. .. _class_TextServer_constant_SPACING_TOP:
  911. .. rst-class:: classref-enumeration-constant
  912. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  913. Spacing at the top of the line.
  914. .. _class_TextServer_constant_SPACING_BOTTOM:
  915. .. rst-class:: classref-enumeration-constant
  916. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  917. Spacing at the bottom of the line.
  918. .. _class_TextServer_constant_SPACING_MAX:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  921. Represents the size of the :ref:`SpacingType<enum_TextServer_SpacingType>` enum.
  922. .. rst-class:: classref-item-separator
  923. ----
  924. .. _enum_TextServer_FontStyle:
  925. .. rst-class:: classref-enumeration
  926. flags **FontStyle**:
  927. .. _class_TextServer_constant_FONT_BOLD:
  928. .. rst-class:: classref-enumeration-constant
  929. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  930. Font is bold.
  931. .. _class_TextServer_constant_FONT_ITALIC:
  932. .. rst-class:: classref-enumeration-constant
  933. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  934. Font is italic or oblique.
  935. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  936. .. rst-class:: classref-enumeration-constant
  937. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  938. Font have fixed-width characters.
  939. .. rst-class:: classref-item-separator
  940. ----
  941. .. _enum_TextServer_StructuredTextParser:
  942. .. rst-class:: classref-enumeration
  943. enum **StructuredTextParser**:
  944. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  945. .. rst-class:: classref-enumeration-constant
  946. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  947. Use default Unicode BiDi algorithm.
  948. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  949. .. rst-class:: classref-enumeration-constant
  950. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  951. BiDi override for URI.
  952. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  953. .. rst-class:: classref-enumeration-constant
  954. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  955. BiDi override for file path.
  956. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  957. .. rst-class:: classref-enumeration-constant
  958. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  959. BiDi override for email.
  960. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  961. .. rst-class:: classref-enumeration-constant
  962. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  963. BiDi override for lists. Structured text options: list separator :ref:`String<class_String>`.
  964. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  965. .. rst-class:: classref-enumeration-constant
  966. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  967. BiDi override for GDScript.
  968. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  969. .. rst-class:: classref-enumeration-constant
  970. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  971. User defined structured text BiDi override function.
  972. .. rst-class:: classref-item-separator
  973. ----
  974. .. _enum_TextServer_FixedSizeScaleMode:
  975. .. rst-class:: classref-enumeration
  976. enum **FixedSizeScaleMode**:
  977. .. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE:
  978. .. rst-class:: classref-enumeration-constant
  979. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0``
  980. Bitmap font is not scaled.
  981. .. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY:
  982. .. rst-class:: classref-enumeration-constant
  983. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1``
  984. Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
  985. .. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED:
  986. .. rst-class:: classref-enumeration-constant
  987. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2``
  988. Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
  989. .. rst-class:: classref-section-separator
  990. ----
  991. .. rst-class:: classref-descriptions-group
  992. Method Descriptions
  993. -------------------
  994. .. _class_TextServer_method_create_font:
  995. .. rst-class:: classref-method
  996. :ref:`RID<class_RID>` **create_font**\ (\ )
  997. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  998. .. rst-class:: classref-item-separator
  999. ----
  1000. .. _class_TextServer_method_create_font_linked_variation:
  1001. .. rst-class:: classref-method
  1002. :ref:`RID<class_RID>` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1003. Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  1004. .. rst-class:: classref-item-separator
  1005. ----
  1006. .. _class_TextServer_method_create_shaped_text:
  1007. .. rst-class:: classref-method
  1008. :ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  1009. Creates a 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.
  1010. \ **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>`).
  1011. \ **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>`).
  1012. .. rst-class:: classref-item-separator
  1013. ----
  1014. .. _class_TextServer_method_draw_hex_code_box:
  1015. .. rst-class:: classref-method
  1016. |void| **draw_hex_code_box**\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const|
  1017. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  1018. .. rst-class:: classref-item-separator
  1019. ----
  1020. .. _class_TextServer_method_font_clear_glyphs:
  1021. .. rst-class:: classref-method
  1022. |void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1023. Removes all rendered glyph information from the cache entry.
  1024. \ **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.
  1025. .. rst-class:: classref-item-separator
  1026. ----
  1027. .. _class_TextServer_method_font_clear_kerning_map:
  1028. .. rst-class:: classref-method
  1029. |void| **font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ )
  1030. Removes all kerning overrides.
  1031. .. rst-class:: classref-item-separator
  1032. ----
  1033. .. _class_TextServer_method_font_clear_size_cache:
  1034. .. rst-class:: classref-method
  1035. |void| **font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1036. Removes all font sizes from the cache entry.
  1037. .. rst-class:: classref-item-separator
  1038. ----
  1039. .. _class_TextServer_method_font_clear_textures:
  1040. .. rst-class:: classref-method
  1041. |void| **font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1042. Removes all textures from font cache entry.
  1043. \ **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.
  1044. .. rst-class:: classref-item-separator
  1045. ----
  1046. .. _class_TextServer_method_font_draw_glyph:
  1047. .. rst-class:: classref-method
  1048. |void| **font_draw_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1049. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1050. \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` or :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  1051. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1052. .. rst-class:: classref-item-separator
  1053. ----
  1054. .. _class_TextServer_method_font_draw_glyph_outline:
  1055. .. rst-class:: classref-method
  1056. |void| **font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1057. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1058. \ **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>`.
  1059. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1060. .. rst-class:: classref-item-separator
  1061. ----
  1062. .. _class_TextServer_method_font_get_antialiasing:
  1063. .. rst-class:: classref-method
  1064. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1065. Returns font anti-aliasing mode.
  1066. .. rst-class:: classref-item-separator
  1067. ----
  1068. .. _class_TextServer_method_font_get_ascent:
  1069. .. rst-class:: classref-method
  1070. :ref:`float<class_float>` **font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1071. Returns the font ascent (number of pixels above the baseline).
  1072. .. rst-class:: classref-item-separator
  1073. ----
  1074. .. _class_TextServer_method_font_get_baseline_offset:
  1075. .. rst-class:: classref-method
  1076. :ref:`float<class_float>` **font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1077. Returns extra baseline offset (as a fraction of font height).
  1078. .. rst-class:: classref-item-separator
  1079. ----
  1080. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1081. .. rst-class:: classref-method
  1082. :ref:`int<class_int>` **font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const|
  1083. Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  1084. .. rst-class:: classref-item-separator
  1085. ----
  1086. .. _class_TextServer_method_font_get_descent:
  1087. .. rst-class:: classref-method
  1088. :ref:`float<class_float>` **font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1089. Returns the font descent (number of pixels below the baseline).
  1090. .. rst-class:: classref-item-separator
  1091. ----
  1092. .. _class_TextServer_method_font_get_disable_embedded_bitmaps:
  1093. .. rst-class:: classref-method
  1094. :ref:`bool<class_bool>` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1095. Returns whether the font's embedded bitmap loading is disabled.
  1096. .. rst-class:: classref-item-separator
  1097. ----
  1098. .. _class_TextServer_method_font_get_embolden:
  1099. .. rst-class:: classref-method
  1100. :ref:`float<class_float>` **font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1101. Returns font embolden strength.
  1102. .. rst-class:: classref-item-separator
  1103. ----
  1104. .. _class_TextServer_method_font_get_face_count:
  1105. .. rst-class:: classref-method
  1106. :ref:`int<class_int>` **font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1107. Returns number of faces in the TrueType / OpenType collection.
  1108. .. rst-class:: classref-item-separator
  1109. ----
  1110. .. _class_TextServer_method_font_get_face_index:
  1111. .. rst-class:: classref-method
  1112. :ref:`int<class_int>` **font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1113. Returns an active face index in the TrueType / OpenType collection.
  1114. .. rst-class:: classref-item-separator
  1115. ----
  1116. .. _class_TextServer_method_font_get_fixed_size:
  1117. .. rst-class:: classref-method
  1118. :ref:`int<class_int>` **font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1119. Returns bitmap font fixed size.
  1120. .. rst-class:: classref-item-separator
  1121. ----
  1122. .. _class_TextServer_method_font_get_fixed_size_scale_mode:
  1123. .. rst-class:: classref-method
  1124. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1125. Returns bitmap font scaling mode.
  1126. .. rst-class:: classref-item-separator
  1127. ----
  1128. .. _class_TextServer_method_font_get_generate_mipmaps:
  1129. .. rst-class:: classref-method
  1130. :ref:`bool<class_bool>` **font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1131. Returns ``true`` if font texture mipmap generation is enabled.
  1132. .. rst-class:: classref-item-separator
  1133. ----
  1134. .. _class_TextServer_method_font_get_global_oversampling:
  1135. .. rst-class:: classref-method
  1136. :ref:`float<class_float>` **font_get_global_oversampling**\ (\ ) |const|
  1137. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1138. .. rst-class:: classref-item-separator
  1139. ----
  1140. .. _class_TextServer_method_font_get_glyph_advance:
  1141. .. rst-class:: classref-method
  1142. :ref:`Vector2<class_Vector2>` **font_get_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1143. Returns glyph advance (offset of the next glyph).
  1144. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1145. .. rst-class:: classref-item-separator
  1146. ----
  1147. .. _class_TextServer_method_font_get_glyph_contours:
  1148. .. rst-class:: classref-method
  1149. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours**\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1150. Returns outline contours of the glyph as a :ref:`Dictionary<class_Dictionary>` with the following contents:
  1151. \ ``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.
  1152. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1153. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1154. .. rst-class:: classref-item-separator
  1155. ----
  1156. .. _class_TextServer_method_font_get_glyph_index:
  1157. .. rst-class:: classref-method
  1158. :ref:`int<class_int>` **font_get_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const|
  1159. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`.
  1160. .. rst-class:: classref-item-separator
  1161. ----
  1162. .. _class_TextServer_method_font_get_glyph_list:
  1163. .. rst-class:: classref-method
  1164. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1165. Returns list of rendered glyphs in the cache entry.
  1166. .. rst-class:: classref-item-separator
  1167. ----
  1168. .. _class_TextServer_method_font_get_glyph_offset:
  1169. .. rst-class:: classref-method
  1170. :ref:`Vector2<class_Vector2>` **font_get_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1171. Returns glyph offset from the baseline.
  1172. .. rst-class:: classref-item-separator
  1173. ----
  1174. .. _class_TextServer_method_font_get_glyph_size:
  1175. .. rst-class:: classref-method
  1176. :ref:`Vector2<class_Vector2>` **font_get_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1177. Returns size of the glyph.
  1178. .. rst-class:: classref-item-separator
  1179. ----
  1180. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1181. .. rst-class:: classref-method
  1182. :ref:`int<class_int>` **font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1183. Returns index of the cache texture containing the glyph.
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1187. .. rst-class:: classref-method
  1188. :ref:`RID<class_RID>` **font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1189. Returns resource ID of the cache texture containing the glyph.
  1190. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1191. .. rst-class:: classref-item-separator
  1192. ----
  1193. .. _class_TextServer_method_font_get_glyph_texture_size:
  1194. .. rst-class:: classref-method
  1195. :ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1196. Returns size of the cache texture containing the glyph.
  1197. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1198. .. rst-class:: classref-item-separator
  1199. ----
  1200. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1201. .. rst-class:: classref-method
  1202. :ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const|
  1203. Returns rectangle in the cache texture containing the glyph.
  1204. .. rst-class:: classref-item-separator
  1205. ----
  1206. .. _class_TextServer_method_font_get_hinting:
  1207. .. rst-class:: classref-method
  1208. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1209. Returns the font hinting mode. Used by dynamic fonts only.
  1210. .. rst-class:: classref-item-separator
  1211. ----
  1212. .. _class_TextServer_method_font_get_kerning:
  1213. .. rst-class:: classref-method
  1214. :ref:`Vector2<class_Vector2>` **font_get_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1215. Returns kerning for the pair of glyphs.
  1216. .. rst-class:: classref-item-separator
  1217. ----
  1218. .. _class_TextServer_method_font_get_kerning_list:
  1219. .. rst-class:: classref-method
  1220. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1221. Returns list of the kerning overrides.
  1222. .. rst-class:: classref-item-separator
  1223. ----
  1224. .. _class_TextServer_method_font_get_language_support_override:
  1225. .. rst-class:: classref-method
  1226. :ref:`bool<class_bool>` **font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1227. Returns ``true`` if support override is enabled for the ``language``.
  1228. .. rst-class:: classref-item-separator
  1229. ----
  1230. .. _class_TextServer_method_font_get_language_support_overrides:
  1231. .. rst-class:: classref-method
  1232. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1233. Returns list of language support overrides.
  1234. .. rst-class:: classref-item-separator
  1235. ----
  1236. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1237. .. rst-class:: classref-method
  1238. :ref:`int<class_int>` **font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1239. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1240. .. rst-class:: classref-item-separator
  1241. ----
  1242. .. _class_TextServer_method_font_get_msdf_size:
  1243. .. rst-class:: classref-method
  1244. :ref:`int<class_int>` **font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1245. Returns source font size used to generate MSDF textures.
  1246. .. rst-class:: classref-item-separator
  1247. ----
  1248. .. _class_TextServer_method_font_get_name:
  1249. .. rst-class:: classref-method
  1250. :ref:`String<class_String>` **font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1251. Returns font family name.
  1252. .. rst-class:: classref-item-separator
  1253. ----
  1254. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1255. .. rst-class:: classref-method
  1256. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1257. Returns font OpenType feature set override.
  1258. .. rst-class:: classref-item-separator
  1259. ----
  1260. .. _class_TextServer_method_font_get_ot_name_strings:
  1261. .. rst-class:: classref-method
  1262. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1263. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1264. .. rst-class:: classref-item-separator
  1265. ----
  1266. .. _class_TextServer_method_font_get_oversampling:
  1267. .. rst-class:: classref-method
  1268. :ref:`float<class_float>` **font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1269. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1270. .. rst-class:: classref-item-separator
  1271. ----
  1272. .. _class_TextServer_method_font_get_scale:
  1273. .. rst-class:: classref-method
  1274. :ref:`float<class_float>` **font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1275. Returns scaling factor of the color bitmap font.
  1276. .. rst-class:: classref-item-separator
  1277. ----
  1278. .. _class_TextServer_method_font_get_script_support_override:
  1279. .. rst-class:: classref-method
  1280. :ref:`bool<class_bool>` **font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1281. Returns ``true`` if support override is enabled for the ``script``.
  1282. .. rst-class:: classref-item-separator
  1283. ----
  1284. .. _class_TextServer_method_font_get_script_support_overrides:
  1285. .. rst-class:: classref-method
  1286. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1287. Returns list of script support overrides.
  1288. .. rst-class:: classref-item-separator
  1289. ----
  1290. .. _class_TextServer_method_font_get_size_cache_list:
  1291. .. rst-class:: classref-method
  1292. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1293. Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size.
  1294. .. rst-class:: classref-item-separator
  1295. ----
  1296. .. _class_TextServer_method_font_get_spacing:
  1297. .. rst-class:: classref-method
  1298. :ref:`int<class_int>` **font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  1299. Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  1300. .. rst-class:: classref-item-separator
  1301. ----
  1302. .. _class_TextServer_method_font_get_stretch:
  1303. .. rst-class:: classref-method
  1304. :ref:`int<class_int>` **font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1305. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1306. .. rst-class:: classref-item-separator
  1307. ----
  1308. .. _class_TextServer_method_font_get_style:
  1309. .. rst-class:: classref-method
  1310. |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1311. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1312. .. rst-class:: classref-item-separator
  1313. ----
  1314. .. _class_TextServer_method_font_get_style_name:
  1315. .. rst-class:: classref-method
  1316. :ref:`String<class_String>` **font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1317. Returns font style name.
  1318. .. rst-class:: classref-item-separator
  1319. ----
  1320. .. _class_TextServer_method_font_get_subpixel_positioning:
  1321. .. rst-class:: classref-method
  1322. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1323. Returns font subpixel glyph positioning mode.
  1324. .. rst-class:: classref-item-separator
  1325. ----
  1326. .. _class_TextServer_method_font_get_supported_chars:
  1327. .. rst-class:: classref-method
  1328. :ref:`String<class_String>` **font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1329. Returns a string containing all the characters available in the font.
  1330. .. rst-class:: classref-item-separator
  1331. ----
  1332. .. _class_TextServer_method_font_get_texture_count:
  1333. .. rst-class:: classref-method
  1334. :ref:`int<class_int>` **font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1335. Returns number of textures used by font cache entry.
  1336. .. rst-class:: classref-item-separator
  1337. ----
  1338. .. _class_TextServer_method_font_get_texture_image:
  1339. .. rst-class:: classref-method
  1340. :ref:`Image<class_Image>` **font_get_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const|
  1341. Returns font cache texture image data.
  1342. .. rst-class:: classref-item-separator
  1343. ----
  1344. .. _class_TextServer_method_font_get_texture_offsets:
  1345. .. rst-class:: classref-method
  1346. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const|
  1347. Returns array containing glyph packing data.
  1348. .. rst-class:: classref-item-separator
  1349. ----
  1350. .. _class_TextServer_method_font_get_transform:
  1351. .. rst-class:: classref-method
  1352. :ref:`Transform2D<class_Transform2D>` **font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1353. Returns 2D transform applied to the font outlines.
  1354. .. rst-class:: classref-item-separator
  1355. ----
  1356. .. _class_TextServer_method_font_get_underline_position:
  1357. .. rst-class:: classref-method
  1358. :ref:`float<class_float>` **font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1359. Returns pixel offset of the underline below the baseline.
  1360. .. rst-class:: classref-item-separator
  1361. ----
  1362. .. _class_TextServer_method_font_get_underline_thickness:
  1363. .. rst-class:: classref-method
  1364. :ref:`float<class_float>` **font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1365. Returns thickness of the underline in pixels.
  1366. .. rst-class:: classref-item-separator
  1367. ----
  1368. .. _class_TextServer_method_font_get_variation_coordinates:
  1369. .. rst-class:: classref-method
  1370. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1371. 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.
  1372. .. rst-class:: classref-item-separator
  1373. ----
  1374. .. _class_TextServer_method_font_get_weight:
  1375. .. rst-class:: classref-method
  1376. :ref:`int<class_int>` **font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1377. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1378. .. rst-class:: classref-item-separator
  1379. ----
  1380. .. _class_TextServer_method_font_has_char:
  1381. .. rst-class:: classref-method
  1382. :ref:`bool<class_bool>` **font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const|
  1383. Returns ``true`` if a Unicode ``char`` is available in the font.
  1384. .. rst-class:: classref-item-separator
  1385. ----
  1386. .. _class_TextServer_method_font_is_allow_system_fallback:
  1387. .. rst-class:: classref-method
  1388. :ref:`bool<class_bool>` **font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1389. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1390. .. rst-class:: classref-item-separator
  1391. ----
  1392. .. _class_TextServer_method_font_is_force_autohinter:
  1393. .. rst-class:: classref-method
  1394. :ref:`bool<class_bool>` **font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1395. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1396. .. rst-class:: classref-item-separator
  1397. ----
  1398. .. _class_TextServer_method_font_is_language_supported:
  1399. .. rst-class:: classref-method
  1400. :ref:`bool<class_bool>` **font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const|
  1401. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1402. .. rst-class:: classref-item-separator
  1403. ----
  1404. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1405. .. rst-class:: classref-method
  1406. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1407. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1408. .. rst-class:: classref-item-separator
  1409. ----
  1410. .. _class_TextServer_method_font_is_script_supported:
  1411. .. rst-class:: classref-method
  1412. :ref:`bool<class_bool>` **font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const|
  1413. Returns ``true``, if font supports given script (ISO 15924 code).
  1414. .. rst-class:: classref-item-separator
  1415. ----
  1416. .. _class_TextServer_method_font_remove_glyph:
  1417. .. rst-class:: classref-method
  1418. |void| **font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ )
  1419. Removes specified rendered glyph information from the cache entry.
  1420. \ **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.
  1421. .. rst-class:: classref-item-separator
  1422. ----
  1423. .. _class_TextServer_method_font_remove_kerning:
  1424. .. rst-class:: classref-method
  1425. |void| **font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ )
  1426. Removes kerning override for the pair of glyphs.
  1427. .. rst-class:: classref-item-separator
  1428. ----
  1429. .. _class_TextServer_method_font_remove_language_support_override:
  1430. .. rst-class:: classref-method
  1431. |void| **font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1432. Remove language support override.
  1433. .. rst-class:: classref-item-separator
  1434. ----
  1435. .. _class_TextServer_method_font_remove_script_support_override:
  1436. .. rst-class:: classref-method
  1437. |void| **font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1438. Removes script support override.
  1439. .. rst-class:: classref-item-separator
  1440. ----
  1441. .. _class_TextServer_method_font_remove_size_cache:
  1442. .. rst-class:: classref-method
  1443. |void| **font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1444. Removes specified font size from the cache entry.
  1445. .. rst-class:: classref-item-separator
  1446. ----
  1447. .. _class_TextServer_method_font_remove_texture:
  1448. .. rst-class:: classref-method
  1449. |void| **font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ )
  1450. Removes specified texture from the cache entry.
  1451. \ **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>`.
  1452. .. rst-class:: classref-item-separator
  1453. ----
  1454. .. _class_TextServer_method_font_render_glyph:
  1455. .. rst-class:: classref-method
  1456. |void| **font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ )
  1457. Renders specified glyph to the font cache texture.
  1458. .. rst-class:: classref-item-separator
  1459. ----
  1460. .. _class_TextServer_method_font_render_range:
  1461. .. rst-class:: classref-method
  1462. |void| **font_render_range**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ )
  1463. Renders the range of characters to the font cache texture.
  1464. .. rst-class:: classref-item-separator
  1465. ----
  1466. .. _class_TextServer_method_font_set_allow_system_fallback:
  1467. .. rst-class:: classref-method
  1468. |void| **font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ )
  1469. If set to ``true``, system fonts can be automatically used as fallbacks.
  1470. .. rst-class:: classref-item-separator
  1471. ----
  1472. .. _class_TextServer_method_font_set_antialiasing:
  1473. .. rst-class:: classref-method
  1474. |void| **font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ )
  1475. Sets font anti-aliasing mode.
  1476. .. rst-class:: classref-item-separator
  1477. ----
  1478. .. _class_TextServer_method_font_set_ascent:
  1479. .. rst-class:: classref-method
  1480. |void| **font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ )
  1481. Sets the font ascent (number of pixels above the baseline).
  1482. .. rst-class:: classref-item-separator
  1483. ----
  1484. .. _class_TextServer_method_font_set_baseline_offset:
  1485. .. rst-class:: classref-method
  1486. |void| **font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ )
  1487. Sets extra baseline offset (as a fraction of font height).
  1488. .. rst-class:: classref-item-separator
  1489. ----
  1490. .. _class_TextServer_method_font_set_data:
  1491. .. rst-class:: classref-method
  1492. |void| **font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ )
  1493. Sets font source data, e.g contents of the dynamic font source file.
  1494. .. rst-class:: classref-item-separator
  1495. ----
  1496. .. _class_TextServer_method_font_set_descent:
  1497. .. rst-class:: classref-method
  1498. |void| **font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ )
  1499. Sets the font descent (number of pixels below the baseline).
  1500. .. rst-class:: classref-item-separator
  1501. ----
  1502. .. _class_TextServer_method_font_set_disable_embedded_bitmaps:
  1503. .. rst-class:: classref-method
  1504. |void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ )
  1505. If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
  1506. .. rst-class:: classref-item-separator
  1507. ----
  1508. .. _class_TextServer_method_font_set_embolden:
  1509. .. rst-class:: classref-method
  1510. |void| **font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ )
  1511. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1512. .. rst-class:: classref-item-separator
  1513. ----
  1514. .. _class_TextServer_method_font_set_face_index:
  1515. .. rst-class:: classref-method
  1516. |void| **font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ )
  1517. Sets an active face index in the TrueType / OpenType collection.
  1518. .. rst-class:: classref-item-separator
  1519. ----
  1520. .. _class_TextServer_method_font_set_fixed_size:
  1521. .. rst-class:: classref-method
  1522. |void| **font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ )
  1523. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1524. .. rst-class:: classref-item-separator
  1525. ----
  1526. .. _class_TextServer_method_font_set_fixed_size_scale_mode:
  1527. .. rst-class:: classref-method
  1528. |void| **font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ )
  1529. Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero.
  1530. .. rst-class:: classref-item-separator
  1531. ----
  1532. .. _class_TextServer_method_font_set_force_autohinter:
  1533. .. rst-class:: classref-method
  1534. |void| **font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ )
  1535. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1536. .. rst-class:: classref-item-separator
  1537. ----
  1538. .. _class_TextServer_method_font_set_generate_mipmaps:
  1539. .. rst-class:: classref-method
  1540. |void| **font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ )
  1541. If set to ``true`` font texture mipmap generation is enabled.
  1542. .. rst-class:: classref-item-separator
  1543. ----
  1544. .. _class_TextServer_method_font_set_global_oversampling:
  1545. .. rst-class:: classref-method
  1546. |void| **font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ )
  1547. Sets oversampling factor, shared by all font in the TextServer.
  1548. \ **Note:** This value can be automatically changed by display server.
  1549. .. rst-class:: classref-item-separator
  1550. ----
  1551. .. _class_TextServer_method_font_set_glyph_advance:
  1552. .. rst-class:: classref-method
  1553. |void| **font_set_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ )
  1554. Sets glyph advance (offset of the next glyph).
  1555. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1556. .. rst-class:: classref-item-separator
  1557. ----
  1558. .. _class_TextServer_method_font_set_glyph_offset:
  1559. .. rst-class:: classref-method
  1560. |void| **font_set_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ )
  1561. Sets glyph offset from the baseline.
  1562. .. rst-class:: classref-item-separator
  1563. ----
  1564. .. _class_TextServer_method_font_set_glyph_size:
  1565. .. rst-class:: classref-method
  1566. |void| **font_set_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ )
  1567. Sets size of the glyph.
  1568. .. rst-class:: classref-item-separator
  1569. ----
  1570. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1571. .. rst-class:: classref-method
  1572. |void| **font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ )
  1573. Sets index of the cache texture containing the glyph.
  1574. .. rst-class:: classref-item-separator
  1575. ----
  1576. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1577. .. rst-class:: classref-method
  1578. |void| **font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ )
  1579. Sets rectangle in the cache texture containing the glyph.
  1580. .. rst-class:: classref-item-separator
  1581. ----
  1582. .. _class_TextServer_method_font_set_hinting:
  1583. .. rst-class:: classref-method
  1584. |void| **font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ )
  1585. Sets font hinting mode. Used by dynamic fonts only.
  1586. .. rst-class:: classref-item-separator
  1587. ----
  1588. .. _class_TextServer_method_font_set_kerning:
  1589. .. rst-class:: classref-method
  1590. |void| **font_set_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ )
  1591. Sets kerning for the pair of glyphs.
  1592. .. rst-class:: classref-item-separator
  1593. ----
  1594. .. _class_TextServer_method_font_set_language_support_override:
  1595. .. rst-class:: classref-method
  1596. |void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1597. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1598. .. rst-class:: classref-item-separator
  1599. ----
  1600. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1601. .. rst-class:: classref-method
  1602. |void| **font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ )
  1603. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1604. .. rst-class:: classref-item-separator
  1605. ----
  1606. .. _class_TextServer_method_font_set_msdf_size:
  1607. .. rst-class:: classref-method
  1608. |void| **font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ )
  1609. Sets source font size used to generate MSDF textures.
  1610. .. rst-class:: classref-item-separator
  1611. ----
  1612. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1613. .. rst-class:: classref-method
  1614. |void| **font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ )
  1615. 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.
  1616. \ **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.
  1617. .. rst-class:: classref-item-separator
  1618. ----
  1619. .. _class_TextServer_method_font_set_name:
  1620. .. rst-class:: classref-method
  1621. |void| **font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1622. Sets the font family name.
  1623. .. rst-class:: classref-item-separator
  1624. ----
  1625. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1626. .. rst-class:: classref-method
  1627. |void| **font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ )
  1628. Sets font OpenType feature set override.
  1629. .. rst-class:: classref-item-separator
  1630. ----
  1631. .. _class_TextServer_method_font_set_oversampling:
  1632. .. rst-class:: classref-method
  1633. |void| **font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ )
  1634. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1635. .. rst-class:: classref-item-separator
  1636. ----
  1637. .. _class_TextServer_method_font_set_scale:
  1638. .. rst-class:: classref-method
  1639. |void| **font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ )
  1640. Sets scaling factor of the color bitmap font.
  1641. .. rst-class:: classref-item-separator
  1642. ----
  1643. .. _class_TextServer_method_font_set_script_support_override:
  1644. .. rst-class:: classref-method
  1645. |void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1646. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1647. .. rst-class:: classref-item-separator
  1648. ----
  1649. .. _class_TextServer_method_font_set_spacing:
  1650. .. rst-class:: classref-method
  1651. |void| **font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  1652. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  1653. .. rst-class:: classref-item-separator
  1654. ----
  1655. .. _class_TextServer_method_font_set_stretch:
  1656. .. rst-class:: classref-method
  1657. |void| **font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1658. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1659. \ **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.
  1660. .. rst-class:: classref-item-separator
  1661. ----
  1662. .. _class_TextServer_method_font_set_style:
  1663. .. rst-class:: classref-method
  1664. |void| **font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ )
  1665. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1666. \ **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.
  1667. .. rst-class:: classref-item-separator
  1668. ----
  1669. .. _class_TextServer_method_font_set_style_name:
  1670. .. rst-class:: classref-method
  1671. |void| **font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1672. Sets the font style name.
  1673. .. rst-class:: classref-item-separator
  1674. ----
  1675. .. _class_TextServer_method_font_set_subpixel_positioning:
  1676. .. rst-class:: classref-method
  1677. |void| **font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ )
  1678. Sets font subpixel glyph positioning mode.
  1679. .. rst-class:: classref-item-separator
  1680. ----
  1681. .. _class_TextServer_method_font_set_texture_image:
  1682. .. rst-class:: classref-method
  1683. |void| **font_set_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ )
  1684. Sets font cache texture image data.
  1685. .. rst-class:: classref-item-separator
  1686. ----
  1687. .. _class_TextServer_method_font_set_texture_offsets:
  1688. .. rst-class:: classref-method
  1689. |void| **font_set_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ )
  1690. Sets array containing glyph packing data.
  1691. .. rst-class:: classref-item-separator
  1692. ----
  1693. .. _class_TextServer_method_font_set_transform:
  1694. .. rst-class:: classref-method
  1695. |void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ )
  1696. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
  1697. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1698. .. rst-class:: classref-item-separator
  1699. ----
  1700. .. _class_TextServer_method_font_set_underline_position:
  1701. .. rst-class:: classref-method
  1702. |void| **font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ )
  1703. Sets pixel offset of the underline below the baseline.
  1704. .. rst-class:: classref-item-separator
  1705. ----
  1706. .. _class_TextServer_method_font_set_underline_thickness:
  1707. .. rst-class:: classref-method
  1708. |void| **font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ )
  1709. Sets thickness of the underline in pixels.
  1710. .. rst-class:: classref-item-separator
  1711. ----
  1712. .. _class_TextServer_method_font_set_variation_coordinates:
  1713. .. rst-class:: classref-method
  1714. |void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ )
  1715. 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.
  1716. .. rst-class:: classref-item-separator
  1717. ----
  1718. .. _class_TextServer_method_font_set_weight:
  1719. .. rst-class:: classref-method
  1720. |void| **font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1721. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1722. \ **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.
  1723. .. rst-class:: classref-item-separator
  1724. ----
  1725. .. _class_TextServer_method_font_supported_feature_list:
  1726. .. rst-class:: classref-method
  1727. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1728. Returns the dictionary of the supported OpenType features.
  1729. .. rst-class:: classref-item-separator
  1730. ----
  1731. .. _class_TextServer_method_font_supported_variation_list:
  1732. .. rst-class:: classref-method
  1733. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1734. Returns the dictionary of the supported OpenType variation coordinates.
  1735. .. rst-class:: classref-item-separator
  1736. ----
  1737. .. _class_TextServer_method_format_number:
  1738. .. rst-class:: classref-method
  1739. :ref:`String<class_String>` **format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1740. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1741. If ``language`` is omitted, the active locale will be used.
  1742. .. rst-class:: classref-item-separator
  1743. ----
  1744. .. _class_TextServer_method_free_rid:
  1745. .. rst-class:: classref-method
  1746. |void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1747. Frees an object created by this **TextServer**.
  1748. .. rst-class:: classref-item-separator
  1749. ----
  1750. .. _class_TextServer_method_get_features:
  1751. .. rst-class:: classref-method
  1752. :ref:`int<class_int>` **get_features**\ (\ ) |const|
  1753. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1754. .. rst-class:: classref-item-separator
  1755. ----
  1756. .. _class_TextServer_method_get_hex_code_box_size:
  1757. .. rst-class:: classref-method
  1758. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1759. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1760. .. rst-class:: classref-item-separator
  1761. ----
  1762. .. _class_TextServer_method_get_name:
  1763. .. rst-class:: classref-method
  1764. :ref:`String<class_String>` **get_name**\ (\ ) |const|
  1765. Returns the name of the server interface.
  1766. .. rst-class:: classref-item-separator
  1767. ----
  1768. .. _class_TextServer_method_get_support_data_filename:
  1769. .. rst-class:: classref-method
  1770. :ref:`String<class_String>` **get_support_data_filename**\ (\ ) |const|
  1771. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1772. .. rst-class:: classref-item-separator
  1773. ----
  1774. .. _class_TextServer_method_get_support_data_info:
  1775. .. rst-class:: classref-method
  1776. :ref:`String<class_String>` **get_support_data_info**\ (\ ) |const|
  1777. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1778. .. rst-class:: classref-item-separator
  1779. ----
  1780. .. _class_TextServer_method_has:
  1781. .. rst-class:: classref-method
  1782. :ref:`bool<class_bool>` **has**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1783. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1784. .. rst-class:: classref-item-separator
  1785. ----
  1786. .. _class_TextServer_method_has_feature:
  1787. .. rst-class:: classref-method
  1788. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const|
  1789. Returns ``true`` if the server supports a feature.
  1790. .. rst-class:: classref-item-separator
  1791. ----
  1792. .. _class_TextServer_method_is_confusable:
  1793. .. rst-class:: classref-method
  1794. :ref:`int<class_int>` **is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const|
  1795. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1796. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1797. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1798. .. rst-class:: classref-item-separator
  1799. ----
  1800. .. _class_TextServer_method_is_locale_right_to_left:
  1801. .. rst-class:: classref-method
  1802. :ref:`bool<class_bool>` **is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |const|
  1803. Returns ``true`` if locale is right-to-left.
  1804. .. rst-class:: classref-item-separator
  1805. ----
  1806. .. _class_TextServer_method_is_valid_identifier:
  1807. .. rst-class:: classref-method
  1808. :ref:`bool<class_bool>` **is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  1809. Returns ``true`` if ``string`` is a valid identifier.
  1810. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1811. - Conform to normalization form C.
  1812. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1813. - May contain Unicode characters of class XID_Continue in the other positions.
  1814. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1815. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1816. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1817. - May contain Unicode characters of class XID_Continue in the other positions.
  1818. .. rst-class:: classref-item-separator
  1819. ----
  1820. .. _class_TextServer_method_load_support_data:
  1821. .. rst-class:: classref-method
  1822. :ref:`bool<class_bool>` **load_support_data**\ (\ filename\: :ref:`String<class_String>`\ )
  1823. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1824. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1825. .. rst-class:: classref-item-separator
  1826. ----
  1827. .. _class_TextServer_method_name_to_tag:
  1828. .. rst-class:: classref-method
  1829. :ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const|
  1830. Converts readable feature, variation, script, or language name to OpenType tag.
  1831. .. rst-class:: classref-item-separator
  1832. ----
  1833. .. _class_TextServer_method_parse_number:
  1834. .. rst-class:: classref-method
  1835. :ref:`String<class_String>` **parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1836. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1837. .. rst-class:: classref-item-separator
  1838. ----
  1839. .. _class_TextServer_method_parse_structured_text:
  1840. .. rst-class:: classref-method
  1841. :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const|
  1842. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1843. .. rst-class:: classref-item-separator
  1844. ----
  1845. .. _class_TextServer_method_percent_sign:
  1846. .. rst-class:: classref-method
  1847. :ref:`String<class_String>` **percent_sign**\ (\ language\: :ref:`String<class_String>` = ""\ ) |const|
  1848. Returns percent sign used in the ``language``.
  1849. .. rst-class:: classref-item-separator
  1850. ----
  1851. .. _class_TextServer_method_save_support_data:
  1852. .. rst-class:: classref-method
  1853. :ref:`bool<class_bool>` **save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |const|
  1854. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1855. \ **Note:** This function is used by during project export, to include TextServer database.
  1856. .. rst-class:: classref-item-separator
  1857. ----
  1858. .. _class_TextServer_method_shaped_get_span_count:
  1859. .. rst-class:: classref-method
  1860. :ref:`int<class_int>` **shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1861. 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>`.
  1862. .. rst-class:: classref-item-separator
  1863. ----
  1864. .. _class_TextServer_method_shaped_get_span_meta:
  1865. .. rst-class:: classref-method
  1866. :ref:`Variant<class_Variant>` **shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const|
  1867. Returns text span metadata.
  1868. .. rst-class:: classref-item-separator
  1869. ----
  1870. .. _class_TextServer_method_shaped_set_span_update_font:
  1871. .. rst-class:: classref-method
  1872. |void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ )
  1873. Changes text span font, font size, and OpenType features, without changing the text.
  1874. .. rst-class:: classref-item-separator
  1875. ----
  1876. .. _class_TextServer_method_shaped_text_add_object:
  1877. .. rst-class:: classref-method
  1878. :ref:`bool<class_bool>` **shaped_text_add_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ )
  1879. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1880. .. rst-class:: classref-item-separator
  1881. ----
  1882. .. _class_TextServer_method_shaped_text_add_string:
  1883. .. rst-class:: classref-method
  1884. :ref:`bool<class_bool>` **shaped_text_add_string**\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ )
  1885. Adds text span and font to draw it to the text buffer.
  1886. .. rst-class:: classref-item-separator
  1887. ----
  1888. .. _class_TextServer_method_shaped_text_clear:
  1889. .. rst-class:: classref-method
  1890. |void| **shaped_text_clear**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1891. Clears text buffer (removes text and inline objects).
  1892. .. rst-class:: classref-item-separator
  1893. ----
  1894. .. _class_TextServer_method_shaped_text_closest_character_pos:
  1895. .. rst-class:: classref-method
  1896. :ref:`int<class_int>` **shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  1897. Returns composite character position closest to the ``pos``.
  1898. .. rst-class:: classref-item-separator
  1899. ----
  1900. .. _class_TextServer_method_shaped_text_draw:
  1901. .. rst-class:: classref-method
  1902. |void| **shaped_text_draw**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1903. 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).
  1904. .. rst-class:: classref-item-separator
  1905. ----
  1906. .. _class_TextServer_method_shaped_text_draw_outline:
  1907. .. rst-class:: classref-method
  1908. |void| **shaped_text_draw_outline**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const|
  1909. 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).
  1910. .. rst-class:: classref-item-separator
  1911. ----
  1912. .. _class_TextServer_method_shaped_text_fit_to_width:
  1913. .. rst-class:: classref-method
  1914. :ref:`float<class_float>` **shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ )
  1915. Adjusts text width to fit to specified width, returns new text width.
  1916. .. rst-class:: classref-item-separator
  1917. ----
  1918. .. _class_TextServer_method_shaped_text_get_ascent:
  1919. .. rst-class:: classref-method
  1920. :ref:`float<class_float>` **shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1921. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1922. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1923. .. rst-class:: classref-item-separator
  1924. ----
  1925. .. _class_TextServer_method_shaped_text_get_carets:
  1926. .. rst-class:: classref-method
  1927. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const|
  1928. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1929. .. rst-class:: classref-item-separator
  1930. ----
  1931. .. _class_TextServer_method_shaped_text_get_character_breaks:
  1932. .. rst-class:: classref-method
  1933. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1934. Returns array of the composite character boundaries.
  1935. .. rst-class:: classref-item-separator
  1936. ----
  1937. .. _class_TextServer_method_shaped_text_get_custom_ellipsis:
  1938. .. rst-class:: classref-method
  1939. :ref:`int<class_int>` **shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1940. Returns ellipsis character used for text clipping.
  1941. .. rst-class:: classref-item-separator
  1942. ----
  1943. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1944. .. rst-class:: classref-method
  1945. :ref:`String<class_String>` **shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1946. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1947. .. rst-class:: classref-item-separator
  1948. ----
  1949. .. _class_TextServer_method_shaped_text_get_descent:
  1950. .. rst-class:: classref-method
  1951. :ref:`float<class_float>` **shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1952. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1953. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1954. .. rst-class:: classref-item-separator
  1955. ----
  1956. .. _class_TextServer_method_shaped_text_get_direction:
  1957. .. rst-class:: classref-method
  1958. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1959. Returns direction of the text.
  1960. .. rst-class:: classref-item-separator
  1961. ----
  1962. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1963. .. rst-class:: classref-method
  1964. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const|
  1965. Returns dominant direction of in the range of text.
  1966. .. rst-class:: classref-item-separator
  1967. ----
  1968. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1969. .. rst-class:: classref-method
  1970. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1971. Returns number of glyphs in the ellipsis.
  1972. .. rst-class:: classref-item-separator
  1973. ----
  1974. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1975. .. rst-class:: classref-method
  1976. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1977. Returns array of the glyphs in the ellipsis.
  1978. .. rst-class:: classref-item-separator
  1979. ----
  1980. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1981. .. rst-class:: classref-method
  1982. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1983. Returns position of the ellipsis.
  1984. .. rst-class:: classref-item-separator
  1985. ----
  1986. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1987. .. rst-class:: classref-method
  1988. :ref:`int<class_int>` **shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1989. Returns number of glyphs in the buffer.
  1990. .. rst-class:: classref-item-separator
  1991. ----
  1992. .. _class_TextServer_method_shaped_text_get_glyphs:
  1993. .. rst-class:: classref-method
  1994. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1995. Returns an array of glyphs in the visual order.
  1996. .. rst-class:: classref-item-separator
  1997. ----
  1998. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1999. .. rst-class:: classref-method
  2000. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2001. Returns composite character's bounds as offsets from the start of the line.
  2002. .. rst-class:: classref-item-separator
  2003. ----
  2004. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  2005. .. rst-class:: classref-method
  2006. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2007. Returns direction of the text, inferred by the BiDi algorithm.
  2008. .. rst-class:: classref-item-separator
  2009. ----
  2010. .. _class_TextServer_method_shaped_text_get_line_breaks:
  2011. .. rst-class:: classref-method
  2012. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const|
  2013. Breaks text to the lines and returns character ranges for each line.
  2014. .. rst-class:: classref-item-separator
  2015. ----
  2016. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  2017. .. rst-class:: classref-method
  2018. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const|
  2019. Breaks text to the lines and columns. Returns character ranges for each segment.
  2020. .. rst-class:: classref-item-separator
  2021. ----
  2022. .. _class_TextServer_method_shaped_text_get_object_glyph:
  2023. .. rst-class:: classref-method
  2024. :ref:`int<class_int>` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2025. Returns the glyph index of the inline object.
  2026. .. rst-class:: classref-item-separator
  2027. ----
  2028. .. _class_TextServer_method_shaped_text_get_object_range:
  2029. .. rst-class:: classref-method
  2030. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2031. Returns the character range of the inline object.
  2032. .. rst-class:: classref-item-separator
  2033. ----
  2034. .. _class_TextServer_method_shaped_text_get_object_rect:
  2035. .. rst-class:: classref-method
  2036. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2037. Returns bounding rectangle of the inline object.
  2038. .. rst-class:: classref-item-separator
  2039. ----
  2040. .. _class_TextServer_method_shaped_text_get_objects:
  2041. .. rst-class:: classref-method
  2042. :ref:`Array<class_Array>` **shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2043. Returns array of inline objects.
  2044. .. rst-class:: classref-item-separator
  2045. ----
  2046. .. _class_TextServer_method_shaped_text_get_orientation:
  2047. .. rst-class:: classref-method
  2048. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2049. Returns text orientation.
  2050. .. rst-class:: classref-item-separator
  2051. ----
  2052. .. _class_TextServer_method_shaped_text_get_parent:
  2053. .. rst-class:: classref-method
  2054. :ref:`RID<class_RID>` **shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2055. Returns the parent buffer from which the substring originates.
  2056. .. rst-class:: classref-item-separator
  2057. ----
  2058. .. _class_TextServer_method_shaped_text_get_preserve_control:
  2059. .. rst-class:: classref-method
  2060. :ref:`bool<class_bool>` **shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2061. Returns ``true`` if text buffer is configured to display control characters.
  2062. .. rst-class:: classref-item-separator
  2063. ----
  2064. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  2065. .. rst-class:: classref-method
  2066. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2067. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  2068. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  2069. .. rst-class:: classref-item-separator
  2070. ----
  2071. .. _class_TextServer_method_shaped_text_get_range:
  2072. .. rst-class:: classref-method
  2073. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2074. Returns substring buffer character range in the parent buffer.
  2075. .. rst-class:: classref-item-separator
  2076. ----
  2077. .. _class_TextServer_method_shaped_text_get_selection:
  2078. .. rst-class:: classref-method
  2079. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const|
  2080. Returns selection rectangles for the specified character range.
  2081. .. rst-class:: classref-item-separator
  2082. ----
  2083. .. _class_TextServer_method_shaped_text_get_size:
  2084. .. rst-class:: classref-method
  2085. :ref:`Vector2<class_Vector2>` **shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2086. Returns size of the text.
  2087. .. rst-class:: classref-item-separator
  2088. ----
  2089. .. _class_TextServer_method_shaped_text_get_spacing:
  2090. .. rst-class:: classref-method
  2091. :ref:`int<class_int>` **shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  2092. Returns extra spacing added between glyphs or lines in pixels.
  2093. .. rst-class:: classref-item-separator
  2094. ----
  2095. .. _class_TextServer_method_shaped_text_get_trim_pos:
  2096. .. rst-class:: classref-method
  2097. :ref:`int<class_int>` **shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2098. Returns the position of the overrun trim.
  2099. .. rst-class:: classref-item-separator
  2100. ----
  2101. .. _class_TextServer_method_shaped_text_get_underline_position:
  2102. .. rst-class:: classref-method
  2103. :ref:`float<class_float>` **shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2104. Returns pixel offset of the underline below the baseline.
  2105. .. rst-class:: classref-item-separator
  2106. ----
  2107. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  2108. .. rst-class:: classref-method
  2109. :ref:`float<class_float>` **shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2110. Returns thickness of the underline.
  2111. .. rst-class:: classref-item-separator
  2112. ----
  2113. .. _class_TextServer_method_shaped_text_get_width:
  2114. .. rst-class:: classref-method
  2115. :ref:`float<class_float>` **shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2116. Returns width (for horizontal layout) or height (for vertical) of the text.
  2117. .. rst-class:: classref-item-separator
  2118. ----
  2119. .. _class_TextServer_method_shaped_text_get_word_breaks:
  2120. .. rst-class:: classref-method
  2121. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264\ ) |const|
  2122. 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>`).
  2123. .. rst-class:: classref-item-separator
  2124. ----
  2125. .. _class_TextServer_method_shaped_text_has_visible_chars:
  2126. .. rst-class:: classref-method
  2127. :ref:`bool<class_bool>` **shaped_text_has_visible_chars**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2128. Returns ``true`` if text buffer contains any visible characters.
  2129. .. rst-class:: classref-item-separator
  2130. ----
  2131. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  2132. .. rst-class:: classref-method
  2133. :ref:`int<class_int>` **shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2134. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  2135. .. rst-class:: classref-item-separator
  2136. ----
  2137. .. _class_TextServer_method_shaped_text_hit_test_position:
  2138. .. rst-class:: classref-method
  2139. :ref:`int<class_int>` **shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2140. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  2141. .. rst-class:: classref-item-separator
  2142. ----
  2143. .. _class_TextServer_method_shaped_text_is_ready:
  2144. .. rst-class:: classref-method
  2145. :ref:`bool<class_bool>` **shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2146. Returns ``true`` if buffer is successfully shaped.
  2147. .. rst-class:: classref-item-separator
  2148. ----
  2149. .. _class_TextServer_method_shaped_text_next_character_pos:
  2150. .. rst-class:: classref-method
  2151. :ref:`int<class_int>` **shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2152. Returns composite character end position closest to the ``pos``.
  2153. .. rst-class:: classref-item-separator
  2154. ----
  2155. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2156. .. rst-class:: classref-method
  2157. :ref:`int<class_int>` **shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2158. Returns grapheme end position closest to the ``pos``.
  2159. .. rst-class:: classref-item-separator
  2160. ----
  2161. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2162. .. rst-class:: classref-method
  2163. |void| **shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ )
  2164. Trims text if it exceeds the given width.
  2165. .. rst-class:: classref-item-separator
  2166. ----
  2167. .. _class_TextServer_method_shaped_text_prev_character_pos:
  2168. .. rst-class:: classref-method
  2169. :ref:`int<class_int>` **shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2170. Returns composite character start position closest to the ``pos``.
  2171. .. rst-class:: classref-item-separator
  2172. ----
  2173. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2174. .. rst-class:: classref-method
  2175. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2176. Returns grapheme start position closest to the ``pos``.
  2177. .. rst-class:: classref-item-separator
  2178. ----
  2179. .. _class_TextServer_method_shaped_text_resize_object:
  2180. .. rst-class:: classref-method
  2181. :ref:`bool<class_bool>` **shaped_text_resize_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ )
  2182. Sets new size and alignment of embedded object.
  2183. .. rst-class:: classref-item-separator
  2184. ----
  2185. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2186. .. rst-class:: classref-method
  2187. |void| **shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ )
  2188. Overrides BiDi for the structured text.
  2189. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2190. .. rst-class:: classref-item-separator
  2191. ----
  2192. .. _class_TextServer_method_shaped_text_set_custom_ellipsis:
  2193. .. rst-class:: classref-method
  2194. |void| **shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ )
  2195. Sets ellipsis character used for text clipping.
  2196. .. rst-class:: classref-item-separator
  2197. ----
  2198. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2199. .. rst-class:: classref-method
  2200. |void| **shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ )
  2201. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2202. .. rst-class:: classref-item-separator
  2203. ----
  2204. .. _class_TextServer_method_shaped_text_set_direction:
  2205. .. rst-class:: classref-method
  2206. |void| **shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ )
  2207. 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.
  2208. \ **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>`).
  2209. .. rst-class:: classref-item-separator
  2210. ----
  2211. .. _class_TextServer_method_shaped_text_set_orientation:
  2212. .. rst-class:: classref-method
  2213. |void| **shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  2214. Sets desired text orientation.
  2215. \ **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>`).
  2216. .. rst-class:: classref-item-separator
  2217. ----
  2218. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2219. .. rst-class:: classref-method
  2220. |void| **shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2221. If set to ``true`` text buffer will display control characters.
  2222. .. rst-class:: classref-item-separator
  2223. ----
  2224. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2225. .. rst-class:: classref-method
  2226. |void| **shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2227. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2228. .. rst-class:: classref-item-separator
  2229. ----
  2230. .. _class_TextServer_method_shaped_text_set_spacing:
  2231. .. rst-class:: classref-method
  2232. |void| **shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  2233. Sets extra spacing added between glyphs or lines in pixels.
  2234. .. rst-class:: classref-item-separator
  2235. ----
  2236. .. _class_TextServer_method_shaped_text_shape:
  2237. .. rst-class:: classref-method
  2238. :ref:`bool<class_bool>` **shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2239. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2240. \ **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.
  2241. .. rst-class:: classref-item-separator
  2242. ----
  2243. .. _class_TextServer_method_shaped_text_sort_logical:
  2244. .. rst-class:: classref-method
  2245. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2246. Returns text glyphs in the logical order.
  2247. .. rst-class:: classref-item-separator
  2248. ----
  2249. .. _class_TextServer_method_shaped_text_substr:
  2250. .. rst-class:: classref-method
  2251. :ref:`RID<class_RID>` **shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const|
  2252. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2253. .. rst-class:: classref-item-separator
  2254. ----
  2255. .. _class_TextServer_method_shaped_text_tab_align:
  2256. .. rst-class:: classref-method
  2257. :ref:`float<class_float>` **shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
  2258. Aligns shaped text to the given tab-stops.
  2259. .. rst-class:: classref-item-separator
  2260. ----
  2261. .. _class_TextServer_method_spoof_check:
  2262. .. rst-class:: classref-method
  2263. :ref:`bool<class_bool>` **spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2264. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2265. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2266. .. rst-class:: classref-item-separator
  2267. ----
  2268. .. _class_TextServer_method_string_get_character_breaks:
  2269. .. rst-class:: classref-method
  2270. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2271. Returns array of the composite character boundaries.
  2272. ::
  2273. var ts = TextServerManager.get_primary_interface()
  2274. print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
  2275. .. rst-class:: classref-item-separator
  2276. ----
  2277. .. _class_TextServer_method_string_get_word_breaks:
  2278. .. rst-class:: classref-method
  2279. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const|
  2280. 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.
  2281. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2282. ::
  2283. var ts = TextServerManager.get_primary_interface()
  2284. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2285. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2286. .. rst-class:: classref-item-separator
  2287. ----
  2288. .. _class_TextServer_method_string_to_lower:
  2289. .. rst-class:: classref-method
  2290. :ref:`String<class_String>` **string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2291. Returns the string converted to lowercase.
  2292. \ **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>`).
  2293. \ **Note:** The result may be longer or shorter than the original.
  2294. .. rst-class:: classref-item-separator
  2295. ----
  2296. .. _class_TextServer_method_string_to_upper:
  2297. .. rst-class:: classref-method
  2298. :ref:`String<class_String>` **string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2299. Returns the string converted to uppercase.
  2300. \ **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>`).
  2301. \ **Note:** The result may be longer or shorter than the original.
  2302. .. rst-class:: classref-item-separator
  2303. ----
  2304. .. _class_TextServer_method_strip_diacritics:
  2305. .. rst-class:: classref-method
  2306. :ref:`String<class_String>` **strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2307. Strips diacritics from the string.
  2308. \ **Note:** The result may be longer or shorter than the original.
  2309. .. rst-class:: classref-item-separator
  2310. ----
  2311. .. _class_TextServer_method_tag_to_name:
  2312. .. rst-class:: classref-method
  2313. :ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const|
  2314. Converts OpenType tag to readable feature, variation, script, or language name.
  2315. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2316. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2317. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2318. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2319. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2320. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2321. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2322. .. |void| replace:: :abbr:`void (No return value.)`