class_textserver.rst 310 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234
  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:`is_valid_letter<class_TextServer_method_is_valid_letter>`\ (\ unicode\: :ref:`int<class_int>`\ ) |const| |
  287. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |
  289. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
  291. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  293. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :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| |
  295. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>`\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| |
  297. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |const| |
  299. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  301. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :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| |
  303. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | |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>` = {}\ ) |
  305. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :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\ ) |
  307. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :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\ ) |
  309. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | |void| | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  311. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :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| |
  313. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | |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| |
  315. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | |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| |
  317. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :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\ ) |
  319. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  321. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :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| |
  323. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  325. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  327. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  329. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  331. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  333. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :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| |
  335. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :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| |
  337. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :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| |
  339. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  341. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  343. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :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| |
  345. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :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| |
  347. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :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| |
  349. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :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| |
  351. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :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| |
  353. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :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| |
  355. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :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| |
  357. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :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| |
  359. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  361. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  363. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  365. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  367. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  369. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  371. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :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| |
  373. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  375. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :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| |
  377. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  379. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  381. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  383. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  385. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :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, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const| |
  387. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  389. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | :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| |
  391. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :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| |
  393. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
  395. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :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| |
  397. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | :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| |
  399. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | |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\ ) |
  401. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | :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| |
  403. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | :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| |
  405. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | :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\ ) |
  407. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. | |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>`\ ) |
  409. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  410. | |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>`\ ) |
  411. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  412. | |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>`\ ) |
  413. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  414. | |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\ ) |
  415. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  416. | |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\ ) |
  417. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  418. | |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>`\ ) |
  419. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  420. | |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>`\ ) |
  421. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  422. | |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>`\ ) |
  423. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  424. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
  425. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  426. | :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>`\ ) |
  427. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  428. | :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| |
  429. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  430. | :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>`\ ) |
  431. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  432. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  433. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  434. | :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| |
  435. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  436. | :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| |
  437. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  438. | :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| |
  439. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  440. | :ref:`String<class_String>` | :ref:`string_to_title<class_TextServer_method_string_to_title>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
  441. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  442. | :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| |
  443. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  444. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
  445. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  446. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |const| |
  447. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  448. .. rst-class:: classref-section-separator
  449. ----
  450. .. rst-class:: classref-descriptions-group
  451. Enumerations
  452. ------------
  453. .. _enum_TextServer_FontAntialiasing:
  454. .. rst-class:: classref-enumeration
  455. enum **FontAntialiasing**:
  456. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  457. .. rst-class:: classref-enumeration-constant
  458. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  459. Font glyphs are rasterized as 1-bit bitmaps.
  460. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  461. .. rst-class:: classref-enumeration-constant
  462. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  463. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  464. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  465. .. rst-class:: classref-enumeration-constant
  466. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  467. Font glyphs are rasterized for LCD screens.
  468. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  469. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  470. .. rst-class:: classref-item-separator
  471. ----
  472. .. _enum_TextServer_FontLCDSubpixelLayout:
  473. .. rst-class:: classref-enumeration
  474. enum **FontLCDSubpixelLayout**:
  475. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  478. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  479. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  482. Horizontal RGB subpixel layout.
  483. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  486. Horizontal BGR subpixel layout.
  487. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  490. Vertical RGB subpixel layout.
  491. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  494. Vertical BGR subpixel layout.
  495. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  496. .. rst-class:: classref-enumeration-constant
  497. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  498. Represents the size of the :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` enum.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _enum_TextServer_Direction:
  502. .. rst-class:: classref-enumeration
  503. enum **Direction**:
  504. .. _class_TextServer_constant_DIRECTION_AUTO:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  507. Text direction is determined based on contents and current locale.
  508. .. _class_TextServer_constant_DIRECTION_LTR:
  509. .. rst-class:: classref-enumeration-constant
  510. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  511. Text is written from left to right.
  512. .. _class_TextServer_constant_DIRECTION_RTL:
  513. .. rst-class:: classref-enumeration-constant
  514. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  515. Text is written from right to left.
  516. .. _class_TextServer_constant_DIRECTION_INHERITED:
  517. .. rst-class:: classref-enumeration-constant
  518. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  519. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  520. .. rst-class:: classref-item-separator
  521. ----
  522. .. _enum_TextServer_Orientation:
  523. .. rst-class:: classref-enumeration
  524. enum **Orientation**:
  525. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  526. .. rst-class:: classref-enumeration-constant
  527. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  528. Text is written horizontally.
  529. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  530. .. rst-class:: classref-enumeration-constant
  531. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  532. Left to right text is written vertically from top to bottom.
  533. Right to left text is written vertically from bottom to top.
  534. .. rst-class:: classref-item-separator
  535. ----
  536. .. _enum_TextServer_JustificationFlag:
  537. .. rst-class:: classref-enumeration
  538. flags **JustificationFlag**:
  539. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  542. Do not justify text.
  543. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  546. Justify text by adding and removing kashidas.
  547. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  550. Justify text by changing width of the spaces between the words.
  551. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  554. Remove trailing and leading spaces from the justified text.
  555. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  556. .. rst-class:: classref-enumeration-constant
  557. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  558. Only apply justification to the part of the text after the last tab.
  559. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  560. .. rst-class:: classref-enumeration-constant
  561. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  562. Apply justification to the trimmed line with ellipsis.
  563. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  564. .. rst-class:: classref-enumeration-constant
  565. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  566. Do not apply justification to the last line of the paragraph.
  567. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  568. .. rst-class:: classref-enumeration-constant
  569. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  570. 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>`).
  571. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  572. .. rst-class:: classref-enumeration-constant
  573. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  574. 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).
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _enum_TextServer_AutowrapMode:
  578. .. rst-class:: classref-enumeration
  579. enum **AutowrapMode**:
  580. .. _class_TextServer_constant_AUTOWRAP_OFF:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  583. Autowrap is disabled.
  584. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  585. .. rst-class:: classref-enumeration-constant
  586. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  587. 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.
  588. .. _class_TextServer_constant_AUTOWRAP_WORD:
  589. .. rst-class:: classref-enumeration-constant
  590. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  591. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  592. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  593. .. rst-class:: classref-enumeration-constant
  594. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  595. 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.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _enum_TextServer_LineBreakFlag:
  599. .. rst-class:: classref-enumeration
  600. flags **LineBreakFlag**:
  601. .. _class_TextServer_constant_BREAK_NONE:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  604. Do not break the line.
  605. .. _class_TextServer_constant_BREAK_MANDATORY:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  608. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  609. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  612. Break the line between the words.
  613. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  614. .. rst-class:: classref-enumeration-constant
  615. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  616. Break the line between any unconnected graphemes.
  617. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  618. .. rst-class:: classref-enumeration-constant
  619. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  620. 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.
  621. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  622. .. rst-class:: classref-enumeration-constant
  623. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  624. Remove edge spaces from the broken line segments.
  625. .. _class_TextServer_constant_BREAK_TRIM_INDENT:
  626. .. rst-class:: classref-enumeration-constant
  627. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_INDENT** = ``32``
  628. Subtract first line indentation width from all lines after the first one.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _enum_TextServer_VisibleCharactersBehavior:
  632. .. rst-class:: classref-enumeration
  633. enum **VisibleCharactersBehavior**:
  634. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  637. 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.
  638. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  639. .. rst-class:: classref-enumeration-constant
  640. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  641. 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.
  642. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  643. .. rst-class:: classref-enumeration-constant
  644. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  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 or from the right, depending on :ref:`Control.layout_direction<class_Control_property_layout_direction>` value.
  646. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  647. .. rst-class:: classref-enumeration-constant
  648. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  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 left.
  650. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  651. .. rst-class:: classref-enumeration-constant
  652. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  653. 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.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _enum_TextServer_OverrunBehavior:
  657. .. rst-class:: classref-enumeration
  658. enum **OverrunBehavior**:
  659. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  662. No text trimming is performed.
  663. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  664. .. rst-class:: classref-enumeration-constant
  665. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  666. Trims the text per character.
  667. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  668. .. rst-class:: classref-enumeration-constant
  669. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  670. Trims the text per word.
  671. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  672. .. rst-class:: classref-enumeration-constant
  673. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  674. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  675. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  676. .. rst-class:: classref-enumeration-constant
  677. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  678. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  679. .. rst-class:: classref-item-separator
  680. ----
  681. .. _enum_TextServer_TextOverrunFlag:
  682. .. rst-class:: classref-enumeration
  683. flags **TextOverrunFlag**:
  684. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  685. .. rst-class:: classref-enumeration-constant
  686. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  687. No trimming is performed.
  688. .. _class_TextServer_constant_OVERRUN_TRIM:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  691. Trims the text when it exceeds the given width.
  692. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  693. .. rst-class:: classref-enumeration-constant
  694. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  695. Trims the text per word instead of per grapheme.
  696. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  697. .. rst-class:: classref-enumeration-constant
  698. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  699. Determines whether an ellipsis should be added at the end of the text.
  700. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  701. .. rst-class:: classref-enumeration-constant
  702. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  703. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  704. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  705. .. rst-class:: classref-enumeration-constant
  706. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  707. Accounts for the text being justified before attempting to trim it (see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`).
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _enum_TextServer_GraphemeFlag:
  711. .. rst-class:: classref-enumeration
  712. flags **GraphemeFlag**:
  713. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  716. Grapheme is supported by the font, and can be drawn.
  717. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  720. Grapheme is part of right-to-left or bottom-to-top run.
  721. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  724. Grapheme is not part of source text, it was added by justification process.
  725. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  728. Grapheme is whitespace.
  729. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  732. Grapheme is mandatory break point (e.g. ``"\n"``).
  733. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  734. .. rst-class:: classref-enumeration-constant
  735. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  736. Grapheme is optional break point (e.g. space).
  737. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  740. Grapheme is the tabulation character.
  741. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  742. .. rst-class:: classref-enumeration-constant
  743. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  744. Grapheme is kashida.
  745. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  748. Grapheme is punctuation character.
  749. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  750. .. rst-class:: classref-enumeration-constant
  751. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  752. Grapheme is underscore character.
  753. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  754. .. rst-class:: classref-enumeration-constant
  755. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  756. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  757. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  758. .. rst-class:: classref-enumeration-constant
  759. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  760. It is safe to insert a U+0640 before this grapheme for elongation.
  761. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  762. .. rst-class:: classref-enumeration-constant
  763. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  764. Grapheme is an object replacement character for the embedded object.
  765. .. _class_TextServer_constant_GRAPHEME_IS_SOFT_HYPHEN:
  766. .. rst-class:: classref-enumeration-constant
  767. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SOFT_HYPHEN** = ``8192``
  768. Grapheme is a soft hyphen.
  769. .. rst-class:: classref-item-separator
  770. ----
  771. .. _enum_TextServer_Hinting:
  772. .. rst-class:: classref-enumeration
  773. enum **Hinting**:
  774. .. _class_TextServer_constant_HINTING_NONE:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  777. Disables font hinting (smoother but less crisp).
  778. .. _class_TextServer_constant_HINTING_LIGHT:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  781. Use the light font hinting mode.
  782. .. _class_TextServer_constant_HINTING_NORMAL:
  783. .. rst-class:: classref-enumeration-constant
  784. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  785. Use the default font hinting mode (crisper but less smooth).
  786. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  787. .. rst-class:: classref-item-separator
  788. ----
  789. .. _enum_TextServer_SubpixelPositioning:
  790. .. rst-class:: classref-enumeration
  791. enum **SubpixelPositioning**:
  792. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  793. .. rst-class:: classref-enumeration-constant
  794. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  795. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  796. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  797. .. rst-class:: classref-enumeration-constant
  798. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  799. Glyph horizontal position is rounded based on font size.
  800. - 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>`.
  801. - 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>`.
  802. - To the whole pixel size for larger fonts.
  803. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  804. .. rst-class:: classref-enumeration-constant
  805. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  806. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  807. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  808. .. rst-class:: classref-enumeration-constant
  809. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  810. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  811. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  812. .. rst-class:: classref-enumeration-constant
  813. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  814. 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.
  815. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  816. .. rst-class:: classref-enumeration-constant
  817. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  818. 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.
  819. .. rst-class:: classref-item-separator
  820. ----
  821. .. _enum_TextServer_Feature:
  822. .. rst-class:: classref-enumeration
  823. enum **Feature**:
  824. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  827. TextServer supports simple text layouts.
  828. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  831. TextServer supports bidirectional text layouts.
  832. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  833. .. rst-class:: classref-enumeration-constant
  834. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  835. TextServer supports vertical layouts.
  836. .. _class_TextServer_constant_FEATURE_SHAPING:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  839. TextServer supports complex text shaping.
  840. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  841. .. rst-class:: classref-enumeration-constant
  842. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  843. TextServer supports justification using kashidas.
  844. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  845. .. rst-class:: classref-enumeration-constant
  846. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  847. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  848. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  849. .. rst-class:: classref-enumeration-constant
  850. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  851. TextServer supports loading bitmap fonts.
  852. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  853. .. rst-class:: classref-enumeration-constant
  854. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  855. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  856. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  857. .. rst-class:: classref-enumeration-constant
  858. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  859. TextServer supports multichannel signed distance field dynamic font rendering.
  860. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  863. TextServer supports loading system fonts.
  864. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  865. .. rst-class:: classref-enumeration-constant
  866. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  867. TextServer supports variable fonts.
  868. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  869. .. rst-class:: classref-enumeration-constant
  870. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  871. TextServer supports locale dependent and context sensitive case conversion.
  872. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  873. .. rst-class:: classref-enumeration-constant
  874. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  875. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  876. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  877. .. rst-class:: classref-enumeration-constant
  878. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  879. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  880. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  881. .. rst-class:: classref-enumeration-constant
  882. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  883. 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.
  884. .. rst-class:: classref-item-separator
  885. ----
  886. .. _enum_TextServer_ContourPointTag:
  887. .. rst-class:: classref-enumeration
  888. enum **ContourPointTag**:
  889. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  890. .. rst-class:: classref-enumeration-constant
  891. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  892. Contour point is on the curve.
  893. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  894. .. rst-class:: classref-enumeration-constant
  895. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  896. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  897. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  898. .. rst-class:: classref-enumeration-constant
  899. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  900. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  901. .. rst-class:: classref-item-separator
  902. ----
  903. .. _enum_TextServer_SpacingType:
  904. .. rst-class:: classref-enumeration
  905. enum **SpacingType**:
  906. .. _class_TextServer_constant_SPACING_GLYPH:
  907. .. rst-class:: classref-enumeration-constant
  908. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  909. Spacing for each glyph.
  910. .. _class_TextServer_constant_SPACING_SPACE:
  911. .. rst-class:: classref-enumeration-constant
  912. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  913. Spacing for the space character.
  914. .. _class_TextServer_constant_SPACING_TOP:
  915. .. rst-class:: classref-enumeration-constant
  916. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  917. Spacing at the top of the line.
  918. .. _class_TextServer_constant_SPACING_BOTTOM:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  921. Spacing at the bottom of the line.
  922. .. _class_TextServer_constant_SPACING_MAX:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  925. Represents the size of the :ref:`SpacingType<enum_TextServer_SpacingType>` enum.
  926. .. rst-class:: classref-item-separator
  927. ----
  928. .. _enum_TextServer_FontStyle:
  929. .. rst-class:: classref-enumeration
  930. flags **FontStyle**:
  931. .. _class_TextServer_constant_FONT_BOLD:
  932. .. rst-class:: classref-enumeration-constant
  933. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  934. Font is bold.
  935. .. _class_TextServer_constant_FONT_ITALIC:
  936. .. rst-class:: classref-enumeration-constant
  937. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  938. Font is italic or oblique.
  939. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  940. .. rst-class:: classref-enumeration-constant
  941. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  942. Font have fixed-width characters.
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _enum_TextServer_StructuredTextParser:
  946. .. rst-class:: classref-enumeration
  947. enum **StructuredTextParser**:
  948. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  949. .. rst-class:: classref-enumeration-constant
  950. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  951. Use default Unicode BiDi algorithm.
  952. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  953. .. rst-class:: classref-enumeration-constant
  954. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  955. BiDi override for URI.
  956. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  957. .. rst-class:: classref-enumeration-constant
  958. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  959. BiDi override for file path.
  960. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  961. .. rst-class:: classref-enumeration-constant
  962. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  963. BiDi override for email.
  964. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  965. .. rst-class:: classref-enumeration-constant
  966. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  967. BiDi override for lists. Structured text options: list separator :ref:`String<class_String>`.
  968. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  969. .. rst-class:: classref-enumeration-constant
  970. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  971. BiDi override for GDScript.
  972. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  973. .. rst-class:: classref-enumeration-constant
  974. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  975. User defined structured text BiDi override function.
  976. .. rst-class:: classref-item-separator
  977. ----
  978. .. _enum_TextServer_FixedSizeScaleMode:
  979. .. rst-class:: classref-enumeration
  980. enum **FixedSizeScaleMode**:
  981. .. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE:
  982. .. rst-class:: classref-enumeration-constant
  983. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0``
  984. Bitmap font is not scaled.
  985. .. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY:
  986. .. rst-class:: classref-enumeration-constant
  987. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1``
  988. Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
  989. .. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED:
  990. .. rst-class:: classref-enumeration-constant
  991. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2``
  992. Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
  993. .. rst-class:: classref-section-separator
  994. ----
  995. .. rst-class:: classref-descriptions-group
  996. Method Descriptions
  997. -------------------
  998. .. _class_TextServer_method_create_font:
  999. .. rst-class:: classref-method
  1000. :ref:`RID<class_RID>` **create_font**\ (\ )
  1001. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  1002. .. rst-class:: classref-item-separator
  1003. ----
  1004. .. _class_TextServer_method_create_font_linked_variation:
  1005. .. rst-class:: classref-method
  1006. :ref:`RID<class_RID>` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1007. 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.
  1008. .. rst-class:: classref-item-separator
  1009. ----
  1010. .. _class_TextServer_method_create_shaped_text:
  1011. .. rst-class:: classref-method
  1012. :ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  1013. 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.
  1014. \ **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>`).
  1015. \ **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>`).
  1016. .. rst-class:: classref-item-separator
  1017. ----
  1018. .. _class_TextServer_method_draw_hex_code_box:
  1019. .. rst-class:: classref-method
  1020. |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|
  1021. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  1022. .. rst-class:: classref-item-separator
  1023. ----
  1024. .. _class_TextServer_method_font_clear_glyphs:
  1025. .. rst-class:: classref-method
  1026. |void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1027. Removes all rendered glyph information from the cache entry.
  1028. \ **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.
  1029. .. rst-class:: classref-item-separator
  1030. ----
  1031. .. _class_TextServer_method_font_clear_kerning_map:
  1032. .. rst-class:: classref-method
  1033. |void| **font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ )
  1034. Removes all kerning overrides.
  1035. .. rst-class:: classref-item-separator
  1036. ----
  1037. .. _class_TextServer_method_font_clear_size_cache:
  1038. .. rst-class:: classref-method
  1039. |void| **font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1040. Removes all font sizes from the cache entry.
  1041. .. rst-class:: classref-item-separator
  1042. ----
  1043. .. _class_TextServer_method_font_clear_textures:
  1044. .. rst-class:: classref-method
  1045. |void| **font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1046. Removes all textures from font cache entry.
  1047. \ **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.
  1048. .. rst-class:: classref-item-separator
  1049. ----
  1050. .. _class_TextServer_method_font_draw_glyph:
  1051. .. rst-class:: classref-method
  1052. |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|
  1053. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1054. \ **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>`.
  1055. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1056. .. rst-class:: classref-item-separator
  1057. ----
  1058. .. _class_TextServer_method_font_draw_glyph_outline:
  1059. .. rst-class:: classref-method
  1060. |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|
  1061. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1062. \ **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>`.
  1063. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1064. .. rst-class:: classref-item-separator
  1065. ----
  1066. .. _class_TextServer_method_font_get_antialiasing:
  1067. .. rst-class:: classref-method
  1068. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1069. Returns font anti-aliasing mode.
  1070. .. rst-class:: classref-item-separator
  1071. ----
  1072. .. _class_TextServer_method_font_get_ascent:
  1073. .. rst-class:: classref-method
  1074. :ref:`float<class_float>` **font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1075. Returns the font ascent (number of pixels above the baseline).
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_TextServer_method_font_get_baseline_offset:
  1079. .. rst-class:: classref-method
  1080. :ref:`float<class_float>` **font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1081. Returns extra baseline offset (as a fraction of font height).
  1082. .. rst-class:: classref-item-separator
  1083. ----
  1084. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1085. .. rst-class:: classref-method
  1086. :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|
  1087. 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>`.
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_TextServer_method_font_get_descent:
  1091. .. rst-class:: classref-method
  1092. :ref:`float<class_float>` **font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1093. Returns the font descent (number of pixels below the baseline).
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_TextServer_method_font_get_disable_embedded_bitmaps:
  1097. .. rst-class:: classref-method
  1098. :ref:`bool<class_bool>` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1099. Returns whether the font's embedded bitmap loading is disabled.
  1100. .. rst-class:: classref-item-separator
  1101. ----
  1102. .. _class_TextServer_method_font_get_embolden:
  1103. .. rst-class:: classref-method
  1104. :ref:`float<class_float>` **font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1105. Returns font embolden strength.
  1106. .. rst-class:: classref-item-separator
  1107. ----
  1108. .. _class_TextServer_method_font_get_face_count:
  1109. .. rst-class:: classref-method
  1110. :ref:`int<class_int>` **font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1111. Returns number of faces in the TrueType / OpenType collection.
  1112. .. rst-class:: classref-item-separator
  1113. ----
  1114. .. _class_TextServer_method_font_get_face_index:
  1115. .. rst-class:: classref-method
  1116. :ref:`int<class_int>` **font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1117. Returns an active face index in the TrueType / OpenType collection.
  1118. .. rst-class:: classref-item-separator
  1119. ----
  1120. .. _class_TextServer_method_font_get_fixed_size:
  1121. .. rst-class:: classref-method
  1122. :ref:`int<class_int>` **font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1123. Returns bitmap font fixed size.
  1124. .. rst-class:: classref-item-separator
  1125. ----
  1126. .. _class_TextServer_method_font_get_fixed_size_scale_mode:
  1127. .. rst-class:: classref-method
  1128. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1129. Returns bitmap font scaling mode.
  1130. .. rst-class:: classref-item-separator
  1131. ----
  1132. .. _class_TextServer_method_font_get_generate_mipmaps:
  1133. .. rst-class:: classref-method
  1134. :ref:`bool<class_bool>` **font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1135. Returns ``true`` if font texture mipmap generation is enabled.
  1136. .. rst-class:: classref-item-separator
  1137. ----
  1138. .. _class_TextServer_method_font_get_global_oversampling:
  1139. .. rst-class:: classref-method
  1140. :ref:`float<class_float>` **font_get_global_oversampling**\ (\ ) |const|
  1141. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1142. .. rst-class:: classref-item-separator
  1143. ----
  1144. .. _class_TextServer_method_font_get_glyph_advance:
  1145. .. rst-class:: classref-method
  1146. :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|
  1147. Returns glyph advance (offset of the next glyph).
  1148. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1149. .. rst-class:: classref-item-separator
  1150. ----
  1151. .. _class_TextServer_method_font_get_glyph_contours:
  1152. .. rst-class:: classref-method
  1153. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours**\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1154. Returns outline contours of the glyph as a :ref:`Dictionary<class_Dictionary>` with the following contents:
  1155. \ ``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.
  1156. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1157. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1158. .. rst-class:: classref-item-separator
  1159. ----
  1160. .. _class_TextServer_method_font_get_glyph_index:
  1161. .. rst-class:: classref-method
  1162. :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|
  1163. 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>`.
  1164. .. rst-class:: classref-item-separator
  1165. ----
  1166. .. _class_TextServer_method_font_get_glyph_list:
  1167. .. rst-class:: classref-method
  1168. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1169. Returns list of rendered glyphs in the cache entry.
  1170. .. rst-class:: classref-item-separator
  1171. ----
  1172. .. _class_TextServer_method_font_get_glyph_offset:
  1173. .. rst-class:: classref-method
  1174. :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|
  1175. Returns glyph offset from the baseline.
  1176. .. rst-class:: classref-item-separator
  1177. ----
  1178. .. _class_TextServer_method_font_get_glyph_size:
  1179. .. rst-class:: classref-method
  1180. :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|
  1181. Returns size of the glyph.
  1182. .. rst-class:: classref-item-separator
  1183. ----
  1184. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1185. .. rst-class:: classref-method
  1186. :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|
  1187. Returns index of the cache texture containing the glyph.
  1188. .. rst-class:: classref-item-separator
  1189. ----
  1190. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1191. .. rst-class:: classref-method
  1192. :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|
  1193. Returns resource ID of the cache texture containing the glyph.
  1194. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1195. .. rst-class:: classref-item-separator
  1196. ----
  1197. .. _class_TextServer_method_font_get_glyph_texture_size:
  1198. .. rst-class:: classref-method
  1199. :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|
  1200. Returns size of the cache texture containing the glyph.
  1201. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1202. .. rst-class:: classref-item-separator
  1203. ----
  1204. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1205. .. rst-class:: classref-method
  1206. :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|
  1207. Returns rectangle in the cache texture containing the glyph.
  1208. .. rst-class:: classref-item-separator
  1209. ----
  1210. .. _class_TextServer_method_font_get_hinting:
  1211. .. rst-class:: classref-method
  1212. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1213. Returns the font hinting mode. Used by dynamic fonts only.
  1214. .. rst-class:: classref-item-separator
  1215. ----
  1216. .. _class_TextServer_method_font_get_kerning:
  1217. .. rst-class:: classref-method
  1218. :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|
  1219. Returns kerning for the pair of glyphs.
  1220. .. rst-class:: classref-item-separator
  1221. ----
  1222. .. _class_TextServer_method_font_get_kerning_list:
  1223. .. rst-class:: classref-method
  1224. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1225. Returns list of the kerning overrides.
  1226. .. rst-class:: classref-item-separator
  1227. ----
  1228. .. _class_TextServer_method_font_get_language_support_override:
  1229. .. rst-class:: classref-method
  1230. :ref:`bool<class_bool>` **font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1231. Returns ``true`` if support override is enabled for the ``language``.
  1232. .. rst-class:: classref-item-separator
  1233. ----
  1234. .. _class_TextServer_method_font_get_language_support_overrides:
  1235. .. rst-class:: classref-method
  1236. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1237. Returns list of language support overrides.
  1238. .. rst-class:: classref-item-separator
  1239. ----
  1240. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1241. .. rst-class:: classref-method
  1242. :ref:`int<class_int>` **font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1243. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1244. .. rst-class:: classref-item-separator
  1245. ----
  1246. .. _class_TextServer_method_font_get_msdf_size:
  1247. .. rst-class:: classref-method
  1248. :ref:`int<class_int>` **font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1249. Returns source font size used to generate MSDF textures.
  1250. .. rst-class:: classref-item-separator
  1251. ----
  1252. .. _class_TextServer_method_font_get_name:
  1253. .. rst-class:: classref-method
  1254. :ref:`String<class_String>` **font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1255. Returns font family name.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1259. .. rst-class:: classref-method
  1260. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1261. Returns font OpenType feature set override.
  1262. .. rst-class:: classref-item-separator
  1263. ----
  1264. .. _class_TextServer_method_font_get_ot_name_strings:
  1265. .. rst-class:: classref-method
  1266. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1267. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1268. .. rst-class:: classref-item-separator
  1269. ----
  1270. .. _class_TextServer_method_font_get_oversampling:
  1271. .. rst-class:: classref-method
  1272. :ref:`float<class_float>` **font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1273. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_TextServer_method_font_get_scale:
  1277. .. rst-class:: classref-method
  1278. :ref:`float<class_float>` **font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1279. Returns scaling factor of the color bitmap font.
  1280. .. rst-class:: classref-item-separator
  1281. ----
  1282. .. _class_TextServer_method_font_get_script_support_override:
  1283. .. rst-class:: classref-method
  1284. :ref:`bool<class_bool>` **font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1285. Returns ``true`` if support override is enabled for the ``script``.
  1286. .. rst-class:: classref-item-separator
  1287. ----
  1288. .. _class_TextServer_method_font_get_script_support_overrides:
  1289. .. rst-class:: classref-method
  1290. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ )
  1291. Returns list of script support overrides.
  1292. .. rst-class:: classref-item-separator
  1293. ----
  1294. .. _class_TextServer_method_font_get_size_cache_list:
  1295. .. rst-class:: classref-method
  1296. :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1297. Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size.
  1298. .. rst-class:: classref-item-separator
  1299. ----
  1300. .. _class_TextServer_method_font_get_spacing:
  1301. .. rst-class:: classref-method
  1302. :ref:`int<class_int>` **font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  1303. Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  1304. .. rst-class:: classref-item-separator
  1305. ----
  1306. .. _class_TextServer_method_font_get_stretch:
  1307. .. rst-class:: classref-method
  1308. :ref:`int<class_int>` **font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1309. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1310. .. rst-class:: classref-item-separator
  1311. ----
  1312. .. _class_TextServer_method_font_get_style:
  1313. .. rst-class:: classref-method
  1314. |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1315. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1316. .. rst-class:: classref-item-separator
  1317. ----
  1318. .. _class_TextServer_method_font_get_style_name:
  1319. .. rst-class:: classref-method
  1320. :ref:`String<class_String>` **font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1321. Returns font style name.
  1322. .. rst-class:: classref-item-separator
  1323. ----
  1324. .. _class_TextServer_method_font_get_subpixel_positioning:
  1325. .. rst-class:: classref-method
  1326. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1327. Returns font subpixel glyph positioning mode.
  1328. .. rst-class:: classref-item-separator
  1329. ----
  1330. .. _class_TextServer_method_font_get_supported_chars:
  1331. .. rst-class:: classref-method
  1332. :ref:`String<class_String>` **font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1333. Returns a string containing all the characters available in the font.
  1334. .. rst-class:: classref-item-separator
  1335. ----
  1336. .. _class_TextServer_method_font_get_texture_count:
  1337. .. rst-class:: classref-method
  1338. :ref:`int<class_int>` **font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
  1339. Returns number of textures used by font cache entry.
  1340. .. rst-class:: classref-item-separator
  1341. ----
  1342. .. _class_TextServer_method_font_get_texture_image:
  1343. .. rst-class:: classref-method
  1344. :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|
  1345. Returns font cache texture image data.
  1346. .. rst-class:: classref-item-separator
  1347. ----
  1348. .. _class_TextServer_method_font_get_texture_offsets:
  1349. .. rst-class:: classref-method
  1350. :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|
  1351. Returns array containing glyph packing data.
  1352. .. rst-class:: classref-item-separator
  1353. ----
  1354. .. _class_TextServer_method_font_get_transform:
  1355. .. rst-class:: classref-method
  1356. :ref:`Transform2D<class_Transform2D>` **font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1357. Returns 2D transform applied to the font outlines.
  1358. .. rst-class:: classref-item-separator
  1359. ----
  1360. .. _class_TextServer_method_font_get_underline_position:
  1361. .. rst-class:: classref-method
  1362. :ref:`float<class_float>` **font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1363. Returns pixel offset of the underline below the baseline.
  1364. .. rst-class:: classref-item-separator
  1365. ----
  1366. .. _class_TextServer_method_font_get_underline_thickness:
  1367. .. rst-class:: classref-method
  1368. :ref:`float<class_float>` **font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const|
  1369. Returns thickness of the underline in pixels.
  1370. .. rst-class:: classref-item-separator
  1371. ----
  1372. .. _class_TextServer_method_font_get_variation_coordinates:
  1373. .. rst-class:: classref-method
  1374. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1375. 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.
  1376. .. rst-class:: classref-item-separator
  1377. ----
  1378. .. _class_TextServer_method_font_get_weight:
  1379. .. rst-class:: classref-method
  1380. :ref:`int<class_int>` **font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1381. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1382. .. rst-class:: classref-item-separator
  1383. ----
  1384. .. _class_TextServer_method_font_has_char:
  1385. .. rst-class:: classref-method
  1386. :ref:`bool<class_bool>` **font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const|
  1387. Returns ``true`` if a Unicode ``char`` is available in the font.
  1388. .. rst-class:: classref-item-separator
  1389. ----
  1390. .. _class_TextServer_method_font_is_allow_system_fallback:
  1391. .. rst-class:: classref-method
  1392. :ref:`bool<class_bool>` **font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1393. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1394. .. rst-class:: classref-item-separator
  1395. ----
  1396. .. _class_TextServer_method_font_is_force_autohinter:
  1397. .. rst-class:: classref-method
  1398. :ref:`bool<class_bool>` **font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1399. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1400. .. rst-class:: classref-item-separator
  1401. ----
  1402. .. _class_TextServer_method_font_is_language_supported:
  1403. .. rst-class:: classref-method
  1404. :ref:`bool<class_bool>` **font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const|
  1405. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1406. .. rst-class:: classref-item-separator
  1407. ----
  1408. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1409. .. rst-class:: classref-method
  1410. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1411. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1412. .. rst-class:: classref-item-separator
  1413. ----
  1414. .. _class_TextServer_method_font_is_script_supported:
  1415. .. rst-class:: classref-method
  1416. :ref:`bool<class_bool>` **font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const|
  1417. Returns ``true``, if font supports given script (ISO 15924 code).
  1418. .. rst-class:: classref-item-separator
  1419. ----
  1420. .. _class_TextServer_method_font_remove_glyph:
  1421. .. rst-class:: classref-method
  1422. |void| **font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ )
  1423. Removes specified rendered glyph information from the cache entry.
  1424. \ **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.
  1425. .. rst-class:: classref-item-separator
  1426. ----
  1427. .. _class_TextServer_method_font_remove_kerning:
  1428. .. rst-class:: classref-method
  1429. |void| **font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ )
  1430. Removes kerning override for the pair of glyphs.
  1431. .. rst-class:: classref-item-separator
  1432. ----
  1433. .. _class_TextServer_method_font_remove_language_support_override:
  1434. .. rst-class:: classref-method
  1435. |void| **font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ )
  1436. Remove language support override.
  1437. .. rst-class:: classref-item-separator
  1438. ----
  1439. .. _class_TextServer_method_font_remove_script_support_override:
  1440. .. rst-class:: classref-method
  1441. |void| **font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ )
  1442. Removes script support override.
  1443. .. rst-class:: classref-item-separator
  1444. ----
  1445. .. _class_TextServer_method_font_remove_size_cache:
  1446. .. rst-class:: classref-method
  1447. |void| **font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ )
  1448. Removes specified font size from the cache entry.
  1449. .. rst-class:: classref-item-separator
  1450. ----
  1451. .. _class_TextServer_method_font_remove_texture:
  1452. .. rst-class:: classref-method
  1453. |void| **font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ )
  1454. Removes specified texture from the cache entry.
  1455. \ **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>`.
  1456. .. rst-class:: classref-item-separator
  1457. ----
  1458. .. _class_TextServer_method_font_render_glyph:
  1459. .. rst-class:: classref-method
  1460. |void| **font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ )
  1461. Renders specified glyph to the font cache texture.
  1462. .. rst-class:: classref-item-separator
  1463. ----
  1464. .. _class_TextServer_method_font_render_range:
  1465. .. rst-class:: classref-method
  1466. |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>`\ )
  1467. Renders the range of characters to the font cache texture.
  1468. .. rst-class:: classref-item-separator
  1469. ----
  1470. .. _class_TextServer_method_font_set_allow_system_fallback:
  1471. .. rst-class:: classref-method
  1472. |void| **font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ )
  1473. If set to ``true``, system fonts can be automatically used as fallbacks.
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_TextServer_method_font_set_antialiasing:
  1477. .. rst-class:: classref-method
  1478. |void| **font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ )
  1479. Sets font anti-aliasing mode.
  1480. .. rst-class:: classref-item-separator
  1481. ----
  1482. .. _class_TextServer_method_font_set_ascent:
  1483. .. rst-class:: classref-method
  1484. |void| **font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ )
  1485. Sets the font ascent (number of pixels above the baseline).
  1486. .. rst-class:: classref-item-separator
  1487. ----
  1488. .. _class_TextServer_method_font_set_baseline_offset:
  1489. .. rst-class:: classref-method
  1490. |void| **font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ )
  1491. Sets extra baseline offset (as a fraction of font height).
  1492. .. rst-class:: classref-item-separator
  1493. ----
  1494. .. _class_TextServer_method_font_set_data:
  1495. .. rst-class:: classref-method
  1496. |void| **font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ )
  1497. Sets font source data, e.g contents of the dynamic font source file.
  1498. .. rst-class:: classref-item-separator
  1499. ----
  1500. .. _class_TextServer_method_font_set_descent:
  1501. .. rst-class:: classref-method
  1502. |void| **font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ )
  1503. Sets the font descent (number of pixels below the baseline).
  1504. .. rst-class:: classref-item-separator
  1505. ----
  1506. .. _class_TextServer_method_font_set_disable_embedded_bitmaps:
  1507. .. rst-class:: classref-method
  1508. |void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ )
  1509. If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
  1510. .. rst-class:: classref-item-separator
  1511. ----
  1512. .. _class_TextServer_method_font_set_embolden:
  1513. .. rst-class:: classref-method
  1514. |void| **font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ )
  1515. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1516. .. rst-class:: classref-item-separator
  1517. ----
  1518. .. _class_TextServer_method_font_set_face_index:
  1519. .. rst-class:: classref-method
  1520. |void| **font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ )
  1521. Sets an active face index in the TrueType / OpenType collection.
  1522. .. rst-class:: classref-item-separator
  1523. ----
  1524. .. _class_TextServer_method_font_set_fixed_size:
  1525. .. rst-class:: classref-method
  1526. |void| **font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ )
  1527. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1528. .. rst-class:: classref-item-separator
  1529. ----
  1530. .. _class_TextServer_method_font_set_fixed_size_scale_mode:
  1531. .. rst-class:: classref-method
  1532. |void| **font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ )
  1533. Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero.
  1534. .. rst-class:: classref-item-separator
  1535. ----
  1536. .. _class_TextServer_method_font_set_force_autohinter:
  1537. .. rst-class:: classref-method
  1538. |void| **font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ )
  1539. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1540. .. rst-class:: classref-item-separator
  1541. ----
  1542. .. _class_TextServer_method_font_set_generate_mipmaps:
  1543. .. rst-class:: classref-method
  1544. |void| **font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ )
  1545. If set to ``true`` font texture mipmap generation is enabled.
  1546. .. rst-class:: classref-item-separator
  1547. ----
  1548. .. _class_TextServer_method_font_set_global_oversampling:
  1549. .. rst-class:: classref-method
  1550. |void| **font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ )
  1551. Sets oversampling factor, shared by all font in the TextServer.
  1552. \ **Note:** This value can be automatically changed by display server.
  1553. .. rst-class:: classref-item-separator
  1554. ----
  1555. .. _class_TextServer_method_font_set_glyph_advance:
  1556. .. rst-class:: classref-method
  1557. |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>`\ )
  1558. Sets glyph advance (offset of the next glyph).
  1559. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1560. .. rst-class:: classref-item-separator
  1561. ----
  1562. .. _class_TextServer_method_font_set_glyph_offset:
  1563. .. rst-class:: classref-method
  1564. |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>`\ )
  1565. Sets glyph offset from the baseline.
  1566. .. rst-class:: classref-item-separator
  1567. ----
  1568. .. _class_TextServer_method_font_set_glyph_size:
  1569. .. rst-class:: classref-method
  1570. |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>`\ )
  1571. Sets size of the glyph.
  1572. .. rst-class:: classref-item-separator
  1573. ----
  1574. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1575. .. rst-class:: classref-method
  1576. |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>`\ )
  1577. Sets index of the cache texture containing the glyph.
  1578. .. rst-class:: classref-item-separator
  1579. ----
  1580. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1581. .. rst-class:: classref-method
  1582. |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>`\ )
  1583. Sets rectangle in the cache texture containing the glyph.
  1584. .. rst-class:: classref-item-separator
  1585. ----
  1586. .. _class_TextServer_method_font_set_hinting:
  1587. .. rst-class:: classref-method
  1588. |void| **font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ )
  1589. Sets font hinting mode. Used by dynamic fonts only.
  1590. .. rst-class:: classref-item-separator
  1591. ----
  1592. .. _class_TextServer_method_font_set_kerning:
  1593. .. rst-class:: classref-method
  1594. |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>`\ )
  1595. Sets kerning for the pair of glyphs.
  1596. .. rst-class:: classref-item-separator
  1597. ----
  1598. .. _class_TextServer_method_font_set_language_support_override:
  1599. .. rst-class:: classref-method
  1600. |void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1601. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1602. .. rst-class:: classref-item-separator
  1603. ----
  1604. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1605. .. rst-class:: classref-method
  1606. |void| **font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ )
  1607. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1608. .. rst-class:: classref-item-separator
  1609. ----
  1610. .. _class_TextServer_method_font_set_msdf_size:
  1611. .. rst-class:: classref-method
  1612. |void| **font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ )
  1613. Sets source font size used to generate MSDF textures.
  1614. .. rst-class:: classref-item-separator
  1615. ----
  1616. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1617. .. rst-class:: classref-method
  1618. |void| **font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ )
  1619. 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.
  1620. \ **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.
  1621. .. rst-class:: classref-item-separator
  1622. ----
  1623. .. _class_TextServer_method_font_set_name:
  1624. .. rst-class:: classref-method
  1625. |void| **font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1626. Sets the font family name.
  1627. .. rst-class:: classref-item-separator
  1628. ----
  1629. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1630. .. rst-class:: classref-method
  1631. |void| **font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ )
  1632. Sets font OpenType feature set override.
  1633. .. rst-class:: classref-item-separator
  1634. ----
  1635. .. _class_TextServer_method_font_set_oversampling:
  1636. .. rst-class:: classref-method
  1637. |void| **font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ )
  1638. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1639. .. rst-class:: classref-item-separator
  1640. ----
  1641. .. _class_TextServer_method_font_set_scale:
  1642. .. rst-class:: classref-method
  1643. |void| **font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ )
  1644. Sets scaling factor of the color bitmap font.
  1645. .. rst-class:: classref-item-separator
  1646. ----
  1647. .. _class_TextServer_method_font_set_script_support_override:
  1648. .. rst-class:: classref-method
  1649. |void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ )
  1650. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1651. .. rst-class:: classref-item-separator
  1652. ----
  1653. .. _class_TextServer_method_font_set_spacing:
  1654. .. rst-class:: classref-method
  1655. |void| **font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  1656. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  1657. .. rst-class:: classref-item-separator
  1658. ----
  1659. .. _class_TextServer_method_font_set_stretch:
  1660. .. rst-class:: classref-method
  1661. |void| **font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1662. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1663. \ **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.
  1664. .. rst-class:: classref-item-separator
  1665. ----
  1666. .. _class_TextServer_method_font_set_style:
  1667. .. rst-class:: classref-method
  1668. |void| **font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ )
  1669. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1670. \ **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.
  1671. .. rst-class:: classref-item-separator
  1672. ----
  1673. .. _class_TextServer_method_font_set_style_name:
  1674. .. rst-class:: classref-method
  1675. |void| **font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ )
  1676. Sets the font style name.
  1677. .. rst-class:: classref-item-separator
  1678. ----
  1679. .. _class_TextServer_method_font_set_subpixel_positioning:
  1680. .. rst-class:: classref-method
  1681. |void| **font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ )
  1682. Sets font subpixel glyph positioning mode.
  1683. .. rst-class:: classref-item-separator
  1684. ----
  1685. .. _class_TextServer_method_font_set_texture_image:
  1686. .. rst-class:: classref-method
  1687. |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>`\ )
  1688. Sets font cache texture image data.
  1689. .. rst-class:: classref-item-separator
  1690. ----
  1691. .. _class_TextServer_method_font_set_texture_offsets:
  1692. .. rst-class:: classref-method
  1693. |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>`\ )
  1694. Sets array containing glyph packing data.
  1695. .. rst-class:: classref-item-separator
  1696. ----
  1697. .. _class_TextServer_method_font_set_transform:
  1698. .. rst-class:: classref-method
  1699. |void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ )
  1700. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
  1701. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1702. .. rst-class:: classref-item-separator
  1703. ----
  1704. .. _class_TextServer_method_font_set_underline_position:
  1705. .. rst-class:: classref-method
  1706. |void| **font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ )
  1707. Sets pixel offset of the underline below the baseline.
  1708. .. rst-class:: classref-item-separator
  1709. ----
  1710. .. _class_TextServer_method_font_set_underline_thickness:
  1711. .. rst-class:: classref-method
  1712. |void| **font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ )
  1713. Sets thickness of the underline in pixels.
  1714. .. rst-class:: classref-item-separator
  1715. ----
  1716. .. _class_TextServer_method_font_set_variation_coordinates:
  1717. .. rst-class:: classref-method
  1718. |void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ )
  1719. 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.
  1720. .. rst-class:: classref-item-separator
  1721. ----
  1722. .. _class_TextServer_method_font_set_weight:
  1723. .. rst-class:: classref-method
  1724. |void| **font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ )
  1725. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1726. \ **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.
  1727. .. rst-class:: classref-item-separator
  1728. ----
  1729. .. _class_TextServer_method_font_supported_feature_list:
  1730. .. rst-class:: classref-method
  1731. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1732. Returns the dictionary of the supported OpenType features.
  1733. .. rst-class:: classref-item-separator
  1734. ----
  1735. .. _class_TextServer_method_font_supported_variation_list:
  1736. .. rst-class:: classref-method
  1737. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const|
  1738. Returns the dictionary of the supported OpenType variation coordinates.
  1739. .. rst-class:: classref-item-separator
  1740. ----
  1741. .. _class_TextServer_method_format_number:
  1742. .. rst-class:: classref-method
  1743. :ref:`String<class_String>` **format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1744. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1745. If ``language`` is omitted, the active locale will be used.
  1746. .. rst-class:: classref-item-separator
  1747. ----
  1748. .. _class_TextServer_method_free_rid:
  1749. .. rst-class:: classref-method
  1750. |void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1751. Frees an object created by this **TextServer**.
  1752. .. rst-class:: classref-item-separator
  1753. ----
  1754. .. _class_TextServer_method_get_features:
  1755. .. rst-class:: classref-method
  1756. :ref:`int<class_int>` **get_features**\ (\ ) |const|
  1757. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1758. .. rst-class:: classref-item-separator
  1759. ----
  1760. .. _class_TextServer_method_get_hex_code_box_size:
  1761. .. rst-class:: classref-method
  1762. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const|
  1763. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1764. .. rst-class:: classref-item-separator
  1765. ----
  1766. .. _class_TextServer_method_get_name:
  1767. .. rst-class:: classref-method
  1768. :ref:`String<class_String>` **get_name**\ (\ ) |const|
  1769. Returns the name of the server interface.
  1770. .. rst-class:: classref-item-separator
  1771. ----
  1772. .. _class_TextServer_method_get_support_data_filename:
  1773. .. rst-class:: classref-method
  1774. :ref:`String<class_String>` **get_support_data_filename**\ (\ ) |const|
  1775. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1776. .. rst-class:: classref-item-separator
  1777. ----
  1778. .. _class_TextServer_method_get_support_data_info:
  1779. .. rst-class:: classref-method
  1780. :ref:`String<class_String>` **get_support_data_info**\ (\ ) |const|
  1781. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1782. .. rst-class:: classref-item-separator
  1783. ----
  1784. .. _class_TextServer_method_has:
  1785. .. rst-class:: classref-method
  1786. :ref:`bool<class_bool>` **has**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1787. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1788. .. rst-class:: classref-item-separator
  1789. ----
  1790. .. _class_TextServer_method_has_feature:
  1791. .. rst-class:: classref-method
  1792. :ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const|
  1793. Returns ``true`` if the server supports a feature.
  1794. .. rst-class:: classref-item-separator
  1795. ----
  1796. .. _class_TextServer_method_is_confusable:
  1797. .. rst-class:: classref-method
  1798. :ref:`int<class_int>` **is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const|
  1799. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1800. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1801. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1802. .. rst-class:: classref-item-separator
  1803. ----
  1804. .. _class_TextServer_method_is_locale_right_to_left:
  1805. .. rst-class:: classref-method
  1806. :ref:`bool<class_bool>` **is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |const|
  1807. Returns ``true`` if locale is right-to-left.
  1808. .. rst-class:: classref-item-separator
  1809. ----
  1810. .. _class_TextServer_method_is_valid_identifier:
  1811. .. rst-class:: classref-method
  1812. :ref:`bool<class_bool>` **is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  1813. Returns ``true`` if ``string`` is a valid identifier.
  1814. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1815. - Conform to normalization form C.
  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. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1819. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1820. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1821. - May contain Unicode characters of class XID_Continue in the other positions.
  1822. .. rst-class:: classref-item-separator
  1823. ----
  1824. .. _class_TextServer_method_is_valid_letter:
  1825. .. rst-class:: classref-method
  1826. :ref:`bool<class_bool>` **is_valid_letter**\ (\ unicode\: :ref:`int<class_int>`\ ) |const|
  1827. Returns ``true`` if the given code point is a valid letter, i.e. it belongs to the Unicode category "L".
  1828. .. rst-class:: classref-item-separator
  1829. ----
  1830. .. _class_TextServer_method_load_support_data:
  1831. .. rst-class:: classref-method
  1832. :ref:`bool<class_bool>` **load_support_data**\ (\ filename\: :ref:`String<class_String>`\ )
  1833. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1834. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1835. .. rst-class:: classref-item-separator
  1836. ----
  1837. .. _class_TextServer_method_name_to_tag:
  1838. .. rst-class:: classref-method
  1839. :ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const|
  1840. Converts readable feature, variation, script, or language name to OpenType tag.
  1841. .. rst-class:: classref-item-separator
  1842. ----
  1843. .. _class_TextServer_method_parse_number:
  1844. .. rst-class:: classref-method
  1845. :ref:`String<class_String>` **parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  1846. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1847. .. rst-class:: classref-item-separator
  1848. ----
  1849. .. _class_TextServer_method_parse_structured_text:
  1850. .. rst-class:: classref-method
  1851. :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|
  1852. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1853. .. rst-class:: classref-item-separator
  1854. ----
  1855. .. _class_TextServer_method_percent_sign:
  1856. .. rst-class:: classref-method
  1857. :ref:`String<class_String>` **percent_sign**\ (\ language\: :ref:`String<class_String>` = ""\ ) |const|
  1858. Returns percent sign used in the ``language``.
  1859. .. rst-class:: classref-item-separator
  1860. ----
  1861. .. _class_TextServer_method_save_support_data:
  1862. .. rst-class:: classref-method
  1863. :ref:`bool<class_bool>` **save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |const|
  1864. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1865. \ **Note:** This function is used by during project export, to include TextServer database.
  1866. .. rst-class:: classref-item-separator
  1867. ----
  1868. .. _class_TextServer_method_shaped_get_span_count:
  1869. .. rst-class:: classref-method
  1870. :ref:`int<class_int>` **shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1871. 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>`.
  1872. .. rst-class:: classref-item-separator
  1873. ----
  1874. .. _class_TextServer_method_shaped_get_span_meta:
  1875. .. rst-class:: classref-method
  1876. :ref:`Variant<class_Variant>` **shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const|
  1877. Returns text span metadata.
  1878. .. rst-class:: classref-item-separator
  1879. ----
  1880. .. _class_TextServer_method_shaped_set_span_update_font:
  1881. .. rst-class:: classref-method
  1882. |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>` = {}\ )
  1883. Changes text span font, font size, and OpenType features, without changing the text.
  1884. .. rst-class:: classref-item-separator
  1885. ----
  1886. .. _class_TextServer_method_shaped_text_add_object:
  1887. .. rst-class:: classref-method
  1888. :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\ )
  1889. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1890. .. rst-class:: classref-item-separator
  1891. ----
  1892. .. _class_TextServer_method_shaped_text_add_string:
  1893. .. rst-class:: classref-method
  1894. :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\ )
  1895. Adds text span and font to draw it to the text buffer.
  1896. .. rst-class:: classref-item-separator
  1897. ----
  1898. .. _class_TextServer_method_shaped_text_clear:
  1899. .. rst-class:: classref-method
  1900. |void| **shaped_text_clear**\ (\ rid\: :ref:`RID<class_RID>`\ )
  1901. Clears text buffer (removes text and inline objects).
  1902. .. rst-class:: classref-item-separator
  1903. ----
  1904. .. _class_TextServer_method_shaped_text_closest_character_pos:
  1905. .. rst-class:: classref-method
  1906. :ref:`int<class_int>` **shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  1907. Returns composite character position closest to the ``pos``.
  1908. .. rst-class:: classref-item-separator
  1909. ----
  1910. .. _class_TextServer_method_shaped_text_draw:
  1911. .. rst-class:: classref-method
  1912. |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|
  1913. 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).
  1914. .. rst-class:: classref-item-separator
  1915. ----
  1916. .. _class_TextServer_method_shaped_text_draw_outline:
  1917. .. rst-class:: classref-method
  1918. |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|
  1919. 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).
  1920. .. rst-class:: classref-item-separator
  1921. ----
  1922. .. _class_TextServer_method_shaped_text_fit_to_width:
  1923. .. rst-class:: classref-method
  1924. :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\ )
  1925. Adjusts text width to fit to specified width, returns new text width.
  1926. .. rst-class:: classref-item-separator
  1927. ----
  1928. .. _class_TextServer_method_shaped_text_get_ascent:
  1929. .. rst-class:: classref-method
  1930. :ref:`float<class_float>` **shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1931. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1932. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1933. .. rst-class:: classref-item-separator
  1934. ----
  1935. .. _class_TextServer_method_shaped_text_get_carets:
  1936. .. rst-class:: classref-method
  1937. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const|
  1938. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1939. .. rst-class:: classref-item-separator
  1940. ----
  1941. .. _class_TextServer_method_shaped_text_get_character_breaks:
  1942. .. rst-class:: classref-method
  1943. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1944. Returns array of the composite character boundaries.
  1945. .. rst-class:: classref-item-separator
  1946. ----
  1947. .. _class_TextServer_method_shaped_text_get_custom_ellipsis:
  1948. .. rst-class:: classref-method
  1949. :ref:`int<class_int>` **shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1950. Returns ellipsis character used for text clipping.
  1951. .. rst-class:: classref-item-separator
  1952. ----
  1953. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1954. .. rst-class:: classref-method
  1955. :ref:`String<class_String>` **shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1956. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1957. .. rst-class:: classref-item-separator
  1958. ----
  1959. .. _class_TextServer_method_shaped_text_get_descent:
  1960. .. rst-class:: classref-method
  1961. :ref:`float<class_float>` **shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1962. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1963. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1964. .. rst-class:: classref-item-separator
  1965. ----
  1966. .. _class_TextServer_method_shaped_text_get_direction:
  1967. .. rst-class:: classref-method
  1968. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1969. Returns direction of the text.
  1970. .. rst-class:: classref-item-separator
  1971. ----
  1972. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1973. .. rst-class:: classref-method
  1974. :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|
  1975. Returns dominant direction of in the range of text.
  1976. .. rst-class:: classref-item-separator
  1977. ----
  1978. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1979. .. rst-class:: classref-method
  1980. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1981. Returns number of glyphs in the ellipsis.
  1982. .. rst-class:: classref-item-separator
  1983. ----
  1984. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1985. .. rst-class:: classref-method
  1986. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1987. Returns array of the glyphs in the ellipsis.
  1988. .. rst-class:: classref-item-separator
  1989. ----
  1990. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1991. .. rst-class:: classref-method
  1992. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1993. Returns position of the ellipsis.
  1994. .. rst-class:: classref-item-separator
  1995. ----
  1996. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1997. .. rst-class:: classref-method
  1998. :ref:`int<class_int>` **shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  1999. Returns number of glyphs in the buffer.
  2000. .. rst-class:: classref-item-separator
  2001. ----
  2002. .. _class_TextServer_method_shaped_text_get_glyphs:
  2003. .. rst-class:: classref-method
  2004. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2005. Returns an array of glyphs in the visual order.
  2006. .. rst-class:: classref-item-separator
  2007. ----
  2008. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  2009. .. rst-class:: classref-method
  2010. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2011. Returns composite character's bounds as offsets from the start of the line.
  2012. .. rst-class:: classref-item-separator
  2013. ----
  2014. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  2015. .. rst-class:: classref-method
  2016. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2017. Returns direction of the text, inferred by the BiDi algorithm.
  2018. .. rst-class:: classref-item-separator
  2019. ----
  2020. .. _class_TextServer_method_shaped_text_get_line_breaks:
  2021. .. rst-class:: classref-method
  2022. :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|
  2023. Breaks text to the lines and returns character ranges for each line.
  2024. .. rst-class:: classref-item-separator
  2025. ----
  2026. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  2027. .. rst-class:: classref-method
  2028. :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|
  2029. Breaks text to the lines and columns. Returns character ranges for each segment.
  2030. .. rst-class:: classref-item-separator
  2031. ----
  2032. .. _class_TextServer_method_shaped_text_get_object_glyph:
  2033. .. rst-class:: classref-method
  2034. :ref:`int<class_int>` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2035. Returns the glyph index of the inline object.
  2036. .. rst-class:: classref-item-separator
  2037. ----
  2038. .. _class_TextServer_method_shaped_text_get_object_range:
  2039. .. rst-class:: classref-method
  2040. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2041. Returns the character range of the inline object.
  2042. .. rst-class:: classref-item-separator
  2043. ----
  2044. .. _class_TextServer_method_shaped_text_get_object_rect:
  2045. .. rst-class:: classref-method
  2046. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const|
  2047. Returns bounding rectangle of the inline object.
  2048. .. rst-class:: classref-item-separator
  2049. ----
  2050. .. _class_TextServer_method_shaped_text_get_objects:
  2051. .. rst-class:: classref-method
  2052. :ref:`Array<class_Array>` **shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2053. Returns array of inline objects.
  2054. .. rst-class:: classref-item-separator
  2055. ----
  2056. .. _class_TextServer_method_shaped_text_get_orientation:
  2057. .. rst-class:: classref-method
  2058. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2059. Returns text orientation.
  2060. .. rst-class:: classref-item-separator
  2061. ----
  2062. .. _class_TextServer_method_shaped_text_get_parent:
  2063. .. rst-class:: classref-method
  2064. :ref:`RID<class_RID>` **shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2065. Returns the parent buffer from which the substring originates.
  2066. .. rst-class:: classref-item-separator
  2067. ----
  2068. .. _class_TextServer_method_shaped_text_get_preserve_control:
  2069. .. rst-class:: classref-method
  2070. :ref:`bool<class_bool>` **shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2071. Returns ``true`` if text buffer is configured to display control characters.
  2072. .. rst-class:: classref-item-separator
  2073. ----
  2074. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  2075. .. rst-class:: classref-method
  2076. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2077. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  2078. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  2079. .. rst-class:: classref-item-separator
  2080. ----
  2081. .. _class_TextServer_method_shaped_text_get_range:
  2082. .. rst-class:: classref-method
  2083. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2084. Returns substring buffer character range in the parent buffer.
  2085. .. rst-class:: classref-item-separator
  2086. ----
  2087. .. _class_TextServer_method_shaped_text_get_selection:
  2088. .. rst-class:: classref-method
  2089. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const|
  2090. Returns selection rectangles for the specified character range.
  2091. .. rst-class:: classref-item-separator
  2092. ----
  2093. .. _class_TextServer_method_shaped_text_get_size:
  2094. .. rst-class:: classref-method
  2095. :ref:`Vector2<class_Vector2>` **shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2096. Returns size of the text.
  2097. .. rst-class:: classref-item-separator
  2098. ----
  2099. .. _class_TextServer_method_shaped_text_get_spacing:
  2100. .. rst-class:: classref-method
  2101. :ref:`int<class_int>` **shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const|
  2102. Returns extra spacing added between glyphs or lines in pixels.
  2103. .. rst-class:: classref-item-separator
  2104. ----
  2105. .. _class_TextServer_method_shaped_text_get_trim_pos:
  2106. .. rst-class:: classref-method
  2107. :ref:`int<class_int>` **shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2108. Returns the position of the overrun trim.
  2109. .. rst-class:: classref-item-separator
  2110. ----
  2111. .. _class_TextServer_method_shaped_text_get_underline_position:
  2112. .. rst-class:: classref-method
  2113. :ref:`float<class_float>` **shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2114. Returns pixel offset of the underline below the baseline.
  2115. .. rst-class:: classref-item-separator
  2116. ----
  2117. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  2118. .. rst-class:: classref-method
  2119. :ref:`float<class_float>` **shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2120. Returns thickness of the underline.
  2121. .. rst-class:: classref-item-separator
  2122. ----
  2123. .. _class_TextServer_method_shaped_text_get_width:
  2124. .. rst-class:: classref-method
  2125. :ref:`float<class_float>` **shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2126. Returns width (for horizontal layout) or height (for vertical) of the text.
  2127. .. rst-class:: classref-item-separator
  2128. ----
  2129. .. _class_TextServer_method_shaped_text_get_word_breaks:
  2130. .. rst-class:: classref-method
  2131. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const|
  2132. 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>`).
  2133. .. rst-class:: classref-item-separator
  2134. ----
  2135. .. _class_TextServer_method_shaped_text_has_visible_chars:
  2136. .. rst-class:: classref-method
  2137. :ref:`bool<class_bool>` **shaped_text_has_visible_chars**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2138. Returns ``true`` if text buffer contains any visible characters.
  2139. .. rst-class:: classref-item-separator
  2140. ----
  2141. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  2142. .. rst-class:: classref-method
  2143. :ref:`int<class_int>` **shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2144. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  2145. .. rst-class:: classref-item-separator
  2146. ----
  2147. .. _class_TextServer_method_shaped_text_hit_test_position:
  2148. .. rst-class:: classref-method
  2149. :ref:`int<class_int>` **shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const|
  2150. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  2151. .. rst-class:: classref-item-separator
  2152. ----
  2153. .. _class_TextServer_method_shaped_text_is_ready:
  2154. .. rst-class:: classref-method
  2155. :ref:`bool<class_bool>` **shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const|
  2156. Returns ``true`` if buffer is successfully shaped.
  2157. .. rst-class:: classref-item-separator
  2158. ----
  2159. .. _class_TextServer_method_shaped_text_next_character_pos:
  2160. .. rst-class:: classref-method
  2161. :ref:`int<class_int>` **shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2162. Returns composite character end position closest to the ``pos``.
  2163. .. rst-class:: classref-item-separator
  2164. ----
  2165. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2166. .. rst-class:: classref-method
  2167. :ref:`int<class_int>` **shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2168. Returns grapheme end position closest to the ``pos``.
  2169. .. rst-class:: classref-item-separator
  2170. ----
  2171. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2172. .. rst-class:: classref-method
  2173. |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\ )
  2174. Trims text if it exceeds the given width.
  2175. .. rst-class:: classref-item-separator
  2176. ----
  2177. .. _class_TextServer_method_shaped_text_prev_character_pos:
  2178. .. rst-class:: classref-method
  2179. :ref:`int<class_int>` **shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2180. Returns composite character start position closest to the ``pos``.
  2181. .. rst-class:: classref-item-separator
  2182. ----
  2183. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2184. .. rst-class:: classref-method
  2185. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const|
  2186. Returns grapheme start position closest to the ``pos``.
  2187. .. rst-class:: classref-item-separator
  2188. ----
  2189. .. _class_TextServer_method_shaped_text_resize_object:
  2190. .. rst-class:: classref-method
  2191. :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\ )
  2192. Sets new size and alignment of embedded object.
  2193. .. rst-class:: classref-item-separator
  2194. ----
  2195. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2196. .. rst-class:: classref-method
  2197. |void| **shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ )
  2198. Overrides BiDi for the structured text.
  2199. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2200. .. rst-class:: classref-item-separator
  2201. ----
  2202. .. _class_TextServer_method_shaped_text_set_custom_ellipsis:
  2203. .. rst-class:: classref-method
  2204. |void| **shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ )
  2205. Sets ellipsis character used for text clipping.
  2206. .. rst-class:: classref-item-separator
  2207. ----
  2208. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2209. .. rst-class:: classref-method
  2210. |void| **shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ )
  2211. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2212. .. rst-class:: classref-item-separator
  2213. ----
  2214. .. _class_TextServer_method_shaped_text_set_direction:
  2215. .. rst-class:: classref-method
  2216. |void| **shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ )
  2217. 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.
  2218. \ **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>`).
  2219. .. rst-class:: classref-item-separator
  2220. ----
  2221. .. _class_TextServer_method_shaped_text_set_orientation:
  2222. .. rst-class:: classref-method
  2223. |void| **shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ )
  2224. Sets desired text orientation.
  2225. \ **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>`).
  2226. .. rst-class:: classref-item-separator
  2227. ----
  2228. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2229. .. rst-class:: classref-method
  2230. |void| **shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2231. If set to ``true`` text buffer will display control characters.
  2232. .. rst-class:: classref-item-separator
  2233. ----
  2234. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2235. .. rst-class:: classref-method
  2236. |void| **shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ )
  2237. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2238. .. rst-class:: classref-item-separator
  2239. ----
  2240. .. _class_TextServer_method_shaped_text_set_spacing:
  2241. .. rst-class:: classref-method
  2242. |void| **shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ )
  2243. Sets extra spacing added between glyphs or lines in pixels.
  2244. .. rst-class:: classref-item-separator
  2245. ----
  2246. .. _class_TextServer_method_shaped_text_shape:
  2247. .. rst-class:: classref-method
  2248. :ref:`bool<class_bool>` **shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2249. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2250. \ **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.
  2251. .. rst-class:: classref-item-separator
  2252. ----
  2253. .. _class_TextServer_method_shaped_text_sort_logical:
  2254. .. rst-class:: classref-method
  2255. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ )
  2256. Returns text glyphs in the logical order.
  2257. .. rst-class:: classref-item-separator
  2258. ----
  2259. .. _class_TextServer_method_shaped_text_substr:
  2260. .. rst-class:: classref-method
  2261. :ref:`RID<class_RID>` **shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const|
  2262. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2263. .. rst-class:: classref-item-separator
  2264. ----
  2265. .. _class_TextServer_method_shaped_text_tab_align:
  2266. .. rst-class:: classref-method
  2267. :ref:`float<class_float>` **shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
  2268. Aligns shaped text to the given tab-stops.
  2269. .. rst-class:: classref-item-separator
  2270. ----
  2271. .. _class_TextServer_method_spoof_check:
  2272. .. rst-class:: classref-method
  2273. :ref:`bool<class_bool>` **spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2274. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2275. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2276. .. rst-class:: classref-item-separator
  2277. ----
  2278. .. _class_TextServer_method_string_get_character_breaks:
  2279. .. rst-class:: classref-method
  2280. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2281. Returns array of the composite character boundaries.
  2282. ::
  2283. var ts = TextServerManager.get_primary_interface()
  2284. print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
  2285. .. rst-class:: classref-item-separator
  2286. ----
  2287. .. _class_TextServer_method_string_get_word_breaks:
  2288. .. rst-class:: classref-method
  2289. :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|
  2290. 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.
  2291. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2292. ::
  2293. var ts = TextServerManager.get_primary_interface()
  2294. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2295. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2296. .. rst-class:: classref-item-separator
  2297. ----
  2298. .. _class_TextServer_method_string_to_lower:
  2299. .. rst-class:: classref-method
  2300. :ref:`String<class_String>` **string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2301. Returns the string converted to lowercase.
  2302. \ **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>`).
  2303. \ **Note:** The result may be longer or shorter than the original.
  2304. .. rst-class:: classref-item-separator
  2305. ----
  2306. .. _class_TextServer_method_string_to_title:
  2307. .. rst-class:: classref-method
  2308. :ref:`String<class_String>` **string_to_title**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2309. Returns the string converted to title case.
  2310. \ **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>`).
  2311. \ **Note:** The result may be longer or shorter than the original.
  2312. .. rst-class:: classref-item-separator
  2313. ----
  2314. .. _class_TextServer_method_string_to_upper:
  2315. .. rst-class:: classref-method
  2316. :ref:`String<class_String>` **string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const|
  2317. Returns the string converted to uppercase.
  2318. \ **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>`).
  2319. \ **Note:** The result may be longer or shorter than the original.
  2320. .. rst-class:: classref-item-separator
  2321. ----
  2322. .. _class_TextServer_method_strip_diacritics:
  2323. .. rst-class:: classref-method
  2324. :ref:`String<class_String>` **strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |const|
  2325. Strips diacritics from the string.
  2326. \ **Note:** The result may be longer or shorter than the original.
  2327. .. rst-class:: classref-item-separator
  2328. ----
  2329. .. _class_TextServer_method_tag_to_name:
  2330. .. rst-class:: classref-method
  2331. :ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const|
  2332. Converts OpenType tag to readable feature, variation, script, or language name.
  2333. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2334. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2335. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2336. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2337. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2338. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2339. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  2340. .. |void| replace:: :abbr:`void (No return value.)`