class_textserver.rst 287 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129
  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>` **(** :ref:`RID<class_RID>` font_rid **)** |
  25. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  27. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| |
  29. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  31. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
  33. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
  35. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  37. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  39. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  41. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  43. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`font_get_baseline_offset<class_TextServer_method_font_get_baseline_offset>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`font_get_fixed_size_scale_mode<class_TextServer_method_font_get_fixed_size_scale_mode>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`font_render_range<class_TextServer_method_font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`font_set_baseline_offset<class_TextServer_method_font_set_baseline_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` baseline_offset **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`font_set_descent<class_TextServer_method_font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`font_set_fixed_size_scale_mode<class_TextServer_method_font_set_fixed_size_scale_mode>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` fixed_size_scale_mode **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | void | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | void | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | void | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | void | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | void | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | void | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | void | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | void | :ref:`font_set_scale<class_TextServer_method_font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | void | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | void | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | void | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | void | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | void | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | void | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | void | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :ref:`Vector3i[]<class_Vector3i>` | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | void | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | void | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | void | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)** |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const| |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  381. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| |
  383. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  385. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  387. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  389. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)** |
  391. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  393. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| |
  395. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** |
  397. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | void | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |
  399. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | void | :ref:`shaped_text_set_custom_ellipsis<class_TextServer_method_shaped_text_set_custom_ellipsis>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` char **)** |
  401. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | void | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |
  403. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | void | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** |
  405. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | void | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  407. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. | void | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  409. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  410. | void | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |
  411. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  412. | void | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  413. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  414. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  415. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  416. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  417. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  418. | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| |
  419. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  420. | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |
  421. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  422. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
  423. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  424. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  425. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  426. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const| |
  427. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  428. | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  429. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  430. | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| |
  431. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  432. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  433. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  434. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  435. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  436. .. rst-class:: classref-section-separator
  437. ----
  438. .. rst-class:: classref-descriptions-group
  439. Enumerations
  440. ------------
  441. .. _enum_TextServer_FontAntialiasing:
  442. .. rst-class:: classref-enumeration
  443. enum **FontAntialiasing**:
  444. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  445. .. rst-class:: classref-enumeration-constant
  446. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  447. Font glyphs are rasterized as 1-bit bitmaps.
  448. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  449. .. rst-class:: classref-enumeration-constant
  450. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  451. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  452. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  455. Font glyphs are rasterized for LCD screens.
  456. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  457. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _enum_TextServer_FontLCDSubpixelLayout:
  461. .. rst-class:: classref-enumeration
  462. enum **FontLCDSubpixelLayout**:
  463. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  466. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  467. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  470. Horizontal RGB subpixel layout.
  471. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  474. Horizontal BGR subpixel layout.
  475. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  478. Vertical RGB subpixel layout.
  479. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  482. Vertical BGR subpixel layout.
  483. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  486. Represents the size of the :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` enum.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _enum_TextServer_Direction:
  490. .. rst-class:: classref-enumeration
  491. enum **Direction**:
  492. .. _class_TextServer_constant_DIRECTION_AUTO:
  493. .. rst-class:: classref-enumeration-constant
  494. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  495. Text direction is determined based on contents and current locale.
  496. .. _class_TextServer_constant_DIRECTION_LTR:
  497. .. rst-class:: classref-enumeration-constant
  498. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  499. Text is written from left to right.
  500. .. _class_TextServer_constant_DIRECTION_RTL:
  501. .. rst-class:: classref-enumeration-constant
  502. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  503. Text is written from right to left.
  504. .. _class_TextServer_constant_DIRECTION_INHERITED:
  505. .. rst-class:: classref-enumeration-constant
  506. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  507. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  508. .. rst-class:: classref-item-separator
  509. ----
  510. .. _enum_TextServer_Orientation:
  511. .. rst-class:: classref-enumeration
  512. enum **Orientation**:
  513. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  514. .. rst-class:: classref-enumeration-constant
  515. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  516. Text is written horizontally.
  517. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  518. .. rst-class:: classref-enumeration-constant
  519. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  520. Left to right text is written vertically from top to bottom.
  521. Right to left text is written vertically from bottom to top.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _enum_TextServer_JustificationFlag:
  525. .. rst-class:: classref-enumeration
  526. flags **JustificationFlag**:
  527. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  530. Do not justify text.
  531. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  534. Justify text by adding and removing kashidas.
  535. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  538. Justify text by changing width of the spaces between the words.
  539. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  542. Remove trailing and leading spaces from the justified text.
  543. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  546. Only apply justification to the part of the text after the last tab.
  547. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  550. Apply justification to the trimmed line with ellipsis.
  551. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  554. Do not apply justification to the last line of the paragraph.
  555. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  556. .. rst-class:: classref-enumeration-constant
  557. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  558. Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>`).
  559. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  560. .. rst-class:: classref-enumeration-constant
  561. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  562. Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS>` are ignored).
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _enum_TextServer_AutowrapMode:
  566. .. rst-class:: classref-enumeration
  567. enum **AutowrapMode**:
  568. .. _class_TextServer_constant_AUTOWRAP_OFF:
  569. .. rst-class:: classref-enumeration-constant
  570. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  571. Autowrap is disabled.
  572. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  573. .. rst-class:: classref-enumeration-constant
  574. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  575. Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
  576. .. _class_TextServer_constant_AUTOWRAP_WORD:
  577. .. rst-class:: classref-enumeration-constant
  578. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  579. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  580. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  583. Behaves similarly to :ref:`AUTOWRAP_WORD<class_TextServer_constant_AUTOWRAP_WORD>`, but force-breaks a word if that single word does not fit in one line.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _enum_TextServer_LineBreakFlag:
  587. .. rst-class:: classref-enumeration
  588. flags **LineBreakFlag**:
  589. .. _class_TextServer_constant_BREAK_NONE:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  592. Do not break the line.
  593. .. _class_TextServer_constant_BREAK_MANDATORY:
  594. .. rst-class:: classref-enumeration-constant
  595. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  596. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  597. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  600. Break the line between the words.
  601. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  604. Break the line between any unconnected graphemes.
  605. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  608. Should be used only in conjunction with :ref:`BREAK_WORD_BOUND<class_TextServer_constant_BREAK_WORD_BOUND>`, break the line between any unconnected graphemes, if it's impossible to break it between the words.
  609. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  610. .. rst-class:: classref-enumeration-constant
  611. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  612. Remove edge spaces from the broken line segments.
  613. .. rst-class:: classref-item-separator
  614. ----
  615. .. _enum_TextServer_VisibleCharactersBehavior:
  616. .. rst-class:: classref-enumeration
  617. enum **VisibleCharactersBehavior**:
  618. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  621. 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.
  622. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  625. 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.
  626. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  629. 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.
  630. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  633. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the left.
  634. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  635. .. rst-class:: classref-enumeration-constant
  636. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  637. Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` glyphs, starting from the right.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _enum_TextServer_OverrunBehavior:
  641. .. rst-class:: classref-enumeration
  642. enum **OverrunBehavior**:
  643. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  644. .. rst-class:: classref-enumeration-constant
  645. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  646. No text trimming is performed.
  647. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  648. .. rst-class:: classref-enumeration-constant
  649. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  650. Trims the text per character.
  651. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  652. .. rst-class:: classref-enumeration-constant
  653. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  654. Trims the text per word.
  655. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  656. .. rst-class:: classref-enumeration-constant
  657. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  658. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  659. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  662. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  663. .. rst-class:: classref-item-separator
  664. ----
  665. .. _enum_TextServer_TextOverrunFlag:
  666. .. rst-class:: classref-enumeration
  667. flags **TextOverrunFlag**:
  668. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  669. .. rst-class:: classref-enumeration-constant
  670. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  671. No trimming is performed.
  672. .. _class_TextServer_constant_OVERRUN_TRIM:
  673. .. rst-class:: classref-enumeration-constant
  674. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  675. Trims the text when it exceeds the given width.
  676. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  677. .. rst-class:: classref-enumeration-constant
  678. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  679. Trims the text per word instead of per grapheme.
  680. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  681. .. rst-class:: classref-enumeration-constant
  682. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  683. Determines whether an ellipsis should be added at the end of the text.
  684. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  685. .. rst-class:: classref-enumeration-constant
  686. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  687. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  688. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  689. .. rst-class:: classref-enumeration-constant
  690. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  691. Accounts for the text being justified before attempting to trim it (see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`).
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _enum_TextServer_GraphemeFlag:
  695. .. rst-class:: classref-enumeration
  696. flags **GraphemeFlag**:
  697. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  700. Grapheme is supported by the font, and can be drawn.
  701. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  702. .. rst-class:: classref-enumeration-constant
  703. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  704. Grapheme is part of right-to-left or bottom-to-top run.
  705. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  706. .. rst-class:: classref-enumeration-constant
  707. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  708. Grapheme is not part of source text, it was added by justification process.
  709. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  710. .. rst-class:: classref-enumeration-constant
  711. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  712. Grapheme is whitespace.
  713. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  714. .. rst-class:: classref-enumeration-constant
  715. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  716. Grapheme is mandatory break point (e.g. ``"\n"``).
  717. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  718. .. rst-class:: classref-enumeration-constant
  719. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  720. Grapheme is optional break point (e.g. space).
  721. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  722. .. rst-class:: classref-enumeration-constant
  723. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  724. Grapheme is the tabulation character.
  725. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  726. .. rst-class:: classref-enumeration-constant
  727. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  728. Grapheme is kashida.
  729. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  730. .. rst-class:: classref-enumeration-constant
  731. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  732. Grapheme is punctuation character.
  733. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  734. .. rst-class:: classref-enumeration-constant
  735. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  736. Grapheme is underscore character.
  737. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  738. .. rst-class:: classref-enumeration-constant
  739. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  740. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  741. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  742. .. rst-class:: classref-enumeration-constant
  743. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  744. It is safe to insert a U+0640 before this grapheme for elongation.
  745. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  748. Grapheme is an object replacement character for the embedded object.
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _enum_TextServer_Hinting:
  752. .. rst-class:: classref-enumeration
  753. enum **Hinting**:
  754. .. _class_TextServer_constant_HINTING_NONE:
  755. .. rst-class:: classref-enumeration-constant
  756. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  757. Disables font hinting (smoother but less crisp).
  758. .. _class_TextServer_constant_HINTING_LIGHT:
  759. .. rst-class:: classref-enumeration-constant
  760. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  761. Use the light font hinting mode.
  762. .. _class_TextServer_constant_HINTING_NORMAL:
  763. .. rst-class:: classref-enumeration-constant
  764. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  765. Use the default font hinting mode (crisper but less smooth).
  766. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _enum_TextServer_SubpixelPositioning:
  770. .. rst-class:: classref-enumeration
  771. enum **SubpixelPositioning**:
  772. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  773. .. rst-class:: classref-enumeration-constant
  774. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  775. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  776. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  777. .. rst-class:: classref-enumeration-constant
  778. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  779. Glyph horizontal position is rounded based on font size.
  780. - 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>`.
  781. - 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>`.
  782. - To the whole pixel size for larger fonts.
  783. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  784. .. rst-class:: classref-enumeration-constant
  785. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  786. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  787. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  788. .. rst-class:: classref-enumeration-constant
  789. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  790. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  791. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  792. .. rst-class:: classref-enumeration-constant
  793. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  794. 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.
  795. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  796. .. rst-class:: classref-enumeration-constant
  797. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  798. 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.
  799. .. rst-class:: classref-item-separator
  800. ----
  801. .. _enum_TextServer_Feature:
  802. .. rst-class:: classref-enumeration
  803. enum **Feature**:
  804. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  805. .. rst-class:: classref-enumeration-constant
  806. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  807. TextServer supports simple text layouts.
  808. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  809. .. rst-class:: classref-enumeration-constant
  810. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  811. TextServer supports bidirectional text layouts.
  812. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  813. .. rst-class:: classref-enumeration-constant
  814. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  815. TextServer supports vertical layouts.
  816. .. _class_TextServer_constant_FEATURE_SHAPING:
  817. .. rst-class:: classref-enumeration-constant
  818. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  819. TextServer supports complex text shaping.
  820. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  821. .. rst-class:: classref-enumeration-constant
  822. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  823. TextServer supports justification using kashidas.
  824. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  825. .. rst-class:: classref-enumeration-constant
  826. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  827. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  828. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  829. .. rst-class:: classref-enumeration-constant
  830. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  831. TextServer supports loading bitmap fonts.
  832. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  833. .. rst-class:: classref-enumeration-constant
  834. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  835. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  836. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  837. .. rst-class:: classref-enumeration-constant
  838. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  839. TextServer supports multichannel signed distance field dynamic font rendering.
  840. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  841. .. rst-class:: classref-enumeration-constant
  842. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  843. TextServer supports loading system fonts.
  844. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  845. .. rst-class:: classref-enumeration-constant
  846. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  847. TextServer supports variable fonts.
  848. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  849. .. rst-class:: classref-enumeration-constant
  850. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  851. TextServer supports locale dependent and context sensitive case conversion.
  852. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  853. .. rst-class:: classref-enumeration-constant
  854. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  855. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  856. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  857. .. rst-class:: classref-enumeration-constant
  858. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  859. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  860. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  863. 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.
  864. .. rst-class:: classref-item-separator
  865. ----
  866. .. _enum_TextServer_ContourPointTag:
  867. .. rst-class:: classref-enumeration
  868. enum **ContourPointTag**:
  869. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  870. .. rst-class:: classref-enumeration-constant
  871. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  872. Contour point is on the curve.
  873. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  874. .. rst-class:: classref-enumeration-constant
  875. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  876. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  877. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  878. .. rst-class:: classref-enumeration-constant
  879. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  880. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  881. .. rst-class:: classref-item-separator
  882. ----
  883. .. _enum_TextServer_SpacingType:
  884. .. rst-class:: classref-enumeration
  885. enum **SpacingType**:
  886. .. _class_TextServer_constant_SPACING_GLYPH:
  887. .. rst-class:: classref-enumeration-constant
  888. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  889. Spacing for each glyph.
  890. .. _class_TextServer_constant_SPACING_SPACE:
  891. .. rst-class:: classref-enumeration-constant
  892. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  893. Spacing for the space character.
  894. .. _class_TextServer_constant_SPACING_TOP:
  895. .. rst-class:: classref-enumeration-constant
  896. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  897. Spacing at the top of the line.
  898. .. _class_TextServer_constant_SPACING_BOTTOM:
  899. .. rst-class:: classref-enumeration-constant
  900. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  901. Spacing at the bottom of the line.
  902. .. _class_TextServer_constant_SPACING_MAX:
  903. .. rst-class:: classref-enumeration-constant
  904. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  905. Represents the size of the :ref:`SpacingType<enum_TextServer_SpacingType>` enum.
  906. .. rst-class:: classref-item-separator
  907. ----
  908. .. _enum_TextServer_FontStyle:
  909. .. rst-class:: classref-enumeration
  910. flags **FontStyle**:
  911. .. _class_TextServer_constant_FONT_BOLD:
  912. .. rst-class:: classref-enumeration-constant
  913. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  914. Font is bold.
  915. .. _class_TextServer_constant_FONT_ITALIC:
  916. .. rst-class:: classref-enumeration-constant
  917. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  918. Font is italic or oblique.
  919. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  920. .. rst-class:: classref-enumeration-constant
  921. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  922. Font have fixed-width characters.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _enum_TextServer_StructuredTextParser:
  926. .. rst-class:: classref-enumeration
  927. enum **StructuredTextParser**:
  928. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  929. .. rst-class:: classref-enumeration-constant
  930. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  931. Use default Unicode BiDi algorithm.
  932. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  933. .. rst-class:: classref-enumeration-constant
  934. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  935. BiDi override for URI.
  936. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  937. .. rst-class:: classref-enumeration-constant
  938. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  939. BiDi override for file path.
  940. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  941. .. rst-class:: classref-enumeration-constant
  942. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  943. BiDi override for email.
  944. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  945. .. rst-class:: classref-enumeration-constant
  946. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  947. BiDi override for lists. Structured text options: list separator :ref:`String<class_String>`.
  948. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  949. .. rst-class:: classref-enumeration-constant
  950. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  951. BiDi override for GDScript.
  952. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  953. .. rst-class:: classref-enumeration-constant
  954. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  955. User defined structured text BiDi override function.
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _enum_TextServer_FixedSizeScaleMode:
  959. .. rst-class:: classref-enumeration
  960. enum **FixedSizeScaleMode**:
  961. .. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE:
  962. .. rst-class:: classref-enumeration-constant
  963. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0``
  964. Bitmap font is not scaled.
  965. .. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY:
  966. .. rst-class:: classref-enumeration-constant
  967. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1``
  968. Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
  969. .. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED:
  970. .. rst-class:: classref-enumeration-constant
  971. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2``
  972. Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
  973. .. rst-class:: classref-section-separator
  974. ----
  975. .. rst-class:: classref-descriptions-group
  976. Method Descriptions
  977. -------------------
  978. .. _class_TextServer_method_create_font:
  979. .. rst-class:: classref-method
  980. :ref:`RID<class_RID>` **create_font** **(** **)**
  981. Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method.
  982. .. rst-class:: classref-item-separator
  983. ----
  984. .. _class_TextServer_method_create_font_linked_variation:
  985. .. rst-class:: classref-method
  986. :ref:`RID<class_RID>` **create_font_linked_variation** **(** :ref:`RID<class_RID>` font_rid **)**
  987. 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.
  988. .. rst-class:: classref-item-separator
  989. ----
  990. .. _class_TextServer_method_create_shaped_text:
  991. .. rst-class:: classref-method
  992. :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  993. Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
  994. \ **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>`).
  995. \ **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>`).
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_TextServer_method_draw_hex_code_box:
  999. .. rst-class:: classref-method
  1000. void **draw_hex_code_box** **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const|
  1001. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  1002. .. rst-class:: classref-item-separator
  1003. ----
  1004. .. _class_TextServer_method_font_clear_glyphs:
  1005. .. rst-class:: classref-method
  1006. void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1007. Removes all rendered glyphs information from the cache entry.
  1008. \ **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.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_TextServer_method_font_clear_kerning_map:
  1012. .. rst-class:: classref-method
  1013. void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  1014. Removes all kerning overrides.
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_TextServer_method_font_clear_size_cache:
  1018. .. rst-class:: classref-method
  1019. void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  1020. Removes all font sizes from the cache entry.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_TextServer_method_font_clear_textures:
  1024. .. rst-class:: classref-method
  1025. void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1026. Removes all textures from font cache entry.
  1027. \ **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.
  1028. .. rst-class:: classref-item-separator
  1029. ----
  1030. .. _class_TextServer_method_font_draw_glyph:
  1031. .. rst-class:: classref-method
  1032. void **font_draw_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1033. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1034. \ **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>`.
  1035. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1036. .. rst-class:: classref-item-separator
  1037. ----
  1038. .. _class_TextServer_method_font_draw_glyph_outline:
  1039. .. rst-class:: classref-method
  1040. void **font_draw_glyph_outline** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1041. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  1042. \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` or :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`.
  1043. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1044. .. rst-class:: classref-item-separator
  1045. ----
  1046. .. _class_TextServer_method_font_get_antialiasing:
  1047. .. rst-class:: classref-method
  1048. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1049. Returns font anti-aliasing mode.
  1050. .. rst-class:: classref-item-separator
  1051. ----
  1052. .. _class_TextServer_method_font_get_ascent:
  1053. .. rst-class:: classref-method
  1054. :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1055. Returns the font ascent (number of pixels above the baseline).
  1056. .. rst-class:: classref-item-separator
  1057. ----
  1058. .. _class_TextServer_method_font_get_baseline_offset:
  1059. .. rst-class:: classref-method
  1060. :ref:`float<class_float>` **font_get_baseline_offset** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1061. Returns extra baseline offset (as a fraction of font height).
  1062. .. rst-class:: classref-item-separator
  1063. ----
  1064. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1065. .. rst-class:: classref-method
  1066. :ref:`int<class_int>` **font_get_char_from_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const|
  1067. 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>`.
  1068. .. rst-class:: classref-item-separator
  1069. ----
  1070. .. _class_TextServer_method_font_get_descent:
  1071. .. rst-class:: classref-method
  1072. :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1073. Returns the font descent (number of pixels below the baseline).
  1074. .. rst-class:: classref-item-separator
  1075. ----
  1076. .. _class_TextServer_method_font_get_embolden:
  1077. .. rst-class:: classref-method
  1078. :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1079. Returns font embolden strength.
  1080. .. rst-class:: classref-item-separator
  1081. ----
  1082. .. _class_TextServer_method_font_get_face_count:
  1083. .. rst-class:: classref-method
  1084. :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1085. Returns number of faces in the TrueType / OpenType collection.
  1086. .. rst-class:: classref-item-separator
  1087. ----
  1088. .. _class_TextServer_method_font_get_face_index:
  1089. .. rst-class:: classref-method
  1090. :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1091. Returns an active face index in the TrueType / OpenType collection.
  1092. .. rst-class:: classref-item-separator
  1093. ----
  1094. .. _class_TextServer_method_font_get_fixed_size:
  1095. .. rst-class:: classref-method
  1096. :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1097. Returns bitmap font fixed size.
  1098. .. rst-class:: classref-item-separator
  1099. ----
  1100. .. _class_TextServer_method_font_get_fixed_size_scale_mode:
  1101. .. rst-class:: classref-method
  1102. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1103. Returns bitmap font scaling mode.
  1104. .. rst-class:: classref-item-separator
  1105. ----
  1106. .. _class_TextServer_method_font_get_generate_mipmaps:
  1107. .. rst-class:: classref-method
  1108. :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1109. Returns ``true`` if font texture mipmap generation is enabled.
  1110. .. rst-class:: classref-item-separator
  1111. ----
  1112. .. _class_TextServer_method_font_get_global_oversampling:
  1113. .. rst-class:: classref-method
  1114. :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  1115. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1116. .. rst-class:: classref-item-separator
  1117. ----
  1118. .. _class_TextServer_method_font_get_glyph_advance:
  1119. .. rst-class:: classref-method
  1120. :ref:`Vector2<class_Vector2>` **font_get_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const|
  1121. Returns glyph advance (offset of the next glyph).
  1122. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1123. .. rst-class:: classref-item-separator
  1124. ----
  1125. .. _class_TextServer_method_font_get_glyph_contours:
  1126. .. rst-class:: classref-method
  1127. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1128. Returns outline contours of the glyph as a :ref:`Dictionary<class_Dictionary>` with the following contents:
  1129. \ ``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.
  1130. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1131. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1132. .. rst-class:: classref-item-separator
  1133. ----
  1134. .. _class_TextServer_method_font_get_glyph_index:
  1135. .. rst-class:: classref-method
  1136. :ref:`int<class_int>` **font_get_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const|
  1137. 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>`.
  1138. .. rst-class:: classref-item-separator
  1139. ----
  1140. .. _class_TextServer_method_font_get_glyph_list:
  1141. .. rst-class:: classref-method
  1142. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1143. Returns list of rendered glyphs in the cache entry.
  1144. .. rst-class:: classref-item-separator
  1145. ----
  1146. .. _class_TextServer_method_font_get_glyph_offset:
  1147. .. rst-class:: classref-method
  1148. :ref:`Vector2<class_Vector2>` **font_get_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1149. Returns glyph offset from the baseline.
  1150. .. rst-class:: classref-item-separator
  1151. ----
  1152. .. _class_TextServer_method_font_get_glyph_size:
  1153. .. rst-class:: classref-method
  1154. :ref:`Vector2<class_Vector2>` **font_get_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1155. Returns size of the glyph.
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1159. .. rst-class:: classref-method
  1160. :ref:`int<class_int>` **font_get_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1161. Returns index of the cache texture containing the glyph.
  1162. .. rst-class:: classref-item-separator
  1163. ----
  1164. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1165. .. rst-class:: classref-method
  1166. :ref:`RID<class_RID>` **font_get_glyph_texture_rid** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1167. Returns resource ID of the cache texture containing the glyph.
  1168. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1169. .. rst-class:: classref-item-separator
  1170. ----
  1171. .. _class_TextServer_method_font_get_glyph_texture_size:
  1172. .. rst-class:: classref-method
  1173. :ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1174. Returns size of the cache texture containing the glyph.
  1175. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1176. .. rst-class:: classref-item-separator
  1177. ----
  1178. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1179. .. rst-class:: classref-method
  1180. :ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  1181. Returns rectangle in the cache texture containing the glyph.
  1182. .. rst-class:: classref-item-separator
  1183. ----
  1184. .. _class_TextServer_method_font_get_hinting:
  1185. .. rst-class:: classref-method
  1186. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1187. Returns the font hinting mode. Used by dynamic fonts only.
  1188. .. rst-class:: classref-item-separator
  1189. ----
  1190. .. _class_TextServer_method_font_get_kerning:
  1191. .. rst-class:: classref-method
  1192. :ref:`Vector2<class_Vector2>` **font_get_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const|
  1193. Returns kerning for the pair of glyphs.
  1194. .. rst-class:: classref-item-separator
  1195. ----
  1196. .. _class_TextServer_method_font_get_kerning_list:
  1197. .. rst-class:: classref-method
  1198. :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1199. Returns list of the kerning overrides.
  1200. .. rst-class:: classref-item-separator
  1201. ----
  1202. .. _class_TextServer_method_font_get_language_support_override:
  1203. .. rst-class:: classref-method
  1204. :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1205. Returns ``true`` if support override is enabled for the ``language``.
  1206. .. rst-class:: classref-item-separator
  1207. ----
  1208. .. _class_TextServer_method_font_get_language_support_overrides:
  1209. .. rst-class:: classref-method
  1210. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1211. Returns list of language support overrides.
  1212. .. rst-class:: classref-item-separator
  1213. ----
  1214. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1215. .. rst-class:: classref-method
  1216. :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1217. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1218. .. rst-class:: classref-item-separator
  1219. ----
  1220. .. _class_TextServer_method_font_get_msdf_size:
  1221. .. rst-class:: classref-method
  1222. :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1223. Returns source font size used to generate MSDF textures.
  1224. .. rst-class:: classref-item-separator
  1225. ----
  1226. .. _class_TextServer_method_font_get_name:
  1227. .. rst-class:: classref-method
  1228. :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1229. Returns font family name.
  1230. .. rst-class:: classref-item-separator
  1231. ----
  1232. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1233. .. rst-class:: classref-method
  1234. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1235. Returns font OpenType feature set override.
  1236. .. rst-class:: classref-item-separator
  1237. ----
  1238. .. _class_TextServer_method_font_get_ot_name_strings:
  1239. .. rst-class:: classref-method
  1240. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1241. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1242. .. rst-class:: classref-item-separator
  1243. ----
  1244. .. _class_TextServer_method_font_get_oversampling:
  1245. .. rst-class:: classref-method
  1246. :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1247. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1248. .. rst-class:: classref-item-separator
  1249. ----
  1250. .. _class_TextServer_method_font_get_scale:
  1251. .. rst-class:: classref-method
  1252. :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1253. Returns scaling factor of the color bitmap font.
  1254. .. rst-class:: classref-item-separator
  1255. ----
  1256. .. _class_TextServer_method_font_get_script_support_override:
  1257. .. rst-class:: classref-method
  1258. :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1259. Returns ``true`` if support override is enabled for the ``script``.
  1260. .. rst-class:: classref-item-separator
  1261. ----
  1262. .. _class_TextServer_method_font_get_script_support_overrides:
  1263. .. rst-class:: classref-method
  1264. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1265. Returns list of script support overrides.
  1266. .. rst-class:: classref-item-separator
  1267. ----
  1268. .. _class_TextServer_method_font_get_size_cache_list:
  1269. .. rst-class:: classref-method
  1270. :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1271. Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size.
  1272. .. rst-class:: classref-item-separator
  1273. ----
  1274. .. _class_TextServer_method_font_get_spacing:
  1275. .. rst-class:: classref-method
  1276. :ref:`int<class_int>` **font_get_spacing** **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1277. Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  1278. .. rst-class:: classref-item-separator
  1279. ----
  1280. .. _class_TextServer_method_font_get_stretch:
  1281. .. rst-class:: classref-method
  1282. :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1283. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1284. .. rst-class:: classref-item-separator
  1285. ----
  1286. .. _class_TextServer_method_font_get_style:
  1287. .. rst-class:: classref-method
  1288. |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1289. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1290. .. rst-class:: classref-item-separator
  1291. ----
  1292. .. _class_TextServer_method_font_get_style_name:
  1293. .. rst-class:: classref-method
  1294. :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1295. Returns font style name.
  1296. .. rst-class:: classref-item-separator
  1297. ----
  1298. .. _class_TextServer_method_font_get_subpixel_positioning:
  1299. .. rst-class:: classref-method
  1300. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1301. Returns font subpixel glyph positioning mode.
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_TextServer_method_font_get_supported_chars:
  1305. .. rst-class:: classref-method
  1306. :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1307. Returns a string containing all the characters available in the font.
  1308. .. rst-class:: classref-item-separator
  1309. ----
  1310. .. _class_TextServer_method_font_get_texture_count:
  1311. .. rst-class:: classref-method
  1312. :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1313. Returns number of textures used by font cache entry.
  1314. .. rst-class:: classref-item-separator
  1315. ----
  1316. .. _class_TextServer_method_font_get_texture_image:
  1317. .. rst-class:: classref-method
  1318. :ref:`Image<class_Image>` **font_get_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  1319. Returns font cache texture image data.
  1320. .. rst-class:: classref-item-separator
  1321. ----
  1322. .. _class_TextServer_method_font_get_texture_offsets:
  1323. .. rst-class:: classref-method
  1324. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  1325. Returns array containing glyph packing data.
  1326. .. rst-class:: classref-item-separator
  1327. ----
  1328. .. _class_TextServer_method_font_get_transform:
  1329. .. rst-class:: classref-method
  1330. :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1331. Returns 2D transform applied to the font outlines.
  1332. .. rst-class:: classref-item-separator
  1333. ----
  1334. .. _class_TextServer_method_font_get_underline_position:
  1335. .. rst-class:: classref-method
  1336. :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1337. Returns pixel offset of the underline below the baseline.
  1338. .. rst-class:: classref-item-separator
  1339. ----
  1340. .. _class_TextServer_method_font_get_underline_thickness:
  1341. .. rst-class:: classref-method
  1342. :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1343. Returns thickness of the underline in pixels.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_TextServer_method_font_get_variation_coordinates:
  1347. .. rst-class:: classref-method
  1348. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1349. 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.
  1350. .. rst-class:: classref-item-separator
  1351. ----
  1352. .. _class_TextServer_method_font_get_weight:
  1353. .. rst-class:: classref-method
  1354. :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1355. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_TextServer_method_font_has_char:
  1359. .. rst-class:: classref-method
  1360. :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  1361. Returns ``true`` if a Unicode ``char`` is available in the font.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_TextServer_method_font_is_allow_system_fallback:
  1365. .. rst-class:: classref-method
  1366. :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1367. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1368. .. rst-class:: classref-item-separator
  1369. ----
  1370. .. _class_TextServer_method_font_is_force_autohinter:
  1371. .. rst-class:: classref-method
  1372. :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1373. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1374. .. rst-class:: classref-item-separator
  1375. ----
  1376. .. _class_TextServer_method_font_is_language_supported:
  1377. .. rst-class:: classref-method
  1378. :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  1379. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1380. .. rst-class:: classref-item-separator
  1381. ----
  1382. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1383. .. rst-class:: classref-method
  1384. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1385. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1386. .. rst-class:: classref-item-separator
  1387. ----
  1388. .. _class_TextServer_method_font_is_script_supported:
  1389. .. rst-class:: classref-method
  1390. :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  1391. Returns ``true``, if font supports given script (ISO 15924 code).
  1392. .. rst-class:: classref-item-separator
  1393. ----
  1394. .. _class_TextServer_method_font_remove_glyph:
  1395. .. rst-class:: classref-method
  1396. void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  1397. Removes specified rendered glyph information from the cache entry.
  1398. \ **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.
  1399. .. rst-class:: classref-item-separator
  1400. ----
  1401. .. _class_TextServer_method_font_remove_kerning:
  1402. .. rst-class:: classref-method
  1403. void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  1404. Removes kerning override for the pair of glyphs.
  1405. .. rst-class:: classref-item-separator
  1406. ----
  1407. .. _class_TextServer_method_font_remove_language_support_override:
  1408. .. rst-class:: classref-method
  1409. void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1410. Remove language support override.
  1411. .. rst-class:: classref-item-separator
  1412. ----
  1413. .. _class_TextServer_method_font_remove_script_support_override:
  1414. .. rst-class:: classref-method
  1415. void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1416. Removes script support override.
  1417. .. rst-class:: classref-item-separator
  1418. ----
  1419. .. _class_TextServer_method_font_remove_size_cache:
  1420. .. rst-class:: classref-method
  1421. void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1422. Removes specified font size from the cache entry.
  1423. .. rst-class:: classref-item-separator
  1424. ----
  1425. .. _class_TextServer_method_font_remove_texture:
  1426. .. rst-class:: classref-method
  1427. void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  1428. Removes specified texture from the cache entry.
  1429. \ **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>`.
  1430. .. rst-class:: classref-item-separator
  1431. ----
  1432. .. _class_TextServer_method_font_render_glyph:
  1433. .. rst-class:: classref-method
  1434. void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  1435. Renders specified glyph to the font cache texture.
  1436. .. rst-class:: classref-item-separator
  1437. ----
  1438. .. _class_TextServer_method_font_render_range:
  1439. .. rst-class:: classref-method
  1440. void **font_render_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)**
  1441. Renders the range of characters to the font cache texture.
  1442. .. rst-class:: classref-item-separator
  1443. ----
  1444. .. _class_TextServer_method_font_set_allow_system_fallback:
  1445. .. rst-class:: classref-method
  1446. void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
  1447. If set to ``true``, system fonts can be automatically used as fallbacks.
  1448. .. rst-class:: classref-item-separator
  1449. ----
  1450. .. _class_TextServer_method_font_set_antialiasing:
  1451. .. rst-class:: classref-method
  1452. void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
  1453. Sets font anti-aliasing mode.
  1454. .. rst-class:: classref-item-separator
  1455. ----
  1456. .. _class_TextServer_method_font_set_ascent:
  1457. .. rst-class:: classref-method
  1458. void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  1459. Sets the font ascent (number of pixels above the baseline).
  1460. .. rst-class:: classref-item-separator
  1461. ----
  1462. .. _class_TextServer_method_font_set_baseline_offset:
  1463. .. rst-class:: classref-method
  1464. void **font_set_baseline_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` baseline_offset **)**
  1465. Sets extra baseline offset (as a fraction of font height).
  1466. .. rst-class:: classref-item-separator
  1467. ----
  1468. .. _class_TextServer_method_font_set_data:
  1469. .. rst-class:: classref-method
  1470. void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  1471. Sets font source data, e.g contents of the dynamic font source file.
  1472. .. rst-class:: classref-item-separator
  1473. ----
  1474. .. _class_TextServer_method_font_set_descent:
  1475. .. rst-class:: classref-method
  1476. void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  1477. Sets the font descent (number of pixels below the baseline).
  1478. .. rst-class:: classref-item-separator
  1479. ----
  1480. .. _class_TextServer_method_font_set_embolden:
  1481. .. rst-class:: classref-method
  1482. void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  1483. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1484. .. rst-class:: classref-item-separator
  1485. ----
  1486. .. _class_TextServer_method_font_set_face_index:
  1487. .. rst-class:: classref-method
  1488. void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  1489. Sets an active face index in the TrueType / OpenType collection.
  1490. .. rst-class:: classref-item-separator
  1491. ----
  1492. .. _class_TextServer_method_font_set_fixed_size:
  1493. .. rst-class:: classref-method
  1494. void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  1495. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1496. .. rst-class:: classref-item-separator
  1497. ----
  1498. .. _class_TextServer_method_font_set_fixed_size_scale_mode:
  1499. .. rst-class:: classref-method
  1500. void **font_set_fixed_size_scale_mode** **(** :ref:`RID<class_RID>` font_rid, :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` fixed_size_scale_mode **)**
  1501. Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero.
  1502. .. rst-class:: classref-item-separator
  1503. ----
  1504. .. _class_TextServer_method_font_set_force_autohinter:
  1505. .. rst-class:: classref-method
  1506. void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  1507. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1508. .. rst-class:: classref-item-separator
  1509. ----
  1510. .. _class_TextServer_method_font_set_generate_mipmaps:
  1511. .. rst-class:: classref-method
  1512. void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  1513. If set to ``true`` font texture mipmap generation is enabled.
  1514. .. rst-class:: classref-item-separator
  1515. ----
  1516. .. _class_TextServer_method_font_set_global_oversampling:
  1517. .. rst-class:: classref-method
  1518. void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  1519. Sets oversampling factor, shared by all font in the TextServer.
  1520. \ **Note:** This value can be automatically changed by display server.
  1521. .. rst-class:: classref-item-separator
  1522. ----
  1523. .. _class_TextServer_method_font_set_glyph_advance:
  1524. .. rst-class:: classref-method
  1525. void **font_set_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)**
  1526. Sets glyph advance (offset of the next glyph).
  1527. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1528. .. rst-class:: classref-item-separator
  1529. ----
  1530. .. _class_TextServer_method_font_set_glyph_offset:
  1531. .. rst-class:: classref-method
  1532. void **font_set_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)**
  1533. Sets glyph offset from the baseline.
  1534. .. rst-class:: classref-item-separator
  1535. ----
  1536. .. _class_TextServer_method_font_set_glyph_size:
  1537. .. rst-class:: classref-method
  1538. void **font_set_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)**
  1539. Sets size of the glyph.
  1540. .. rst-class:: classref-item-separator
  1541. ----
  1542. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1543. .. rst-class:: classref-method
  1544. void **font_set_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)**
  1545. Sets index of the cache texture containing the glyph.
  1546. .. rst-class:: classref-item-separator
  1547. ----
  1548. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1549. .. rst-class:: classref-method
  1550. void **font_set_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)**
  1551. Sets rectangle in the cache texture containing the glyph.
  1552. .. rst-class:: classref-item-separator
  1553. ----
  1554. .. _class_TextServer_method_font_set_hinting:
  1555. .. rst-class:: classref-method
  1556. void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  1557. Sets font hinting mode. Used by dynamic fonts only.
  1558. .. rst-class:: classref-item-separator
  1559. ----
  1560. .. _class_TextServer_method_font_set_kerning:
  1561. .. rst-class:: classref-method
  1562. void **font_set_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)**
  1563. Sets kerning for the pair of glyphs.
  1564. .. rst-class:: classref-item-separator
  1565. ----
  1566. .. _class_TextServer_method_font_set_language_support_override:
  1567. .. rst-class:: classref-method
  1568. void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  1569. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1570. .. rst-class:: classref-item-separator
  1571. ----
  1572. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1573. .. rst-class:: classref-method
  1574. void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  1575. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1576. .. rst-class:: classref-item-separator
  1577. ----
  1578. .. _class_TextServer_method_font_set_msdf_size:
  1579. .. rst-class:: classref-method
  1580. void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  1581. Sets source font size used to generate MSDF textures.
  1582. .. rst-class:: classref-item-separator
  1583. ----
  1584. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1585. .. rst-class:: classref-method
  1586. void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  1587. 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.
  1588. \ **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.
  1589. .. rst-class:: classref-item-separator
  1590. ----
  1591. .. _class_TextServer_method_font_set_name:
  1592. .. rst-class:: classref-method
  1593. void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1594. Sets the font family name.
  1595. .. rst-class:: classref-item-separator
  1596. ----
  1597. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1598. .. rst-class:: classref-method
  1599. void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  1600. Sets font OpenType feature set override.
  1601. .. rst-class:: classref-item-separator
  1602. ----
  1603. .. _class_TextServer_method_font_set_oversampling:
  1604. .. rst-class:: classref-method
  1605. void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  1606. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1607. .. rst-class:: classref-item-separator
  1608. ----
  1609. .. _class_TextServer_method_font_set_scale:
  1610. .. rst-class:: classref-method
  1611. void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  1612. Sets scaling factor of the color bitmap font.
  1613. .. rst-class:: classref-item-separator
  1614. ----
  1615. .. _class_TextServer_method_font_set_script_support_override:
  1616. .. rst-class:: classref-method
  1617. void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  1618. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1619. .. rst-class:: classref-item-separator
  1620. ----
  1621. .. _class_TextServer_method_font_set_spacing:
  1622. .. rst-class:: classref-method
  1623. void **font_set_spacing** **(** :ref:`RID<class_RID>` font_rid, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  1624. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  1625. .. rst-class:: classref-item-separator
  1626. ----
  1627. .. _class_TextServer_method_font_set_stretch:
  1628. .. rst-class:: classref-method
  1629. void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1630. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1631. \ **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.
  1632. .. rst-class:: classref-item-separator
  1633. ----
  1634. .. _class_TextServer_method_font_set_style:
  1635. .. rst-class:: classref-method
  1636. void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)**
  1637. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1638. \ **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.
  1639. .. rst-class:: classref-item-separator
  1640. ----
  1641. .. _class_TextServer_method_font_set_style_name:
  1642. .. rst-class:: classref-method
  1643. void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1644. Sets the font style name.
  1645. .. rst-class:: classref-item-separator
  1646. ----
  1647. .. _class_TextServer_method_font_set_subpixel_positioning:
  1648. .. rst-class:: classref-method
  1649. void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1650. Sets font subpixel glyph positioning mode.
  1651. .. rst-class:: classref-item-separator
  1652. ----
  1653. .. _class_TextServer_method_font_set_texture_image:
  1654. .. rst-class:: classref-method
  1655. void **font_set_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)**
  1656. Sets font cache texture image data.
  1657. .. rst-class:: classref-item-separator
  1658. ----
  1659. .. _class_TextServer_method_font_set_texture_offsets:
  1660. .. rst-class:: classref-method
  1661. void **font_set_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)**
  1662. Sets array containing glyph packing data.
  1663. .. rst-class:: classref-item-separator
  1664. ----
  1665. .. _class_TextServer_method_font_set_transform:
  1666. .. rst-class:: classref-method
  1667. void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1668. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1669. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1670. .. rst-class:: classref-item-separator
  1671. ----
  1672. .. _class_TextServer_method_font_set_underline_position:
  1673. .. rst-class:: classref-method
  1674. void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1675. Sets pixel offset of the underline below the baseline.
  1676. .. rst-class:: classref-item-separator
  1677. ----
  1678. .. _class_TextServer_method_font_set_underline_thickness:
  1679. .. rst-class:: classref-method
  1680. void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1681. Sets thickness of the underline in pixels.
  1682. .. rst-class:: classref-item-separator
  1683. ----
  1684. .. _class_TextServer_method_font_set_variation_coordinates:
  1685. .. rst-class:: classref-method
  1686. void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1687. 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.
  1688. .. rst-class:: classref-item-separator
  1689. ----
  1690. .. _class_TextServer_method_font_set_weight:
  1691. .. rst-class:: classref-method
  1692. void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1693. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1694. \ **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.
  1695. .. rst-class:: classref-item-separator
  1696. ----
  1697. .. _class_TextServer_method_font_supported_feature_list:
  1698. .. rst-class:: classref-method
  1699. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1700. Returns the dictionary of the supported OpenType features.
  1701. .. rst-class:: classref-item-separator
  1702. ----
  1703. .. _class_TextServer_method_font_supported_variation_list:
  1704. .. rst-class:: classref-method
  1705. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1706. Returns the dictionary of the supported OpenType variation coordinates.
  1707. .. rst-class:: classref-item-separator
  1708. ----
  1709. .. _class_TextServer_method_format_number:
  1710. .. rst-class:: classref-method
  1711. :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1712. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1713. If ``language`` is omitted, the active locale will be used.
  1714. .. rst-class:: classref-item-separator
  1715. ----
  1716. .. _class_TextServer_method_free_rid:
  1717. .. rst-class:: classref-method
  1718. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1719. Frees an object created by this **TextServer**.
  1720. .. rst-class:: classref-item-separator
  1721. ----
  1722. .. _class_TextServer_method_get_features:
  1723. .. rst-class:: classref-method
  1724. :ref:`int<class_int>` **get_features** **(** **)** |const|
  1725. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1726. .. rst-class:: classref-item-separator
  1727. ----
  1728. .. _class_TextServer_method_get_hex_code_box_size:
  1729. .. rst-class:: classref-method
  1730. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1731. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1732. .. rst-class:: classref-item-separator
  1733. ----
  1734. .. _class_TextServer_method_get_name:
  1735. .. rst-class:: classref-method
  1736. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1737. Returns the name of the server interface.
  1738. .. rst-class:: classref-item-separator
  1739. ----
  1740. .. _class_TextServer_method_get_support_data_filename:
  1741. .. rst-class:: classref-method
  1742. :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1743. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1744. .. rst-class:: classref-item-separator
  1745. ----
  1746. .. _class_TextServer_method_get_support_data_info:
  1747. .. rst-class:: classref-method
  1748. :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1749. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1750. .. rst-class:: classref-item-separator
  1751. ----
  1752. .. _class_TextServer_method_has:
  1753. .. rst-class:: classref-method
  1754. :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1755. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1756. .. rst-class:: classref-item-separator
  1757. ----
  1758. .. _class_TextServer_method_has_feature:
  1759. .. rst-class:: classref-method
  1760. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1761. Returns ``true`` if the server supports a feature.
  1762. .. rst-class:: classref-item-separator
  1763. ----
  1764. .. _class_TextServer_method_is_confusable:
  1765. .. rst-class:: classref-method
  1766. :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
  1767. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1768. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1769. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1770. .. rst-class:: classref-item-separator
  1771. ----
  1772. .. _class_TextServer_method_is_locale_right_to_left:
  1773. .. rst-class:: classref-method
  1774. :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1775. Returns ``true`` if locale is right-to-left.
  1776. .. rst-class:: classref-item-separator
  1777. ----
  1778. .. _class_TextServer_method_is_valid_identifier:
  1779. .. rst-class:: classref-method
  1780. :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
  1781. Returns ``true`` if ``string`` is a valid identifier.
  1782. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1783. - Conform to normalization form C.
  1784. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1785. - May contain Unicode characters of class XID_Continue in the other positions.
  1786. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1787. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1788. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1789. - May contain Unicode characters of class XID_Continue in the other positions.
  1790. .. rst-class:: classref-item-separator
  1791. ----
  1792. .. _class_TextServer_method_load_support_data:
  1793. .. rst-class:: classref-method
  1794. :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1795. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1796. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1797. .. rst-class:: classref-item-separator
  1798. ----
  1799. .. _class_TextServer_method_name_to_tag:
  1800. .. rst-class:: classref-method
  1801. :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1802. Converts readable feature, variation, script or language name to OpenType tag.
  1803. .. rst-class:: classref-item-separator
  1804. ----
  1805. .. _class_TextServer_method_parse_number:
  1806. .. rst-class:: classref-method
  1807. :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1808. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1809. .. rst-class:: classref-item-separator
  1810. ----
  1811. .. _class_TextServer_method_parse_structured_text:
  1812. .. rst-class:: classref-method
  1813. :ref:`Vector3i[]<class_Vector3i>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const|
  1814. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1815. .. rst-class:: classref-item-separator
  1816. ----
  1817. .. _class_TextServer_method_percent_sign:
  1818. .. rst-class:: classref-method
  1819. :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1820. Returns percent sign used in the ``language``.
  1821. .. rst-class:: classref-item-separator
  1822. ----
  1823. .. _class_TextServer_method_save_support_data:
  1824. .. rst-class:: classref-method
  1825. :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1826. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1827. \ **Note:** This function is used by during project export, to include TextServer database.
  1828. .. rst-class:: classref-item-separator
  1829. ----
  1830. .. _class_TextServer_method_shaped_get_span_count:
  1831. .. rst-class:: classref-method
  1832. :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1833. 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>`.
  1834. .. rst-class:: classref-item-separator
  1835. ----
  1836. .. _class_TextServer_method_shaped_get_span_meta:
  1837. .. rst-class:: classref-method
  1838. :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1839. Returns text span metadata.
  1840. .. rst-class:: classref-item-separator
  1841. ----
  1842. .. _class_TextServer_method_shaped_set_span_update_font:
  1843. .. rst-class:: classref-method
  1844. void **shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)**
  1845. Changes text span font, font size and OpenType features, without changing the text.
  1846. .. rst-class:: classref-item-separator
  1847. ----
  1848. .. _class_TextServer_method_shaped_text_add_object:
  1849. .. rst-class:: classref-method
  1850. :ref:`bool<class_bool>` **shaped_text_add_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)**
  1851. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1852. .. rst-class:: classref-item-separator
  1853. ----
  1854. .. _class_TextServer_method_shaped_text_add_string:
  1855. .. rst-class:: classref-method
  1856. :ref:`bool<class_bool>` **shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)**
  1857. Adds text span and font to draw it to the text buffer.
  1858. .. rst-class:: classref-item-separator
  1859. ----
  1860. .. _class_TextServer_method_shaped_text_clear:
  1861. .. rst-class:: classref-method
  1862. void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1863. Clears text buffer (removes text and inline objects).
  1864. .. rst-class:: classref-item-separator
  1865. ----
  1866. .. _class_TextServer_method_shaped_text_closest_character_pos:
  1867. .. rst-class:: classref-method
  1868. :ref:`int<class_int>` **shaped_text_closest_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1869. Returns composite character position closest to the ``pos``.
  1870. .. rst-class:: classref-item-separator
  1871. ----
  1872. .. _class_TextServer_method_shaped_text_draw:
  1873. .. rst-class:: classref-method
  1874. void **shaped_text_draw** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1875. 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).
  1876. .. rst-class:: classref-item-separator
  1877. ----
  1878. .. _class_TextServer_method_shaped_text_draw_outline:
  1879. .. rst-class:: classref-method
  1880. void **shaped_text_draw_outline** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const|
  1881. 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).
  1882. .. rst-class:: classref-item-separator
  1883. ----
  1884. .. _class_TextServer_method_shaped_text_fit_to_width:
  1885. .. rst-class:: classref-method
  1886. :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)**
  1887. Adjusts text width to fit to specified width, returns new text width.
  1888. .. rst-class:: classref-item-separator
  1889. ----
  1890. .. _class_TextServer_method_shaped_text_get_ascent:
  1891. .. rst-class:: classref-method
  1892. :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1893. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1894. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1895. .. rst-class:: classref-item-separator
  1896. ----
  1897. .. _class_TextServer_method_shaped_text_get_carets:
  1898. .. rst-class:: classref-method
  1899. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1900. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1901. .. rst-class:: classref-item-separator
  1902. ----
  1903. .. _class_TextServer_method_shaped_text_get_character_breaks:
  1904. .. rst-class:: classref-method
  1905. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1906. Returns array of the composite character boundaries.
  1907. .. rst-class:: classref-item-separator
  1908. ----
  1909. .. _class_TextServer_method_shaped_text_get_custom_ellipsis:
  1910. .. rst-class:: classref-method
  1911. :ref:`int<class_int>` **shaped_text_get_custom_ellipsis** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1912. Returns ellipsis character used for text clipping.
  1913. .. rst-class:: classref-item-separator
  1914. ----
  1915. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1916. .. rst-class:: classref-method
  1917. :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1918. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1919. .. rst-class:: classref-item-separator
  1920. ----
  1921. .. _class_TextServer_method_shaped_text_get_descent:
  1922. .. rst-class:: classref-method
  1923. :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1924. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1925. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1926. .. rst-class:: classref-item-separator
  1927. ----
  1928. .. _class_TextServer_method_shaped_text_get_direction:
  1929. .. rst-class:: classref-method
  1930. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1931. Returns direction of the text.
  1932. .. rst-class:: classref-item-separator
  1933. ----
  1934. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1935. .. rst-class:: classref-method
  1936. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1937. Returns dominant direction of in the range of text.
  1938. .. rst-class:: classref-item-separator
  1939. ----
  1940. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1941. .. rst-class:: classref-method
  1942. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1943. Returns number of glyphs in the ellipsis.
  1944. .. rst-class:: classref-item-separator
  1945. ----
  1946. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1947. .. rst-class:: classref-method
  1948. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1949. Returns array of the glyphs in the ellipsis.
  1950. .. rst-class:: classref-item-separator
  1951. ----
  1952. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1953. .. rst-class:: classref-method
  1954. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1955. Returns position of the ellipsis.
  1956. .. rst-class:: classref-item-separator
  1957. ----
  1958. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1959. .. rst-class:: classref-method
  1960. :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1961. Returns number of glyphs in the buffer.
  1962. .. rst-class:: classref-item-separator
  1963. ----
  1964. .. _class_TextServer_method_shaped_text_get_glyphs:
  1965. .. rst-class:: classref-method
  1966. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1967. Returns an array of glyphs in the visual order.
  1968. .. rst-class:: classref-item-separator
  1969. ----
  1970. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1971. .. rst-class:: classref-method
  1972. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1973. Returns composite character's bounds as offsets from the start of the line.
  1974. .. rst-class:: classref-item-separator
  1975. ----
  1976. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1977. .. rst-class:: classref-method
  1978. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1979. Returns direction of the text, inferred by the BiDi algorithm.
  1980. .. rst-class:: classref-item-separator
  1981. ----
  1982. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1983. .. rst-class:: classref-method
  1984. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const|
  1985. Breaks text to the lines and returns character ranges for each line.
  1986. .. rst-class:: classref-item-separator
  1987. ----
  1988. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1989. .. rst-class:: classref-method
  1990. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const|
  1991. Breaks text to the lines and columns. Returns character ranges for each segment.
  1992. .. rst-class:: classref-item-separator
  1993. ----
  1994. .. _class_TextServer_method_shaped_text_get_object_rect:
  1995. .. rst-class:: classref-method
  1996. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1997. Returns bounding rectangle of the inline object.
  1998. .. rst-class:: classref-item-separator
  1999. ----
  2000. .. _class_TextServer_method_shaped_text_get_objects:
  2001. .. rst-class:: classref-method
  2002. :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2003. Returns array of inline objects.
  2004. .. rst-class:: classref-item-separator
  2005. ----
  2006. .. _class_TextServer_method_shaped_text_get_orientation:
  2007. .. rst-class:: classref-method
  2008. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2009. Returns text orientation.
  2010. .. rst-class:: classref-item-separator
  2011. ----
  2012. .. _class_TextServer_method_shaped_text_get_parent:
  2013. .. rst-class:: classref-method
  2014. :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2015. Returns the parent buffer from which the substring originates.
  2016. .. rst-class:: classref-item-separator
  2017. ----
  2018. .. _class_TextServer_method_shaped_text_get_preserve_control:
  2019. .. rst-class:: classref-method
  2020. :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2021. Returns ``true`` if text buffer is configured to display control characters.
  2022. .. rst-class:: classref-item-separator
  2023. ----
  2024. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  2025. .. rst-class:: classref-method
  2026. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2027. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  2028. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  2029. .. rst-class:: classref-item-separator
  2030. ----
  2031. .. _class_TextServer_method_shaped_text_get_range:
  2032. .. rst-class:: classref-method
  2033. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2034. Returns substring buffer character range in the parent buffer.
  2035. .. rst-class:: classref-item-separator
  2036. ----
  2037. .. _class_TextServer_method_shaped_text_get_selection:
  2038. .. rst-class:: classref-method
  2039. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  2040. Returns selection rectangles for the specified character range.
  2041. .. rst-class:: classref-item-separator
  2042. ----
  2043. .. _class_TextServer_method_shaped_text_get_size:
  2044. .. rst-class:: classref-method
  2045. :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2046. Returns size of the text.
  2047. .. rst-class:: classref-item-separator
  2048. ----
  2049. .. _class_TextServer_method_shaped_text_get_spacing:
  2050. .. rst-class:: classref-method
  2051. :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  2052. Returns extra spacing added between glyphs or lines in pixels.
  2053. .. rst-class:: classref-item-separator
  2054. ----
  2055. .. _class_TextServer_method_shaped_text_get_trim_pos:
  2056. .. rst-class:: classref-method
  2057. :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2058. Returns the position of the overrun trim.
  2059. .. rst-class:: classref-item-separator
  2060. ----
  2061. .. _class_TextServer_method_shaped_text_get_underline_position:
  2062. .. rst-class:: classref-method
  2063. :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2064. Returns pixel offset of the underline below the baseline.
  2065. .. rst-class:: classref-item-separator
  2066. ----
  2067. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  2068. .. rst-class:: classref-method
  2069. :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2070. Returns thickness of the underline.
  2071. .. rst-class:: classref-item-separator
  2072. ----
  2073. .. _class_TextServer_method_shaped_text_get_width:
  2074. .. rst-class:: classref-method
  2075. :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2076. Returns width (for horizontal layout) or height (for vertical) of the text.
  2077. .. rst-class:: classref-item-separator
  2078. ----
  2079. .. _class_TextServer_method_shaped_text_get_word_breaks:
  2080. .. rst-class:: classref-method
  2081. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const|
  2082. 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>`).
  2083. .. rst-class:: classref-item-separator
  2084. ----
  2085. .. _class_TextServer_method_shaped_text_has_visible_chars:
  2086. .. rst-class:: classref-method
  2087. :ref:`bool<class_bool>` **shaped_text_has_visible_chars** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2088. Returns ``true`` if text buffer contains any visible characters.
  2089. .. rst-class:: classref-item-separator
  2090. ----
  2091. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  2092. .. rst-class:: classref-method
  2093. :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  2094. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  2095. .. rst-class:: classref-item-separator
  2096. ----
  2097. .. _class_TextServer_method_shaped_text_hit_test_position:
  2098. .. rst-class:: classref-method
  2099. :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  2100. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  2101. .. rst-class:: classref-item-separator
  2102. ----
  2103. .. _class_TextServer_method_shaped_text_is_ready:
  2104. .. rst-class:: classref-method
  2105. :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  2106. Returns ``true`` if buffer is successfully shaped.
  2107. .. rst-class:: classref-item-separator
  2108. ----
  2109. .. _class_TextServer_method_shaped_text_next_character_pos:
  2110. .. rst-class:: classref-method
  2111. :ref:`int<class_int>` **shaped_text_next_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2112. Returns composite character end position closest to the ``pos``.
  2113. .. rst-class:: classref-item-separator
  2114. ----
  2115. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2116. .. rst-class:: classref-method
  2117. :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2118. Returns grapheme end position closest to the ``pos``.
  2119. .. rst-class:: classref-item-separator
  2120. ----
  2121. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2122. .. rst-class:: classref-method
  2123. void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)**
  2124. Trims text if it exceeds the given width.
  2125. .. rst-class:: classref-item-separator
  2126. ----
  2127. .. _class_TextServer_method_shaped_text_prev_character_pos:
  2128. .. rst-class:: classref-method
  2129. :ref:`int<class_int>` **shaped_text_prev_character_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2130. Returns composite character start position closest to the ``pos``.
  2131. .. rst-class:: classref-item-separator
  2132. ----
  2133. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2134. .. rst-class:: classref-method
  2135. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2136. Returns grapheme start position closest to the ``pos``.
  2137. .. rst-class:: classref-item-separator
  2138. ----
  2139. .. _class_TextServer_method_shaped_text_resize_object:
  2140. .. rst-class:: classref-method
  2141. :ref:`bool<class_bool>` **shaped_text_resize_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)**
  2142. Sets new size and alignment of embedded object.
  2143. .. rst-class:: classref-item-separator
  2144. ----
  2145. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2146. .. rst-class:: classref-method
  2147. void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  2148. Overrides BiDi for the structured text.
  2149. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2150. .. rst-class:: classref-item-separator
  2151. ----
  2152. .. _class_TextServer_method_shaped_text_set_custom_ellipsis:
  2153. .. rst-class:: classref-method
  2154. void **shaped_text_set_custom_ellipsis** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` char **)**
  2155. Sets ellipsis character used for text clipping.
  2156. .. rst-class:: classref-item-separator
  2157. ----
  2158. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2159. .. rst-class:: classref-method
  2160. void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  2161. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2162. .. rst-class:: classref-item-separator
  2163. ----
  2164. .. _class_TextServer_method_shaped_text_set_direction:
  2165. .. rst-class:: classref-method
  2166. void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  2167. 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.
  2168. \ **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>`).
  2169. .. rst-class:: classref-item-separator
  2170. ----
  2171. .. _class_TextServer_method_shaped_text_set_orientation:
  2172. .. rst-class:: classref-method
  2173. void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  2174. Sets desired text orientation.
  2175. \ **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>`).
  2176. .. rst-class:: classref-item-separator
  2177. ----
  2178. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2179. .. rst-class:: classref-method
  2180. void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2181. If set to ``true`` text buffer will display control characters.
  2182. .. rst-class:: classref-item-separator
  2183. ----
  2184. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2185. .. rst-class:: classref-method
  2186. void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2187. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2188. .. rst-class:: classref-item-separator
  2189. ----
  2190. .. _class_TextServer_method_shaped_text_set_spacing:
  2191. .. rst-class:: classref-method
  2192. void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  2193. Sets extra spacing added between glyphs or lines in pixels.
  2194. .. rst-class:: classref-item-separator
  2195. ----
  2196. .. _class_TextServer_method_shaped_text_shape:
  2197. .. rst-class:: classref-method
  2198. :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  2199. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2200. \ **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.
  2201. .. rst-class:: classref-item-separator
  2202. ----
  2203. .. _class_TextServer_method_shaped_text_sort_logical:
  2204. .. rst-class:: classref-method
  2205. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  2206. Returns text glyphs in the logical order.
  2207. .. rst-class:: classref-item-separator
  2208. ----
  2209. .. _class_TextServer_method_shaped_text_substr:
  2210. .. rst-class:: classref-method
  2211. :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  2212. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2213. .. rst-class:: classref-item-separator
  2214. ----
  2215. .. _class_TextServer_method_shaped_text_tab_align:
  2216. .. rst-class:: classref-method
  2217. :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  2218. Aligns shaped text to the given tab-stops.
  2219. .. rst-class:: classref-item-separator
  2220. ----
  2221. .. _class_TextServer_method_spoof_check:
  2222. .. rst-class:: classref-method
  2223. :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
  2224. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2225. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2226. .. rst-class:: classref-item-separator
  2227. ----
  2228. .. _class_TextServer_method_string_get_character_breaks:
  2229. .. rst-class:: classref-method
  2230. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2231. Returns array of the composite character boundaries.
  2232. ::
  2233. var ts = TextServerManager.get_primary_interface()
  2234. print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
  2235. .. rst-class:: classref-item-separator
  2236. ----
  2237. .. _class_TextServer_method_string_get_word_breaks:
  2238. .. rst-class:: classref-method
  2239. :ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const|
  2240. 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.
  2241. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2242. ::
  2243. var ts = TextServerManager.get_primary_interface()
  2244. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2245. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2246. .. rst-class:: classref-item-separator
  2247. ----
  2248. .. _class_TextServer_method_string_to_lower:
  2249. .. rst-class:: classref-method
  2250. :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2251. Returns the string converted to lowercase.
  2252. \ **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>`).
  2253. \ **Note:** The result may be longer or shorter than the original.
  2254. .. rst-class:: classref-item-separator
  2255. ----
  2256. .. _class_TextServer_method_string_to_upper:
  2257. .. rst-class:: classref-method
  2258. :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2259. Returns the string converted to uppercase.
  2260. \ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
  2261. \ **Note:** The result may be longer or shorter than the original.
  2262. .. rst-class:: classref-item-separator
  2263. ----
  2264. .. _class_TextServer_method_strip_diacritics:
  2265. .. rst-class:: classref-method
  2266. :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  2267. Strips diacritics from the string.
  2268. \ **Note:** The result may be longer or shorter than the original.
  2269. .. rst-class:: classref-item-separator
  2270. ----
  2271. .. _class_TextServer_method_tag_to_name:
  2272. .. rst-class:: classref-method
  2273. :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  2274. Converts OpenType tag to readable feature, variation, script or language name.
  2275. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2276. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2277. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2278. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2279. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2280. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  2281. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`