class_textserver.rst 268 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895
  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. Interface for the fonts and complex text layouts.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **TextServer** is the API backend for managing fonts, and rendering complex 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_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |
  25. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | 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| |
  27. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  29. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |
  31. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |
  33. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  35. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | 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| |
  37. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | 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| |
  39. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  41. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :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| |
  43. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :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| |
  45. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :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| |
  47. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  49. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  51. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  53. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  55. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  57. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| |
  59. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :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| |
  61. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :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| |
  63. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :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| |
  65. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :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| |
  67. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :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| |
  69. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :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| |
  71. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :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| |
  73. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :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| |
  75. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :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| |
  77. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :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| |
  79. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  81. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :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| |
  83. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :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| |
  85. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :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 **)** |
  87. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  89. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :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| |
  91. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  93. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  95. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :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| |
  97. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :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| |
  99. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  101. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :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| |
  103. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :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 **)** |
  105. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |
  107. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :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| |
  109. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  111. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  113. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  115. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  117. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  119. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :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| |
  121. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :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| |
  123. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :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| |
  125. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  127. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :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| |
  129. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :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| |
  131. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  133. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  135. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :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| |
  137. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :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| |
  139. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  141. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :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| |
  143. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :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| |
  145. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :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| |
  147. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | 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 **)** |
  149. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | 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 **)** |
  151. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | 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 **)** |
  153. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | 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 **)** |
  155. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |
  157. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | 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 **)** |
  159. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | 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 **)** |
  161. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | 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 **)** |
  163. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | 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 **)** |
  165. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |
  167. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | 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 **)** |
  169. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
  171. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | 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 **)** |
  173. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |
  175. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | 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 **)** |
  177. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | 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 **)** |
  179. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | 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 **)** |
  181. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | 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 **)** |
  183. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |
  185. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | 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 **)** |
  187. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | 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 **)** |
  189. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | 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 **)** |
  191. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | 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 **)** |
  193. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | 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 **)** |
  195. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |
  197. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | 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 **)** |
  199. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | 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 **)** |
  201. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | 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 **)** |
  203. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | 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 **)** |
  205. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | 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 **)** |
  207. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  209. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | 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 **)** |
  211. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |
  213. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | 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 **)** |
  215. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | 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 **)** |
  217. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  219. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)** |
  221. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |
  223. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | 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 **)** |
  225. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | 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 **)** |
  227. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | 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 **)** |
  229. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |
  231. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | 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 **)** |
  233. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | 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 **)** |
  235. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | 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 **)** |
  237. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |
  239. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  240. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  241. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  242. | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| |
  243. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  244. | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  245. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  246. | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  247. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  248. | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| |
  249. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  250. | :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| |
  251. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  252. | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| |
  253. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  254. | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| |
  255. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  256. | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| |
  257. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  258. | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** |
  259. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  260. | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| |
  261. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  262. | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| |
  263. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| |
  265. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| |
  267. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** |
  269. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| |
  271. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| |
  273. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | :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| |
  275. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| |
  277. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  278. | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| |
  279. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  280. | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  281. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  282. | :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| |
  283. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  284. | 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={} **)** |
  285. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  286. | :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 **)** |
  287. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  288. | :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 **)** |
  289. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  290. | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** |
  291. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  292. | 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| |
  293. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  294. | 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| |
  295. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  296. | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` justification_flags=3 **)** |
  297. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  298. | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  299. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  300. | :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| |
  301. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  302. | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  303. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  304. | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  305. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  306. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  307. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  308. | :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| |
  309. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  310. | :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| |
  311. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  312. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  313. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  314. | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  315. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  316. | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  317. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  318. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  319. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  320. | :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| |
  321. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  322. | :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| |
  323. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  324. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  325. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  326. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const| |
  327. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  328. | :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| |
  329. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  330. | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  331. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  332. | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  333. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  334. | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  335. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  336. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  337. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  338. | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  339. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  340. | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  341. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  342. | :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| |
  343. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  344. | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  345. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  346. | :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| |
  347. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  348. | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  349. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  350. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  351. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  352. | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  353. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  354. | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  355. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  356. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const| |
  357. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  358. | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  359. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  360. | :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| |
  361. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  362. | :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| |
  363. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  364. | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| |
  365. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  366. | :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| |
  367. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  368. | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)** |
  369. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  370. | :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| |
  371. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  372. | :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 **)** |
  373. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  374. | 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 **)** |
  375. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  376. | 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 **)** |
  377. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  378. | 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 **)** |
  379. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  380. | 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 **)** |
  381. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  382. | 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 **)** |
  383. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  384. | 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 **)** |
  385. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  386. | 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 **)** |
  387. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  388. | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |
  389. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  390. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |
  391. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  392. | :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| |
  393. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  394. | :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 **)** |
  395. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  396. | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| |
  397. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  398. | :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| |
  399. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  400. | :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| |
  401. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  402. | :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| |
  403. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  404. | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| |
  405. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  406. | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| |
  407. +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  408. .. rst-class:: classref-section-separator
  409. ----
  410. .. rst-class:: classref-descriptions-group
  411. Enumerations
  412. ------------
  413. .. _enum_TextServer_FontAntialiasing:
  414. .. rst-class:: classref-enumeration
  415. enum **FontAntialiasing**:
  416. .. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
  417. .. rst-class:: classref-enumeration-constant
  418. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
  419. Font glyphs are rasterized as 1-bit bitmaps.
  420. .. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
  421. .. rst-class:: classref-enumeration-constant
  422. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
  423. Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
  424. .. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
  425. .. rst-class:: classref-enumeration-constant
  426. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
  427. Font glyphs are rasterized for LCD screens.
  428. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings.
  429. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
  430. .. rst-class:: classref-item-separator
  431. ----
  432. .. _enum_TextServer_FontLCDSubpixelLayout:
  433. .. rst-class:: classref-enumeration
  434. enum **FontLCDSubpixelLayout**:
  435. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
  436. .. rst-class:: classref-enumeration-constant
  437. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
  438. Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
  439. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
  440. .. rst-class:: classref-enumeration-constant
  441. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
  442. Horizontal RGB subpixel layout.
  443. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
  444. .. rst-class:: classref-enumeration-constant
  445. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
  446. Horizontal BGR subpixel layout.
  447. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
  448. .. rst-class:: classref-enumeration-constant
  449. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
  450. Vertical RGB subpixel layout.
  451. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
  452. .. rst-class:: classref-enumeration-constant
  453. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
  454. Vertical BGR subpixel layout.
  455. .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _enum_TextServer_Direction:
  461. .. rst-class:: classref-enumeration
  462. enum **Direction**:
  463. .. _class_TextServer_constant_DIRECTION_AUTO:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
  466. Text direction is determined based on contents and current locale.
  467. .. _class_TextServer_constant_DIRECTION_LTR:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
  470. Text is written from left to right.
  471. .. _class_TextServer_constant_DIRECTION_RTL:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
  474. Text is written from right to left.
  475. .. _class_TextServer_constant_DIRECTION_INHERITED:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
  478. Text writing direction is the same as base string writing direction. Used for BiDi override only.
  479. .. rst-class:: classref-item-separator
  480. ----
  481. .. _enum_TextServer_Orientation:
  482. .. rst-class:: classref-enumeration
  483. enum **Orientation**:
  484. .. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
  485. .. rst-class:: classref-enumeration-constant
  486. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
  487. Text is written horizontally.
  488. .. _class_TextServer_constant_ORIENTATION_VERTICAL:
  489. .. rst-class:: classref-enumeration-constant
  490. :ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
  491. Left to right text is written vertically from top to bottom.
  492. Right to left text is written vertically from bottom to top.
  493. .. rst-class:: classref-item-separator
  494. ----
  495. .. _enum_TextServer_JustificationFlag:
  496. .. rst-class:: classref-enumeration
  497. flags **JustificationFlag**:
  498. .. _class_TextServer_constant_JUSTIFICATION_NONE:
  499. .. rst-class:: classref-enumeration-constant
  500. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
  501. Do not justify text.
  502. .. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
  503. .. rst-class:: classref-enumeration-constant
  504. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
  505. Justify text by adding and removing kashidas.
  506. .. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
  507. .. rst-class:: classref-enumeration-constant
  508. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
  509. Justify text by changing width of the spaces between the words.
  510. .. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
  511. .. rst-class:: classref-enumeration-constant
  512. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
  513. Remove trailing and leading spaces from the justified text.
  514. .. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
  515. .. rst-class:: classref-enumeration-constant
  516. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
  517. Only apply justification to the part of the text after the last tab.
  518. .. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
  519. .. rst-class:: classref-enumeration-constant
  520. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
  521. Apply justification to the trimmed line with ellipsis.
  522. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
  523. .. rst-class:: classref-enumeration-constant
  524. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
  525. Do not apply justification to the last line of the paragraph.
  526. .. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
  529. 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>`).
  530. .. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
  533. 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).
  534. .. rst-class:: classref-item-separator
  535. ----
  536. .. _enum_TextServer_AutowrapMode:
  537. .. rst-class:: classref-enumeration
  538. enum **AutowrapMode**:
  539. .. _class_TextServer_constant_AUTOWRAP_OFF:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
  542. Autowrap is disabled.
  543. .. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
  546. 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.
  547. .. _class_TextServer_constant_AUTOWRAP_WORD:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
  550. Wraps the text inside the node's bounding rectangle by soft-breaking between words.
  551. .. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
  552. .. rst-class:: classref-enumeration-constant
  553. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
  554. 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.
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _enum_TextServer_LineBreakFlag:
  558. .. rst-class:: classref-enumeration
  559. flags **LineBreakFlag**:
  560. .. _class_TextServer_constant_BREAK_NONE:
  561. .. rst-class:: classref-enumeration-constant
  562. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
  563. Do not break the line.
  564. .. _class_TextServer_constant_BREAK_MANDATORY:
  565. .. rst-class:: classref-enumeration-constant
  566. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
  567. Break the line at the line mandatory break characters (e.g. ``"\n"``).
  568. .. _class_TextServer_constant_BREAK_WORD_BOUND:
  569. .. rst-class:: classref-enumeration-constant
  570. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
  571. Break the line between the words.
  572. .. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
  573. .. rst-class:: classref-enumeration-constant
  574. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
  575. Break the line between any unconnected graphemes.
  576. .. _class_TextServer_constant_BREAK_ADAPTIVE:
  577. .. rst-class:: classref-enumeration-constant
  578. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
  579. 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.
  580. .. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
  581. .. rst-class:: classref-enumeration-constant
  582. :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
  583. Remove edge spaces from the broken line segments.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _enum_TextServer_VisibleCharactersBehavior:
  587. .. rst-class:: classref-enumeration
  588. enum **VisibleCharactersBehavior**:
  589. .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
  590. .. rst-class:: classref-enumeration-constant
  591. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
  592. 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.
  593. .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
  594. .. rst-class:: classref-enumeration-constant
  595. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
  596. 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.
  597. .. _class_TextServer_constant_VC_GLYPHS_AUTO:
  598. .. rst-class:: classref-enumeration-constant
  599. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
  600. 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.
  601. .. _class_TextServer_constant_VC_GLYPHS_LTR:
  602. .. rst-class:: classref-enumeration-constant
  603. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
  604. 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.
  605. .. _class_TextServer_constant_VC_GLYPHS_RTL:
  606. .. rst-class:: classref-enumeration-constant
  607. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
  608. 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.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _enum_TextServer_OverrunBehavior:
  612. .. rst-class:: classref-enumeration
  613. enum **OverrunBehavior**:
  614. .. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
  615. .. rst-class:: classref-enumeration-constant
  616. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
  617. No text trimming is performed.
  618. .. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
  619. .. rst-class:: classref-enumeration-constant
  620. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
  621. Trims the text per character.
  622. .. _class_TextServer_constant_OVERRUN_TRIM_WORD:
  623. .. rst-class:: classref-enumeration-constant
  624. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
  625. Trims the text per word.
  626. .. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
  627. .. rst-class:: classref-enumeration-constant
  628. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
  629. Trims the text per character and adds an ellipsis to indicate that parts are hidden.
  630. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
  631. .. rst-class:: classref-enumeration-constant
  632. :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
  633. Trims the text per word and adds an ellipsis to indicate that parts are hidden.
  634. .. rst-class:: classref-item-separator
  635. ----
  636. .. _enum_TextServer_TextOverrunFlag:
  637. .. rst-class:: classref-enumeration
  638. flags **TextOverrunFlag**:
  639. .. _class_TextServer_constant_OVERRUN_NO_TRIM:
  640. .. rst-class:: classref-enumeration-constant
  641. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
  642. No trimming is performed.
  643. .. _class_TextServer_constant_OVERRUN_TRIM:
  644. .. rst-class:: classref-enumeration-constant
  645. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
  646. Trims the text when it exceeds the given width.
  647. .. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
  648. .. rst-class:: classref-enumeration-constant
  649. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
  650. Trims the text per word instead of per grapheme.
  651. .. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
  652. .. rst-class:: classref-enumeration-constant
  653. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
  654. Determines whether an ellipsis should be added at the end of the text.
  655. .. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
  656. .. rst-class:: classref-enumeration-constant
  657. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
  658. Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
  659. .. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
  660. .. rst-class:: classref-enumeration-constant
  661. :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _enum_TextServer_GraphemeFlag:
  665. .. rst-class:: classref-enumeration
  666. flags **GraphemeFlag**:
  667. .. _class_TextServer_constant_GRAPHEME_IS_VALID:
  668. .. rst-class:: classref-enumeration-constant
  669. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
  670. Grapheme is supported by the font, and can be drawn.
  671. .. _class_TextServer_constant_GRAPHEME_IS_RTL:
  672. .. rst-class:: classref-enumeration-constant
  673. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
  674. Grapheme is part of right-to-left or bottom-to-top run.
  675. .. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
  676. .. rst-class:: classref-enumeration-constant
  677. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
  678. Grapheme is not part of source text, it was added by justification process.
  679. .. _class_TextServer_constant_GRAPHEME_IS_SPACE:
  680. .. rst-class:: classref-enumeration-constant
  681. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
  682. Grapheme is whitespace.
  683. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
  684. .. rst-class:: classref-enumeration-constant
  685. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
  686. Grapheme is mandatory break point (e.g. ``"\n"``).
  687. .. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
  688. .. rst-class:: classref-enumeration-constant
  689. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
  690. Grapheme is optional break point (e.g. space).
  691. .. _class_TextServer_constant_GRAPHEME_IS_TAB:
  692. .. rst-class:: classref-enumeration-constant
  693. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
  694. Grapheme is the tabulation character.
  695. .. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
  696. .. rst-class:: classref-enumeration-constant
  697. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
  698. Grapheme is kashida.
  699. .. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
  700. .. rst-class:: classref-enumeration-constant
  701. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
  702. Grapheme is punctuation character.
  703. .. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
  704. .. rst-class:: classref-enumeration-constant
  705. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
  706. Grapheme is underscore character.
  707. .. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
  708. .. rst-class:: classref-enumeration-constant
  709. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
  710. Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
  711. .. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
  712. .. rst-class:: classref-enumeration-constant
  713. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
  714. It is safe to insert a U+0640 before this grapheme for elongation.
  715. .. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
  716. .. rst-class:: classref-enumeration-constant
  717. :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
  718. Grapheme is an object replacement character for the embedded object.
  719. .. rst-class:: classref-item-separator
  720. ----
  721. .. _enum_TextServer_Hinting:
  722. .. rst-class:: classref-enumeration
  723. enum **Hinting**:
  724. .. _class_TextServer_constant_HINTING_NONE:
  725. .. rst-class:: classref-enumeration-constant
  726. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
  727. Disables font hinting (smoother but less crisp).
  728. .. _class_TextServer_constant_HINTING_LIGHT:
  729. .. rst-class:: classref-enumeration-constant
  730. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
  731. Use the light font hinting mode.
  732. .. _class_TextServer_constant_HINTING_NORMAL:
  733. .. rst-class:: classref-enumeration-constant
  734. :ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
  735. Use the default font hinting mode (crisper but less smooth).
  736. \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
  737. .. rst-class:: classref-item-separator
  738. ----
  739. .. _enum_TextServer_SubpixelPositioning:
  740. .. rst-class:: classref-enumeration
  741. enum **SubpixelPositioning**:
  742. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
  743. .. rst-class:: classref-enumeration-constant
  744. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
  745. Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
  746. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
  747. .. rst-class:: classref-enumeration-constant
  748. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
  749. Glyph horizontal position is rounded based on font size.
  750. - 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>`.
  751. - 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>`.
  752. - To the whole pixel size for larger fonts.
  753. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
  754. .. rst-class:: classref-enumeration-constant
  755. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
  756. Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
  757. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
  758. .. rst-class:: classref-enumeration-constant
  759. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
  760. Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
  761. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
  762. .. rst-class:: classref-enumeration-constant
  763. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
  764. 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.
  765. .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
  766. .. rst-class:: classref-enumeration-constant
  767. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
  768. 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.
  769. .. rst-class:: classref-item-separator
  770. ----
  771. .. _enum_TextServer_Feature:
  772. .. rst-class:: classref-enumeration
  773. enum **Feature**:
  774. .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
  777. TextServer supports simple text layouts.
  778. .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
  779. .. rst-class:: classref-enumeration-constant
  780. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
  781. TextServer supports bidirectional text layouts.
  782. .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
  783. .. rst-class:: classref-enumeration-constant
  784. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
  785. TextServer supports vertical layouts.
  786. .. _class_TextServer_constant_FEATURE_SHAPING:
  787. .. rst-class:: classref-enumeration-constant
  788. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
  789. TextServer supports complex text shaping.
  790. .. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
  791. .. rst-class:: classref-enumeration-constant
  792. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
  793. TextServer supports justification using kashidas.
  794. .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
  795. .. rst-class:: classref-enumeration-constant
  796. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
  797. TextServer supports complex line/word breaking rules (e.g. dictionary based).
  798. .. _class_TextServer_constant_FEATURE_FONT_BITMAP:
  799. .. rst-class:: classref-enumeration-constant
  800. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
  801. TextServer supports loading bitmap fonts.
  802. .. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
  803. .. rst-class:: classref-enumeration-constant
  804. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
  805. TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
  806. .. _class_TextServer_constant_FEATURE_FONT_MSDF:
  807. .. rst-class:: classref-enumeration-constant
  808. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
  809. TextServer supports multichannel signed distance field dynamic font rendering.
  810. .. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
  811. .. rst-class:: classref-enumeration-constant
  812. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
  813. TextServer supports loading system fonts.
  814. .. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
  815. .. rst-class:: classref-enumeration-constant
  816. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
  817. TextServer supports variable fonts.
  818. .. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
  819. .. rst-class:: classref-enumeration-constant
  820. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
  821. TextServer supports locale dependent and context sensitive case conversion.
  822. .. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
  823. .. rst-class:: classref-enumeration-constant
  824. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
  825. TextServer require external data file for some features, see :ref:`load_support_data<class_TextServer_method_load_support_data>`.
  826. .. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
  827. .. rst-class:: classref-enumeration-constant
  828. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
  829. TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`.
  830. .. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
  831. .. rst-class:: classref-enumeration-constant
  832. :ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
  833. 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.
  834. .. rst-class:: classref-item-separator
  835. ----
  836. .. _enum_TextServer_ContourPointTag:
  837. .. rst-class:: classref-enumeration
  838. enum **ContourPointTag**:
  839. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
  840. .. rst-class:: classref-enumeration-constant
  841. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
  842. Contour point is on the curve.
  843. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
  844. .. rst-class:: classref-enumeration-constant
  845. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
  846. Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
  847. .. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
  848. .. rst-class:: classref-enumeration-constant
  849. :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
  850. Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
  851. .. rst-class:: classref-item-separator
  852. ----
  853. .. _enum_TextServer_SpacingType:
  854. .. rst-class:: classref-enumeration
  855. enum **SpacingType**:
  856. .. _class_TextServer_constant_SPACING_GLYPH:
  857. .. rst-class:: classref-enumeration-constant
  858. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
  859. Spacing for each glyph.
  860. .. _class_TextServer_constant_SPACING_SPACE:
  861. .. rst-class:: classref-enumeration-constant
  862. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
  863. Spacing for the space character.
  864. .. _class_TextServer_constant_SPACING_TOP:
  865. .. rst-class:: classref-enumeration-constant
  866. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
  867. Spacing at the top of the line.
  868. .. _class_TextServer_constant_SPACING_BOTTOM:
  869. .. rst-class:: classref-enumeration-constant
  870. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
  871. Spacing at the bottom of the line.
  872. .. _class_TextServer_constant_SPACING_MAX:
  873. .. rst-class:: classref-enumeration-constant
  874. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
  875. .. rst-class:: classref-item-separator
  876. ----
  877. .. _enum_TextServer_FontStyle:
  878. .. rst-class:: classref-enumeration
  879. flags **FontStyle**:
  880. .. _class_TextServer_constant_FONT_BOLD:
  881. .. rst-class:: classref-enumeration-constant
  882. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
  883. Font is bold.
  884. .. _class_TextServer_constant_FONT_ITALIC:
  885. .. rst-class:: classref-enumeration-constant
  886. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
  887. Font is italic or oblique.
  888. .. _class_TextServer_constant_FONT_FIXED_WIDTH:
  889. .. rst-class:: classref-enumeration-constant
  890. :ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
  891. Font have fixed-width characters.
  892. .. rst-class:: classref-item-separator
  893. ----
  894. .. _enum_TextServer_StructuredTextParser:
  895. .. rst-class:: classref-enumeration
  896. enum **StructuredTextParser**:
  897. .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
  898. .. rst-class:: classref-enumeration-constant
  899. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
  900. Use default Unicode BiDi algorithm.
  901. .. _class_TextServer_constant_STRUCTURED_TEXT_URI:
  902. .. rst-class:: classref-enumeration-constant
  903. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
  904. BiDi override for URI.
  905. .. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
  906. .. rst-class:: classref-enumeration-constant
  907. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
  908. BiDi override for file path.
  909. .. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
  910. .. rst-class:: classref-enumeration-constant
  911. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
  912. BiDi override for email.
  913. .. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
  914. .. rst-class:: classref-enumeration-constant
  915. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
  916. BiDi override for lists.
  917. Structured text options: list separator ``String``.
  918. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
  919. .. rst-class:: classref-enumeration-constant
  920. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
  921. BiDi override for GDScript.
  922. .. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
  923. .. rst-class:: classref-enumeration-constant
  924. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
  925. User defined structured text BiDi override function.
  926. .. rst-class:: classref-section-separator
  927. ----
  928. .. rst-class:: classref-descriptions-group
  929. Method Descriptions
  930. -------------------
  931. .. _class_TextServer_method_create_font:
  932. .. rst-class:: classref-method
  933. :ref:`RID<class_RID>` **create_font** **(** **)**
  934. Creates new, empty font cache entry resource. To free the resulting resource, use :ref:`free_rid<class_TextServer_method_free_rid>` method.
  935. .. rst-class:: classref-item-separator
  936. ----
  937. .. _class_TextServer_method_create_shaped_text:
  938. .. rst-class:: classref-method
  939. :ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  940. 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.
  941. \ **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>`).
  942. \ **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>`).
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _class_TextServer_method_draw_hex_code_box:
  946. .. rst-class:: classref-method
  947. 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|
  948. Draws box displaying character hexadecimal code. Used for replacing missing characters.
  949. .. rst-class:: classref-item-separator
  950. ----
  951. .. _class_TextServer_method_font_clear_glyphs:
  952. .. rst-class:: classref-method
  953. void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  954. Removes all rendered glyphs information from the cache entry.
  955. \ **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.
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _class_TextServer_method_font_clear_kerning_map:
  959. .. rst-class:: classref-method
  960. void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)**
  961. Removes all kerning overrides.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_TextServer_method_font_clear_size_cache:
  965. .. rst-class:: classref-method
  966. void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)**
  967. Removes all font sizes from the cache entry.
  968. .. rst-class:: classref-item-separator
  969. ----
  970. .. _class_TextServer_method_font_clear_textures:
  971. .. rst-class:: classref-method
  972. void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  973. Removes all textures from font cache entry.
  974. \ **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.
  975. .. rst-class:: classref-item-separator
  976. ----
  977. .. _class_TextServer_method_font_draw_glyph:
  978. .. rst-class:: classref-method
  979. 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|
  980. Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``.
  981. \ **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>`.
  982. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  983. .. rst-class:: classref-item-separator
  984. ----
  985. .. _class_TextServer_method_font_draw_glyph_outline:
  986. .. rst-class:: classref-method
  987. 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|
  988. Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``.
  989. \ **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>`.
  990. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  991. .. rst-class:: classref-item-separator
  992. ----
  993. .. _class_TextServer_method_font_get_antialiasing:
  994. .. rst-class:: classref-method
  995. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  996. Returns font anti-aliasing mode.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_TextServer_method_font_get_ascent:
  1000. .. rst-class:: classref-method
  1001. :ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1002. Returns the font ascent (number of pixels above the baseline).
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_TextServer_method_font_get_char_from_glyph_index:
  1006. .. rst-class:: classref-method
  1007. :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|
  1008. 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>`.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_TextServer_method_font_get_descent:
  1012. .. rst-class:: classref-method
  1013. :ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1014. Returns the font descent (number of pixels below the baseline).
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_TextServer_method_font_get_embolden:
  1018. .. rst-class:: classref-method
  1019. :ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1020. Returns font embolden strength.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_TextServer_method_font_get_face_count:
  1024. .. rst-class:: classref-method
  1025. :ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1026. Returns number of faces in the TrueType / OpenType collection.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_TextServer_method_font_get_face_index:
  1030. .. rst-class:: classref-method
  1031. :ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1032. Recturns an active face index in the TrueType / OpenType collection.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_TextServer_method_font_get_fixed_size:
  1036. .. rst-class:: classref-method
  1037. :ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1038. Returns bitmap font fixed size.
  1039. .. rst-class:: classref-item-separator
  1040. ----
  1041. .. _class_TextServer_method_font_get_generate_mipmaps:
  1042. .. rst-class:: classref-method
  1043. :ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1044. Returns ``true`` if font texture mipmap generation is enabled.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_TextServer_method_font_get_global_oversampling:
  1048. .. rst-class:: classref-method
  1049. :ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const|
  1050. Returns the font oversampling factor, shared by all fonts in the TextServer.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_TextServer_method_font_get_glyph_advance:
  1054. .. rst-class:: classref-method
  1055. :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|
  1056. Returns glyph advance (offset of the next glyph).
  1057. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1058. .. rst-class:: classref-item-separator
  1059. ----
  1060. .. _class_TextServer_method_font_get_glyph_contours:
  1061. .. rst-class:: classref-method
  1062. :ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1063. Returns outline contours of the glyph as a ``Dictionary`` with the following contents:
  1064. \ ``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.
  1065. \ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`, containing indices the end points of each contour.
  1066. \ ``orientation`` - :ref:`bool<class_bool>`, contour orientation. If ``true``, clockwise contours must be filled.
  1067. .. rst-class:: classref-item-separator
  1068. ----
  1069. .. _class_TextServer_method_font_get_glyph_index:
  1070. .. rst-class:: classref-method
  1071. :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|
  1072. 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>`.
  1073. .. rst-class:: classref-item-separator
  1074. ----
  1075. .. _class_TextServer_method_font_get_glyph_list:
  1076. .. rst-class:: classref-method
  1077. :ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1078. Returns list of rendered glyphs in the cache entry.
  1079. .. rst-class:: classref-item-separator
  1080. ----
  1081. .. _class_TextServer_method_font_get_glyph_offset:
  1082. .. rst-class:: classref-method
  1083. :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|
  1084. Returns glyph offset from the baseline.
  1085. .. rst-class:: classref-item-separator
  1086. ----
  1087. .. _class_TextServer_method_font_get_glyph_size:
  1088. .. rst-class:: classref-method
  1089. :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|
  1090. Returns size of the glyph.
  1091. .. rst-class:: classref-item-separator
  1092. ----
  1093. .. _class_TextServer_method_font_get_glyph_texture_idx:
  1094. .. rst-class:: classref-method
  1095. :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|
  1096. Returns index of the cache texture containing the glyph.
  1097. .. rst-class:: classref-item-separator
  1098. ----
  1099. .. _class_TextServer_method_font_get_glyph_texture_rid:
  1100. .. rst-class:: classref-method
  1101. :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|
  1102. Returns resource ID of the cache texture containing the glyph.
  1103. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1104. .. rst-class:: classref-item-separator
  1105. ----
  1106. .. _class_TextServer_method_font_get_glyph_texture_size:
  1107. .. rst-class:: classref-method
  1108. :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|
  1109. Returns size of the cache texture containing the glyph.
  1110. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update.
  1111. .. rst-class:: classref-item-separator
  1112. ----
  1113. .. _class_TextServer_method_font_get_glyph_uv_rect:
  1114. .. rst-class:: classref-method
  1115. :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|
  1116. Returns rectangle in the cache texture containing the glyph.
  1117. .. rst-class:: classref-item-separator
  1118. ----
  1119. .. _class_TextServer_method_font_get_hinting:
  1120. .. rst-class:: classref-method
  1121. :ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1122. Returns the font hinting mode. Used by dynamic fonts only.
  1123. .. rst-class:: classref-item-separator
  1124. ----
  1125. .. _class_TextServer_method_font_get_kerning:
  1126. .. rst-class:: classref-method
  1127. :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|
  1128. Returns kerning for the pair of glyphs.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_TextServer_method_font_get_kerning_list:
  1132. .. rst-class:: classref-method
  1133. :ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1134. Returns list of the kerning overrides.
  1135. .. rst-class:: classref-item-separator
  1136. ----
  1137. .. _class_TextServer_method_font_get_language_support_override:
  1138. .. rst-class:: classref-method
  1139. :ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1140. Returns ``true`` if support override is enabled for the ``language``.
  1141. .. rst-class:: classref-item-separator
  1142. ----
  1143. .. _class_TextServer_method_font_get_language_support_overrides:
  1144. .. rst-class:: classref-method
  1145. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1146. Returns list of language support overrides.
  1147. .. rst-class:: classref-item-separator
  1148. ----
  1149. .. _class_TextServer_method_font_get_msdf_pixel_range:
  1150. .. rst-class:: classref-method
  1151. :ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1152. Returns the width of the range around the shape between the minimum and maximum representable signed distance.
  1153. .. rst-class:: classref-item-separator
  1154. ----
  1155. .. _class_TextServer_method_font_get_msdf_size:
  1156. .. rst-class:: classref-method
  1157. :ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1158. Returns source font size used to generate MSDF textures.
  1159. .. rst-class:: classref-item-separator
  1160. ----
  1161. .. _class_TextServer_method_font_get_name:
  1162. .. rst-class:: classref-method
  1163. :ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1164. Returns font family name.
  1165. .. rst-class:: classref-item-separator
  1166. ----
  1167. .. _class_TextServer_method_font_get_opentype_feature_overrides:
  1168. .. rst-class:: classref-method
  1169. :ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1170. Returns font OpenType feature set override.
  1171. .. rst-class:: classref-item-separator
  1172. ----
  1173. .. _class_TextServer_method_font_get_ot_name_strings:
  1174. .. rst-class:: classref-method
  1175. :ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1176. Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
  1177. .. rst-class:: classref-item-separator
  1178. ----
  1179. .. _class_TextServer_method_font_get_oversampling:
  1180. .. rst-class:: classref-method
  1181. :ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1182. Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1183. .. rst-class:: classref-item-separator
  1184. ----
  1185. .. _class_TextServer_method_font_get_scale:
  1186. .. rst-class:: classref-method
  1187. :ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1188. Returns scaling factor of the color bitmap font.
  1189. .. rst-class:: classref-item-separator
  1190. ----
  1191. .. _class_TextServer_method_font_get_script_support_override:
  1192. .. rst-class:: classref-method
  1193. :ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1194. Returns ``true`` if support override is enabled for the ``script``.
  1195. .. rst-class:: classref-item-separator
  1196. ----
  1197. .. _class_TextServer_method_font_get_script_support_overrides:
  1198. .. rst-class:: classref-method
  1199. :ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)**
  1200. Returns list of script support overrides.
  1201. .. rst-class:: classref-item-separator
  1202. ----
  1203. .. _class_TextServer_method_font_get_size_cache_list:
  1204. .. rst-class:: classref-method
  1205. :ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1206. Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size.
  1207. .. rst-class:: classref-item-separator
  1208. ----
  1209. .. _class_TextServer_method_font_get_stretch:
  1210. .. rst-class:: classref-method
  1211. :ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1212. Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1213. .. rst-class:: classref-item-separator
  1214. ----
  1215. .. _class_TextServer_method_font_get_style:
  1216. .. rst-class:: classref-method
  1217. :ref:`FontStyle<enum_TextServer_FontStyle>` **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1218. Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1219. .. rst-class:: classref-item-separator
  1220. ----
  1221. .. _class_TextServer_method_font_get_style_name:
  1222. .. rst-class:: classref-method
  1223. :ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1224. Returns font style name.
  1225. .. rst-class:: classref-item-separator
  1226. ----
  1227. .. _class_TextServer_method_font_get_subpixel_positioning:
  1228. .. rst-class:: classref-method
  1229. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1230. Returns font subpixel glyph positioning mode.
  1231. .. rst-class:: classref-item-separator
  1232. ----
  1233. .. _class_TextServer_method_font_get_supported_chars:
  1234. .. rst-class:: classref-method
  1235. :ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1236. Returns a string containing all the characters available in the font.
  1237. .. rst-class:: classref-item-separator
  1238. ----
  1239. .. _class_TextServer_method_font_get_texture_count:
  1240. .. rst-class:: classref-method
  1241. :ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  1242. Returns number of textures used by font cache entry.
  1243. .. rst-class:: classref-item-separator
  1244. ----
  1245. .. _class_TextServer_method_font_get_texture_image:
  1246. .. rst-class:: classref-method
  1247. :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|
  1248. Returns font cache texture image data.
  1249. .. rst-class:: classref-item-separator
  1250. ----
  1251. .. _class_TextServer_method_font_get_texture_offsets:
  1252. .. rst-class:: classref-method
  1253. :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|
  1254. Returns array containing glyph packing data.
  1255. .. rst-class:: classref-item-separator
  1256. ----
  1257. .. _class_TextServer_method_font_get_transform:
  1258. .. rst-class:: classref-method
  1259. :ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1260. Returns 2D transform applied to the font outlines.
  1261. .. rst-class:: classref-item-separator
  1262. ----
  1263. .. _class_TextServer_method_font_get_underline_position:
  1264. .. rst-class:: classref-method
  1265. :ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1266. Returns pixel offset of the underline below the baseline.
  1267. .. rst-class:: classref-item-separator
  1268. ----
  1269. .. _class_TextServer_method_font_get_underline_thickness:
  1270. .. rst-class:: classref-method
  1271. :ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const|
  1272. Returns thickness of the underline in pixels.
  1273. .. rst-class:: classref-item-separator
  1274. ----
  1275. .. _class_TextServer_method_font_get_variation_coordinates:
  1276. .. rst-class:: classref-method
  1277. :ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1278. 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.
  1279. .. rst-class:: classref-item-separator
  1280. ----
  1281. .. _class_TextServer_method_font_get_weight:
  1282. .. rst-class:: classref-method
  1283. :ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1284. Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1285. .. rst-class:: classref-item-separator
  1286. ----
  1287. .. _class_TextServer_method_font_has_char:
  1288. .. rst-class:: classref-method
  1289. :ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const|
  1290. Returns ``true`` if a Unicode ``char`` is available in the font.
  1291. .. rst-class:: classref-item-separator
  1292. ----
  1293. .. _class_TextServer_method_font_is_allow_system_fallback:
  1294. .. rst-class:: classref-method
  1295. :ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1296. Returns ``true`` if system fonts can be automatically used as fallbacks.
  1297. .. rst-class:: classref-item-separator
  1298. ----
  1299. .. _class_TextServer_method_font_is_force_autohinter:
  1300. .. rst-class:: classref-method
  1301. :ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1302. Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
  1303. .. rst-class:: classref-item-separator
  1304. ----
  1305. .. _class_TextServer_method_font_is_language_supported:
  1306. .. rst-class:: classref-method
  1307. :ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const|
  1308. Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
  1309. .. rst-class:: classref-item-separator
  1310. ----
  1311. .. _class_TextServer_method_font_is_multichannel_signed_distance_field:
  1312. .. rst-class:: classref-method
  1313. :ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1314. Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
  1315. .. rst-class:: classref-item-separator
  1316. ----
  1317. .. _class_TextServer_method_font_is_script_supported:
  1318. .. rst-class:: classref-method
  1319. :ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const|
  1320. Returns ``true``, if font supports given script (ISO 15924 code).
  1321. .. rst-class:: classref-item-separator
  1322. ----
  1323. .. _class_TextServer_method_font_remove_glyph:
  1324. .. rst-class:: classref-method
  1325. void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  1326. Removes specified rendered glyph information from the cache entry.
  1327. \ **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.
  1328. .. rst-class:: classref-item-separator
  1329. ----
  1330. .. _class_TextServer_method_font_remove_kerning:
  1331. .. rst-class:: classref-method
  1332. void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  1333. Removes kerning override for the pair of glyphs.
  1334. .. rst-class:: classref-item-separator
  1335. ----
  1336. .. _class_TextServer_method_font_remove_language_support_override:
  1337. .. rst-class:: classref-method
  1338. void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)**
  1339. Remove language support override.
  1340. .. rst-class:: classref-item-separator
  1341. ----
  1342. .. _class_TextServer_method_font_remove_script_support_override:
  1343. .. rst-class:: classref-method
  1344. void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)**
  1345. Removes script support override.
  1346. .. rst-class:: classref-item-separator
  1347. ----
  1348. .. _class_TextServer_method_font_remove_size_cache:
  1349. .. rst-class:: classref-method
  1350. void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)**
  1351. Removes specified font size from the cache entry.
  1352. .. rst-class:: classref-item-separator
  1353. ----
  1354. .. _class_TextServer_method_font_remove_texture:
  1355. .. rst-class:: classref-method
  1356. void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  1357. Removes specified texture from the cache entry.
  1358. \ **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>`.
  1359. .. rst-class:: classref-item-separator
  1360. ----
  1361. .. _class_TextServer_method_font_render_glyph:
  1362. .. rst-class:: classref-method
  1363. void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  1364. Renders specified glyph to the font cache texture.
  1365. .. rst-class:: classref-item-separator
  1366. ----
  1367. .. _class_TextServer_method_font_render_range:
  1368. .. rst-class:: classref-method
  1369. 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 **)**
  1370. Renders the range of characters to the font cache texture.
  1371. .. rst-class:: classref-item-separator
  1372. ----
  1373. .. _class_TextServer_method_font_set_allow_system_fallback:
  1374. .. rst-class:: classref-method
  1375. void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)**
  1376. If set to ``true``, system fonts can be automatically used as fallbacks.
  1377. .. rst-class:: classref-item-separator
  1378. ----
  1379. .. _class_TextServer_method_font_set_antialiasing:
  1380. .. rst-class:: classref-method
  1381. void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)**
  1382. Sets font anti-aliasing mode.
  1383. .. rst-class:: classref-item-separator
  1384. ----
  1385. .. _class_TextServer_method_font_set_ascent:
  1386. .. rst-class:: classref-method
  1387. void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  1388. Sets the font ascent (number of pixels above the baseline).
  1389. .. rst-class:: classref-item-separator
  1390. ----
  1391. .. _class_TextServer_method_font_set_data:
  1392. .. rst-class:: classref-method
  1393. void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
  1394. Sets font source data, e.g contents of the dynamic font source file.
  1395. .. rst-class:: classref-item-separator
  1396. ----
  1397. .. _class_TextServer_method_font_set_descent:
  1398. .. rst-class:: classref-method
  1399. void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  1400. Sets the font descent (number of pixels below the baseline).
  1401. .. rst-class:: classref-item-separator
  1402. ----
  1403. .. _class_TextServer_method_font_set_embolden:
  1404. .. rst-class:: classref-method
  1405. void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)**
  1406. Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_TextServer_method_font_set_face_index:
  1410. .. rst-class:: classref-method
  1411. void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)**
  1412. Sets an active face index in the TrueType / OpenType collection.
  1413. .. rst-class:: classref-item-separator
  1414. ----
  1415. .. _class_TextServer_method_font_set_fixed_size:
  1416. .. rst-class:: classref-method
  1417. void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)**
  1418. Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
  1419. .. rst-class:: classref-item-separator
  1420. ----
  1421. .. _class_TextServer_method_font_set_force_autohinter:
  1422. .. rst-class:: classref-method
  1423. void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)**
  1424. If set to ``true`` auto-hinting is preferred over font built-in hinting.
  1425. .. rst-class:: classref-item-separator
  1426. ----
  1427. .. _class_TextServer_method_font_set_generate_mipmaps:
  1428. .. rst-class:: classref-method
  1429. void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)**
  1430. If set to ``true`` font texture mipmap generation is enabled.
  1431. .. rst-class:: classref-item-separator
  1432. ----
  1433. .. _class_TextServer_method_font_set_global_oversampling:
  1434. .. rst-class:: classref-method
  1435. void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)**
  1436. Sets oversampling factor, shared by all font in the TextServer.
  1437. \ **Note:** This value can be automatically changed by display server.
  1438. .. rst-class:: classref-item-separator
  1439. ----
  1440. .. _class_TextServer_method_font_set_glyph_advance:
  1441. .. rst-class:: classref-method
  1442. 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 **)**
  1443. Sets glyph advance (offset of the next glyph).
  1444. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  1445. .. rst-class:: classref-item-separator
  1446. ----
  1447. .. _class_TextServer_method_font_set_glyph_offset:
  1448. .. rst-class:: classref-method
  1449. 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 **)**
  1450. Sets glyph offset from the baseline.
  1451. .. rst-class:: classref-item-separator
  1452. ----
  1453. .. _class_TextServer_method_font_set_glyph_size:
  1454. .. rst-class:: classref-method
  1455. 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 **)**
  1456. Sets size of the glyph.
  1457. .. rst-class:: classref-item-separator
  1458. ----
  1459. .. _class_TextServer_method_font_set_glyph_texture_idx:
  1460. .. rst-class:: classref-method
  1461. 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 **)**
  1462. Sets index of the cache texture containing the glyph.
  1463. .. rst-class:: classref-item-separator
  1464. ----
  1465. .. _class_TextServer_method_font_set_glyph_uv_rect:
  1466. .. rst-class:: classref-method
  1467. 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 **)**
  1468. Sets rectangle in the cache texture containing the glyph.
  1469. .. rst-class:: classref-item-separator
  1470. ----
  1471. .. _class_TextServer_method_font_set_hinting:
  1472. .. rst-class:: classref-method
  1473. void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)**
  1474. Sets font hinting mode. Used by dynamic fonts only.
  1475. .. rst-class:: classref-item-separator
  1476. ----
  1477. .. _class_TextServer_method_font_set_kerning:
  1478. .. rst-class:: classref-method
  1479. 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 **)**
  1480. Sets kerning for the pair of glyphs.
  1481. .. rst-class:: classref-item-separator
  1482. ----
  1483. .. _class_TextServer_method_font_set_language_support_override:
  1484. .. rst-class:: classref-method
  1485. void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  1486. Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`.
  1487. .. rst-class:: classref-item-separator
  1488. ----
  1489. .. _class_TextServer_method_font_set_msdf_pixel_range:
  1490. .. rst-class:: classref-method
  1491. void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)**
  1492. Sets the width of the range around the shape between the minimum and maximum representable signed distance.
  1493. .. rst-class:: classref-item-separator
  1494. ----
  1495. .. _class_TextServer_method_font_set_msdf_size:
  1496. .. rst-class:: classref-method
  1497. void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)**
  1498. Sets source font size used to generate MSDF textures.
  1499. .. rst-class:: classref-item-separator
  1500. ----
  1501. .. _class_TextServer_method_font_set_multichannel_signed_distance_field:
  1502. .. rst-class:: classref-method
  1503. void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)**
  1504. 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.
  1505. \ **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.
  1506. .. rst-class:: classref-item-separator
  1507. ----
  1508. .. _class_TextServer_method_font_set_name:
  1509. .. rst-class:: classref-method
  1510. void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1511. Sets the font family name.
  1512. .. rst-class:: classref-item-separator
  1513. ----
  1514. .. _class_TextServer_method_font_set_opentype_feature_overrides:
  1515. .. rst-class:: classref-method
  1516. void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)**
  1517. Sets font OpenType feature set override.
  1518. .. rst-class:: classref-item-separator
  1519. ----
  1520. .. _class_TextServer_method_font_set_oversampling:
  1521. .. rst-class:: classref-method
  1522. void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)**
  1523. Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only.
  1524. .. rst-class:: classref-item-separator
  1525. ----
  1526. .. _class_TextServer_method_font_set_scale:
  1527. .. rst-class:: classref-method
  1528. void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  1529. Sets scaling factor of the color bitmap font.
  1530. .. rst-class:: classref-item-separator
  1531. ----
  1532. .. _class_TextServer_method_font_set_script_support_override:
  1533. .. rst-class:: classref-method
  1534. void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  1535. Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`.
  1536. .. rst-class:: classref-item-separator
  1537. ----
  1538. .. _class_TextServer_method_font_set_stretch:
  1539. .. rst-class:: classref-method
  1540. void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1541. Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  1542. \ **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.
  1543. .. rst-class:: classref-item-separator
  1544. ----
  1545. .. _class_TextServer_method_font_set_style:
  1546. .. rst-class:: classref-method
  1547. void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontStyle<enum_TextServer_FontStyle>` style **)**
  1548. Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  1549. \ **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.
  1550. .. rst-class:: classref-item-separator
  1551. ----
  1552. .. _class_TextServer_method_font_set_style_name:
  1553. .. rst-class:: classref-method
  1554. void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)**
  1555. Sets the font style name.
  1556. .. rst-class:: classref-item-separator
  1557. ----
  1558. .. _class_TextServer_method_font_set_subpixel_positioning:
  1559. .. rst-class:: classref-method
  1560. void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)**
  1561. Sets font subpixel glyph positioning mode.
  1562. .. rst-class:: classref-item-separator
  1563. ----
  1564. .. _class_TextServer_method_font_set_texture_image:
  1565. .. rst-class:: classref-method
  1566. 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 **)**
  1567. Sets font cache texture image data.
  1568. .. rst-class:: classref-item-separator
  1569. ----
  1570. .. _class_TextServer_method_font_set_texture_offsets:
  1571. .. rst-class:: classref-method
  1572. 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 **)**
  1573. Sets array containing glyph packing data.
  1574. .. rst-class:: classref-item-separator
  1575. ----
  1576. .. _class_TextServer_method_font_set_transform:
  1577. .. rst-class:: classref-method
  1578. void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)**
  1579. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  1580. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``.
  1581. .. rst-class:: classref-item-separator
  1582. ----
  1583. .. _class_TextServer_method_font_set_underline_position:
  1584. .. rst-class:: classref-method
  1585. void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  1586. Sets pixel offset of the underline below the baseline.
  1587. .. rst-class:: classref-item-separator
  1588. ----
  1589. .. _class_TextServer_method_font_set_underline_thickness:
  1590. .. rst-class:: classref-method
  1591. void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  1592. Sets thickness of the underline in pixels.
  1593. .. rst-class:: classref-item-separator
  1594. ----
  1595. .. _class_TextServer_method_font_set_variation_coordinates:
  1596. .. rst-class:: classref-method
  1597. void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  1598. 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.
  1599. .. rst-class:: classref-item-separator
  1600. ----
  1601. .. _class_TextServer_method_font_set_weight:
  1602. .. rst-class:: classref-method
  1603. void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)**
  1604. Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  1605. \ **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.
  1606. .. rst-class:: classref-item-separator
  1607. ----
  1608. .. _class_TextServer_method_font_supported_feature_list:
  1609. .. rst-class:: classref-method
  1610. :ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1611. Returns the dictionary of the supported OpenType features.
  1612. .. rst-class:: classref-item-separator
  1613. ----
  1614. .. _class_TextServer_method_font_supported_variation_list:
  1615. .. rst-class:: classref-method
  1616. :ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const|
  1617. Returns the dictionary of the supported OpenType variation coordinates.
  1618. .. rst-class:: classref-item-separator
  1619. ----
  1620. .. _class_TextServer_method_format_number:
  1621. .. rst-class:: classref-method
  1622. :ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1623. Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``.
  1624. If ``language`` is omitted, the active locale will be used.
  1625. .. rst-class:: classref-item-separator
  1626. ----
  1627. .. _class_TextServer_method_free_rid:
  1628. .. rst-class:: classref-method
  1629. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  1630. Frees an object created by this **TextServer**.
  1631. .. rst-class:: classref-item-separator
  1632. ----
  1633. .. _class_TextServer_method_get_features:
  1634. .. rst-class:: classref-method
  1635. :ref:`int<class_int>` **get_features** **(** **)** |const|
  1636. Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`.
  1637. .. rst-class:: classref-item-separator
  1638. ----
  1639. .. _class_TextServer_method_get_hex_code_box_size:
  1640. .. rst-class:: classref-method
  1641. :ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const|
  1642. Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
  1643. .. rst-class:: classref-item-separator
  1644. ----
  1645. .. _class_TextServer_method_get_name:
  1646. .. rst-class:: classref-method
  1647. :ref:`String<class_String>` **get_name** **(** **)** |const|
  1648. Returns the name of the server interface.
  1649. .. rst-class:: classref-item-separator
  1650. ----
  1651. .. _class_TextServer_method_get_support_data_filename:
  1652. .. rst-class:: classref-method
  1653. :ref:`String<class_String>` **get_support_data_filename** **(** **)** |const|
  1654. Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
  1655. .. rst-class:: classref-item-separator
  1656. ----
  1657. .. _class_TextServer_method_get_support_data_info:
  1658. .. rst-class:: classref-method
  1659. :ref:`String<class_String>` **get_support_data_info** **(** **)** |const|
  1660. Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
  1661. .. rst-class:: classref-item-separator
  1662. ----
  1663. .. _class_TextServer_method_has:
  1664. .. rst-class:: classref-method
  1665. :ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)**
  1666. Returns ``true`` if ``rid`` is valid resource owned by this text server.
  1667. .. rst-class:: classref-item-separator
  1668. ----
  1669. .. _class_TextServer_method_has_feature:
  1670. .. rst-class:: classref-method
  1671. :ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const|
  1672. Returns ``true`` if the server supports a feature.
  1673. .. rst-class:: classref-item-separator
  1674. ----
  1675. .. _class_TextServer_method_is_confusable:
  1676. .. rst-class:: classref-method
  1677. :ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const|
  1678. Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found.
  1679. \ **Note:** This method doesn't detect invisible characters, for spoof detection use it in combination with :ref:`spoof_check<class_TextServer_method_spoof_check>`.
  1680. \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  1681. .. rst-class:: classref-item-separator
  1682. ----
  1683. .. _class_TextServer_method_is_locale_right_to_left:
  1684. .. rst-class:: classref-method
  1685. :ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const|
  1686. Returns ``true`` if locale is right-to-left.
  1687. .. rst-class:: classref-item-separator
  1688. ----
  1689. .. _class_TextServer_method_is_valid_identifier:
  1690. .. rst-class:: classref-method
  1691. :ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const|
  1692. Returns ``true`` if ``string`` is a valid identifier.
  1693. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature, a valid identifier must:
  1694. - Conform to normalization form C.
  1695. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1696. - May contain Unicode characters of class XID_Continue in the other positions.
  1697. - Use UAX #31 recommended scripts only (mixed scripts are allowed).
  1698. If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` feature is not supported, a valid identifier must:
  1699. - Begin with a Unicode character of class XID_Start or ``"_"``.
  1700. - May contain Unicode characters of class XID_Continue in the other positions.
  1701. .. rst-class:: classref-item-separator
  1702. ----
  1703. .. _class_TextServer_method_load_support_data:
  1704. .. rst-class:: classref-method
  1705. :ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)**
  1706. Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
  1707. \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect.
  1708. .. rst-class:: classref-item-separator
  1709. ----
  1710. .. _class_TextServer_method_name_to_tag:
  1711. .. rst-class:: classref-method
  1712. :ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const|
  1713. Converts readable feature, variation, script or language name to OpenType tag.
  1714. .. rst-class:: classref-item-separator
  1715. ----
  1716. .. _class_TextServer_method_parse_number:
  1717. .. rst-class:: classref-method
  1718. :ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const|
  1719. Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9).
  1720. .. rst-class:: classref-item-separator
  1721. ----
  1722. .. _class_TextServer_method_parse_structured_text:
  1723. .. rst-class:: classref-method
  1724. :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|
  1725. Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info.
  1726. .. rst-class:: classref-item-separator
  1727. ----
  1728. .. _class_TextServer_method_percent_sign:
  1729. .. rst-class:: classref-method
  1730. :ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const|
  1731. Returns percent sign used in the ``language``.
  1732. .. rst-class:: classref-item-separator
  1733. ----
  1734. .. _class_TextServer_method_save_support_data:
  1735. .. rst-class:: classref-method
  1736. :ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const|
  1737. Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
  1738. \ **Note:** This function is used by during project export, to include TextServer database.
  1739. .. rst-class:: classref-item-separator
  1740. ----
  1741. .. _class_TextServer_method_shaped_get_span_count:
  1742. .. rst-class:: classref-method
  1743. :ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1744. 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>`.
  1745. .. rst-class:: classref-item-separator
  1746. ----
  1747. .. _class_TextServer_method_shaped_get_span_meta:
  1748. .. rst-class:: classref-method
  1749. :ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const|
  1750. Returns text span metadata.
  1751. .. rst-class:: classref-item-separator
  1752. ----
  1753. .. _class_TextServer_method_shaped_set_span_update_font:
  1754. .. rst-class:: classref-method
  1755. 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={} **)**
  1756. Changes text span font, font size and OpenType features, without changing the text.
  1757. .. rst-class:: classref-item-separator
  1758. ----
  1759. .. _class_TextServer_method_shaped_text_add_object:
  1760. .. rst-class:: classref-method
  1761. :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 **)**
  1762. Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters.
  1763. .. rst-class:: classref-item-separator
  1764. ----
  1765. .. _class_TextServer_method_shaped_text_add_string:
  1766. .. rst-class:: classref-method
  1767. :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 **)**
  1768. Adds text span and font to draw it to the text buffer.
  1769. .. rst-class:: classref-item-separator
  1770. ----
  1771. .. _class_TextServer_method_shaped_text_clear:
  1772. .. rst-class:: classref-method
  1773. void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)**
  1774. Clears text buffer (removes text and inline objects).
  1775. .. rst-class:: classref-item-separator
  1776. ----
  1777. .. _class_TextServer_method_shaped_text_draw:
  1778. .. rst-class:: classref-method
  1779. 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|
  1780. 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).
  1781. .. rst-class:: classref-item-separator
  1782. ----
  1783. .. _class_TextServer_method_shaped_text_draw_outline:
  1784. .. rst-class:: classref-method
  1785. 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|
  1786. 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).
  1787. .. rst-class:: classref-item-separator
  1788. ----
  1789. .. _class_TextServer_method_shaped_text_fit_to_width:
  1790. .. rst-class:: classref-method
  1791. :ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` justification_flags=3 **)**
  1792. Adjusts text width to fit to specified width, returns new text width.
  1793. .. rst-class:: classref-item-separator
  1794. ----
  1795. .. _class_TextServer_method_shaped_text_get_ascent:
  1796. .. rst-class:: classref-method
  1797. :ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1798. Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
  1799. \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
  1800. .. rst-class:: classref-item-separator
  1801. ----
  1802. .. _class_TextServer_method_shaped_text_get_carets:
  1803. .. rst-class:: classref-method
  1804. :ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const|
  1805. Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle.
  1806. .. rst-class:: classref-item-separator
  1807. ----
  1808. .. _class_TextServer_method_shaped_text_get_custom_punctuation:
  1809. .. rst-class:: classref-method
  1810. :ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1811. Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  1812. .. rst-class:: classref-item-separator
  1813. ----
  1814. .. _class_TextServer_method_shaped_text_get_descent:
  1815. .. rst-class:: classref-method
  1816. :ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1817. Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
  1818. \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
  1819. .. rst-class:: classref-item-separator
  1820. ----
  1821. .. _class_TextServer_method_shaped_text_get_direction:
  1822. .. rst-class:: classref-method
  1823. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1824. Returns direction of the text.
  1825. .. rst-class:: classref-item-separator
  1826. ----
  1827. .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
  1828. .. rst-class:: classref-method
  1829. :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|
  1830. Returns dominant direction of in the range of text.
  1831. .. rst-class:: classref-item-separator
  1832. ----
  1833. .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
  1834. .. rst-class:: classref-method
  1835. :ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1836. Returns number of glyphs in the ellipsis.
  1837. .. rst-class:: classref-item-separator
  1838. ----
  1839. .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
  1840. .. rst-class:: classref-method
  1841. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1842. Returns array of the glyphs in the ellipsis.
  1843. .. rst-class:: classref-item-separator
  1844. ----
  1845. .. _class_TextServer_method_shaped_text_get_ellipsis_pos:
  1846. .. rst-class:: classref-method
  1847. :ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1848. Returns position of the ellipsis.
  1849. .. rst-class:: classref-item-separator
  1850. ----
  1851. .. _class_TextServer_method_shaped_text_get_glyph_count:
  1852. .. rst-class:: classref-method
  1853. :ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1854. Returns number of glyphs in the buffer.
  1855. .. rst-class:: classref-item-separator
  1856. ----
  1857. .. _class_TextServer_method_shaped_text_get_glyphs:
  1858. .. rst-class:: classref-method
  1859. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1860. Returns an array of glyphs in the visual order.
  1861. .. rst-class:: classref-item-separator
  1862. ----
  1863. .. _class_TextServer_method_shaped_text_get_grapheme_bounds:
  1864. .. rst-class:: classref-method
  1865. :ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  1866. Returns composite character's bounds as offsets from the start of the line.
  1867. .. rst-class:: classref-item-separator
  1868. ----
  1869. .. _class_TextServer_method_shaped_text_get_inferred_direction:
  1870. .. rst-class:: classref-method
  1871. :ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1872. Returns direction of the text, inferred by the BiDi algorithm.
  1873. .. rst-class:: classref-item-separator
  1874. ----
  1875. .. _class_TextServer_method_shaped_text_get_line_breaks:
  1876. .. rst-class:: classref-method
  1877. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1878. Breaks text to the lines and returns character ranges for each line.
  1879. .. rst-class:: classref-item-separator
  1880. ----
  1881. .. _class_TextServer_method_shaped_text_get_line_breaks_adv:
  1882. .. rst-class:: classref-method
  1883. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, :ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` break_flags=3 **)** |const|
  1884. Breaks text to the lines and columns. Returns character ranges for each segment.
  1885. .. rst-class:: classref-item-separator
  1886. ----
  1887. .. _class_TextServer_method_shaped_text_get_object_rect:
  1888. .. rst-class:: classref-method
  1889. :ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const|
  1890. Returns bounding rectangle of the inline object.
  1891. .. rst-class:: classref-item-separator
  1892. ----
  1893. .. _class_TextServer_method_shaped_text_get_objects:
  1894. .. rst-class:: classref-method
  1895. :ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1896. Returns array of inline objects.
  1897. .. rst-class:: classref-item-separator
  1898. ----
  1899. .. _class_TextServer_method_shaped_text_get_orientation:
  1900. .. rst-class:: classref-method
  1901. :ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1902. Returns text orientation.
  1903. .. rst-class:: classref-item-separator
  1904. ----
  1905. .. _class_TextServer_method_shaped_text_get_parent:
  1906. .. rst-class:: classref-method
  1907. :ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1908. Returns the parent buffer from which the substring originates.
  1909. .. rst-class:: classref-item-separator
  1910. ----
  1911. .. _class_TextServer_method_shaped_text_get_preserve_control:
  1912. .. rst-class:: classref-method
  1913. :ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1914. Returns ``true`` if text buffer is configured to display control characters.
  1915. .. rst-class:: classref-item-separator
  1916. ----
  1917. .. _class_TextServer_method_shaped_text_get_preserve_invalid:
  1918. .. rst-class:: classref-method
  1919. :ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1920. Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters.
  1921. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters.
  1922. .. rst-class:: classref-item-separator
  1923. ----
  1924. .. _class_TextServer_method_shaped_text_get_range:
  1925. .. rst-class:: classref-method
  1926. :ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1927. Returns substring buffer character range in the parent buffer.
  1928. .. rst-class:: classref-item-separator
  1929. ----
  1930. .. _class_TextServer_method_shaped_text_get_selection:
  1931. .. rst-class:: classref-method
  1932. :ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const|
  1933. Returns selection rectangles for the specified character range.
  1934. .. rst-class:: classref-item-separator
  1935. ----
  1936. .. _class_TextServer_method_shaped_text_get_size:
  1937. .. rst-class:: classref-method
  1938. :ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1939. Returns size of the text.
  1940. .. rst-class:: classref-item-separator
  1941. ----
  1942. .. _class_TextServer_method_shaped_text_get_spacing:
  1943. .. rst-class:: classref-method
  1944. :ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  1945. Returns extra spacing added between glyphs or lines in pixels.
  1946. .. rst-class:: classref-item-separator
  1947. ----
  1948. .. _class_TextServer_method_shaped_text_get_trim_pos:
  1949. .. rst-class:: classref-method
  1950. :ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1951. Returns the position of the overrun trim.
  1952. .. rst-class:: classref-item-separator
  1953. ----
  1954. .. _class_TextServer_method_shaped_text_get_underline_position:
  1955. .. rst-class:: classref-method
  1956. :ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1957. Returns pixel offset of the underline below the baseline.
  1958. .. rst-class:: classref-item-separator
  1959. ----
  1960. .. _class_TextServer_method_shaped_text_get_underline_thickness:
  1961. .. rst-class:: classref-method
  1962. :ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1963. Returns thickness of the underline.
  1964. .. rst-class:: classref-item-separator
  1965. ----
  1966. .. _class_TextServer_method_shaped_text_get_width:
  1967. .. rst-class:: classref-method
  1968. :ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1969. Returns width (for horizontal layout) or height (for vertical) of the text.
  1970. .. rst-class:: classref-item-separator
  1971. ----
  1972. .. _class_TextServer_method_shaped_text_get_word_breaks:
  1973. .. rst-class:: classref-method
  1974. :ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` grapheme_flags=264 **)** |const|
  1975. 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>`).
  1976. .. rst-class:: classref-item-separator
  1977. ----
  1978. .. _class_TextServer_method_shaped_text_has_visible_chars:
  1979. .. rst-class:: classref-method
  1980. :ref:`bool<class_bool>` **shaped_text_has_visible_chars** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1981. Returns ``true``, if text buffer contents any visible characters.
  1982. .. rst-class:: classref-item-separator
  1983. ----
  1984. .. _class_TextServer_method_shaped_text_hit_test_grapheme:
  1985. .. rst-class:: classref-method
  1986. :ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1987. Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found.
  1988. .. rst-class:: classref-item-separator
  1989. ----
  1990. .. _class_TextServer_method_shaped_text_hit_test_position:
  1991. .. rst-class:: classref-method
  1992. :ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const|
  1993. Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
  1994. .. rst-class:: classref-item-separator
  1995. ----
  1996. .. _class_TextServer_method_shaped_text_is_ready:
  1997. .. rst-class:: classref-method
  1998. :ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const|
  1999. Returns ``true`` if buffer is successfully shaped.
  2000. .. rst-class:: classref-item-separator
  2001. ----
  2002. .. _class_TextServer_method_shaped_text_next_grapheme_pos:
  2003. .. rst-class:: classref-method
  2004. :ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2005. Returns composite character end position closest to the ``pos``.
  2006. .. rst-class:: classref-item-separator
  2007. ----
  2008. .. _class_TextServer_method_shaped_text_overrun_trim_to_width:
  2009. .. rst-class:: classref-method
  2010. void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` overrun_trim_flags=0 **)**
  2011. Trims text if it exceeds the given width.
  2012. .. rst-class:: classref-item-separator
  2013. ----
  2014. .. _class_TextServer_method_shaped_text_prev_grapheme_pos:
  2015. .. rst-class:: classref-method
  2016. :ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const|
  2017. Returns composite character start position closest to the ``pos``.
  2018. .. rst-class:: classref-item-separator
  2019. ----
  2020. .. _class_TextServer_method_shaped_text_resize_object:
  2021. .. rst-class:: classref-method
  2022. :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 **)**
  2023. Sets new size and alignment of embedded object.
  2024. .. rst-class:: classref-item-separator
  2025. ----
  2026. .. _class_TextServer_method_shaped_text_set_bidi_override:
  2027. .. rst-class:: classref-method
  2028. void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)**
  2029. Overrides BiDi for the structured text.
  2030. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
  2031. .. rst-class:: classref-item-separator
  2032. ----
  2033. .. _class_TextServer_method_shaped_text_set_custom_punctuation:
  2034. .. rst-class:: classref-method
  2035. void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)**
  2036. Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
  2037. .. rst-class:: classref-item-separator
  2038. ----
  2039. .. _class_TextServer_method_shaped_text_set_direction:
  2040. .. rst-class:: classref-method
  2041. void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)**
  2042. 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.
  2043. \ **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>`).
  2044. .. rst-class:: classref-item-separator
  2045. ----
  2046. .. _class_TextServer_method_shaped_text_set_orientation:
  2047. .. rst-class:: classref-method
  2048. void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)**
  2049. Sets desired text orientation.
  2050. \ **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>`).
  2051. .. rst-class:: classref-item-separator
  2052. ----
  2053. .. _class_TextServer_method_shaped_text_set_preserve_control:
  2054. .. rst-class:: classref-method
  2055. void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2056. If set to ``true`` text buffer will display control characters.
  2057. .. rst-class:: classref-item-separator
  2058. ----
  2059. .. _class_TextServer_method_shaped_text_set_preserve_invalid:
  2060. .. rst-class:: classref-method
  2061. void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)**
  2062. If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
  2063. .. rst-class:: classref-item-separator
  2064. ----
  2065. .. _class_TextServer_method_shaped_text_set_spacing:
  2066. .. rst-class:: classref-method
  2067. void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  2068. Sets extra spacing added between glyphs or lines in pixels.
  2069. .. rst-class:: classref-item-separator
  2070. ----
  2071. .. _class_TextServer_method_shaped_text_shape:
  2072. .. rst-class:: classref-method
  2073. :ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)**
  2074. Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully.
  2075. \ **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.
  2076. .. rst-class:: classref-item-separator
  2077. ----
  2078. .. _class_TextServer_method_shaped_text_sort_logical:
  2079. .. rst-class:: classref-method
  2080. :ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)**
  2081. Returns text glyphs in the logical order.
  2082. .. rst-class:: classref-item-separator
  2083. ----
  2084. .. _class_TextServer_method_shaped_text_substr:
  2085. .. rst-class:: classref-method
  2086. :ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const|
  2087. Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects).
  2088. .. rst-class:: classref-item-separator
  2089. ----
  2090. .. _class_TextServer_method_shaped_text_tab_align:
  2091. .. rst-class:: classref-method
  2092. :ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)**
  2093. Aligns shaped text to the given tab-stops.
  2094. .. rst-class:: classref-item-separator
  2095. ----
  2096. .. _class_TextServer_method_spoof_check:
  2097. .. rst-class:: classref-method
  2098. :ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const|
  2099. Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader.
  2100. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` feature.
  2101. .. rst-class:: classref-item-separator
  2102. ----
  2103. .. _class_TextServer_method_string_get_word_breaks:
  2104. .. rst-class:: classref-method
  2105. :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|
  2106. 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.
  2107. When ``chars_per_line`` is greater than zero, line break boundaries are returned instead.
  2108. ::
  2109. var ts = TextServerManager.get_primary_interface()
  2110. print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
  2111. print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
  2112. .. rst-class:: classref-item-separator
  2113. ----
  2114. .. _class_TextServer_method_string_to_lower:
  2115. .. rst-class:: classref-method
  2116. :ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2117. Returns the string converted to lowercase.
  2118. \ **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>`).
  2119. \ **Note:** The result may be longer or shorter than the original.
  2120. .. rst-class:: classref-item-separator
  2121. ----
  2122. .. _class_TextServer_method_string_to_upper:
  2123. .. rst-class:: classref-method
  2124. :ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const|
  2125. Returns the string converted to uppercase.
  2126. \ **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>`).
  2127. \ **Note:** The result may be longer or shorter than the original.
  2128. .. rst-class:: classref-item-separator
  2129. ----
  2130. .. _class_TextServer_method_strip_diacritics:
  2131. .. rst-class:: classref-method
  2132. :ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const|
  2133. Strips diacritics from the string.
  2134. \ **Note:** The result may be longer or shorter than the original.
  2135. .. rst-class:: classref-item-separator
  2136. ----
  2137. .. _class_TextServer_method_tag_to_name:
  2138. .. rst-class:: classref-method
  2139. :ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const|
  2140. Converts OpenType tag to readable feature, variation, script or language name.
  2141. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  2142. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  2143. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  2144. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  2145. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  2146. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`