class_fontfile.rst 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386
  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/FontFile.xml.
  6. .. _class_FontFile:
  7. FontFile
  8. ========
  9. **Inherits:** :ref:`Font<class_Font>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **FontFile** contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback :ref:`Font<class_Font>`\ s to use.
  15. Use :ref:`FontVariation<class_FontVariation>` to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text.
  16. For more complex text processing, use :ref:`FontVariation<class_FontVariation>` in conjunction with :ref:`TextLine<class_TextLine>` or :ref:`TextParagraph<class_TextParagraph>`.
  17. Supported font formats:
  18. - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
  19. - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
  20. - Monospace image font importer: All supported image formats.
  21. \ **Note:** A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
  22. \ **Note:** A glyph is a bitmap or a shape used to draw one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
  23. \ **Note:** If none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
  24. .. tabs::
  25. .. code-tab:: gdscript
  26. var f = load("res://BarlowCondensed-Bold.ttf")
  27. $Label.add_theme_font_override("font", f)
  28. $Label.add_theme_font_size_override("font_size", 64)
  29. .. code-tab:: csharp
  30. var f = ResourceLoader.Load<FontFile>("res://BarlowCondensed-Bold.ttf");
  31. GetNode("Label").AddThemeFontOverride("font", f);
  32. GetNode("Label").AddThemeFontSizeOverride("font_size", 64);
  33. .. rst-class:: classref-reftable-group
  34. Properties
  35. ----------
  36. .. table::
  37. :widths: auto
  38. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  39. | :ref:`bool<class_bool>` | :ref:`allow_system_fallback<class_FontFile_property_allow_system_fallback>` | ``true`` |
  40. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  41. | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`antialiasing<class_FontFile_property_antialiasing>` | ``1`` |
  42. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  43. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`data<class_FontFile_property_data>` | ``PackedByteArray()`` |
  44. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  45. | :ref:`int<class_int>` | :ref:`fixed_size<class_FontFile_property_fixed_size>` | ``0`` |
  46. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  47. | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`fixed_size_scale_mode<class_FontFile_property_fixed_size_scale_mode>` | ``0`` |
  48. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  49. | :ref:`String<class_String>` | :ref:`font_name<class_FontFile_property_font_name>` | ``""`` |
  50. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  51. | :ref:`int<class_int>` | :ref:`font_stretch<class_FontFile_property_font_stretch>` | ``100`` |
  52. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  53. | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`font_style<class_FontFile_property_font_style>` | ``0`` |
  54. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  55. | :ref:`int<class_int>` | :ref:`font_weight<class_FontFile_property_font_weight>` | ``400`` |
  56. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  57. | :ref:`bool<class_bool>` | :ref:`force_autohinter<class_FontFile_property_force_autohinter>` | ``false`` |
  58. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  59. | :ref:`bool<class_bool>` | :ref:`generate_mipmaps<class_FontFile_property_generate_mipmaps>` | ``false`` |
  60. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  61. | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`hinting<class_FontFile_property_hinting>` | ``1`` |
  62. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  63. | :ref:`int<class_int>` | :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` | ``16`` |
  64. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  65. | :ref:`int<class_int>` | :ref:`msdf_size<class_FontFile_property_msdf_size>` | ``48`` |
  66. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  67. | :ref:`bool<class_bool>` | :ref:`multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` | ``false`` |
  68. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  69. | :ref:`Dictionary<class_Dictionary>` | :ref:`opentype_feature_overrides<class_FontFile_property_opentype_feature_overrides>` | ``{}`` |
  70. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  71. | :ref:`float<class_float>` | :ref:`oversampling<class_FontFile_property_oversampling>` | ``0.0`` |
  72. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  73. | :ref:`String<class_String>` | :ref:`style_name<class_FontFile_property_style_name>` | ``""`` |
  74. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  75. | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`subpixel_positioning<class_FontFile_property_subpixel_positioning>` | ``1`` |
  76. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
  77. .. rst-class:: classref-reftable-group
  78. Methods
  79. -------
  80. .. table::
  81. :widths: auto
  82. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`clear_cache<class_FontFile_method_clear_cache>` **(** **)** |
  84. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`clear_glyphs<class_FontFile_method_clear_glyphs>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |
  86. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`clear_kerning_map<class_FontFile_method_clear_kerning_map>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |
  88. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`clear_size_cache<class_FontFile_method_clear_size_cache>` **(** :ref:`int<class_int>` cache_index **)** |
  90. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`clear_textures<class_FontFile_method_clear_textures>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |
  92. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`float<class_float>` | :ref:`get_cache_ascent<class_FontFile_method_get_cache_ascent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  94. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`int<class_int>` | :ref:`get_cache_count<class_FontFile_method_get_cache_count>` **(** **)** |const| |
  96. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`float<class_float>` | :ref:`get_cache_descent<class_FontFile_method_get_cache_descent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  98. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`float<class_float>` | :ref:`get_cache_scale<class_FontFile_method_get_cache_scale>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  100. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`float<class_float>` | :ref:`get_cache_underline_position<class_FontFile_method_get_cache_underline_position>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  102. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`float<class_float>` | :ref:`get_cache_underline_thickness<class_FontFile_method_get_cache_underline_thickness>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  104. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`int<class_int>` | :ref:`get_char_from_glyph_index<class_FontFile_method_get_char_from_glyph_index>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| |
  106. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`float<class_float>` | :ref:`get_embolden<class_FontFile_method_get_embolden>` **(** :ref:`int<class_int>` cache_index **)** |const| |
  108. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`int<class_int>` | :ref:`get_extra_spacing<class_FontFile_method_get_extra_spacing>` **(** :ref:`int<class_int>` cache_index, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| |
  110. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`int<class_int>` | :ref:`get_face_index<class_FontFile_method_get_face_index>` **(** :ref:`int<class_int>` cache_index **)** |const| |
  112. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_advance<class_FontFile_method_get_glyph_advance>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| |
  114. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`int<class_int>` | :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| |
  116. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_glyph_list<class_FontFile_method_get_glyph_list>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  118. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_offset<class_FontFile_method_get_glyph_offset>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  120. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_size<class_FontFile_method_get_glyph_size>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  122. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`int<class_int>` | :ref:`get_glyph_texture_idx<class_FontFile_method_get_glyph_texture_idx>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  124. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`Rect2<class_Rect2>` | :ref:`get_glyph_uv_rect<class_FontFile_method_get_glyph_uv_rect>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| |
  126. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`Vector2<class_Vector2>` | :ref:`get_kerning<class_FontFile_method_get_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| |
  128. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_kerning_list<class_FontFile_method_get_kerning_list>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| |
  130. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`bool<class_bool>` | :ref:`get_language_support_override<class_FontFile_method_get_language_support_override>` **(** :ref:`String<class_String>` language **)** |const| |
  132. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_language_support_overrides<class_FontFile_method_get_language_support_overrides>` **(** **)** |const| |
  134. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`bool<class_bool>` | :ref:`get_script_support_override<class_FontFile_method_get_script_support_override>` **(** :ref:`String<class_String>` script **)** |const| |
  136. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_script_support_overrides<class_FontFile_method_get_script_support_overrides>` **(** **)** |const| |
  138. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_size_cache_list<class_FontFile_method_get_size_cache_list>` **(** :ref:`int<class_int>` cache_index **)** |const| |
  140. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`int<class_int>` | :ref:`get_texture_count<class_FontFile_method_get_texture_count>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| |
  142. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`Image<class_Image>` | :ref:`get_texture_image<class_FontFile_method_get_texture_image>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  144. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_texture_offsets<class_FontFile_method_get_texture_offsets>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| |
  146. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`Transform2D<class_Transform2D>` | :ref:`get_transform<class_FontFile_method_get_transform>` **(** :ref:`int<class_int>` cache_index **)** |const| |
  148. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :ref:`Dictionary<class_Dictionary>` | :ref:`get_variation_coordinates<class_FontFile_method_get_variation_coordinates>` **(** :ref:`int<class_int>` cache_index **)** |const| |
  150. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bitmap_font<class_FontFile_method_load_bitmap_font>` **(** :ref:`String<class_String>` path **)** |
  152. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_dynamic_font<class_FontFile_method_load_dynamic_font>` **(** :ref:`String<class_String>` path **)** |
  154. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | void | :ref:`remove_cache<class_FontFile_method_remove_cache>` **(** :ref:`int<class_int>` cache_index **)** |
  156. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | void | :ref:`remove_glyph<class_FontFile_method_remove_glyph>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |
  158. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | void | :ref:`remove_kerning<class_FontFile_method_remove_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |
  160. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | void | :ref:`remove_language_support_override<class_FontFile_method_remove_language_support_override>` **(** :ref:`String<class_String>` language **)** |
  162. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | void | :ref:`remove_script_support_override<class_FontFile_method_remove_script_support_override>` **(** :ref:`String<class_String>` script **)** |
  164. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | void | :ref:`remove_size_cache<class_FontFile_method_remove_size_cache>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |
  166. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`remove_texture<class_FontFile_method_remove_texture>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |
  168. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | void | :ref:`render_glyph<class_FontFile_method_render_glyph>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |
  170. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | void | :ref:`render_range<class_FontFile_method_render_range>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |
  172. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | void | :ref:`set_cache_ascent<class_FontFile_method_set_cache_ascent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |
  174. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | void | :ref:`set_cache_descent<class_FontFile_method_set_cache_descent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |
  176. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | void | :ref:`set_cache_scale<class_FontFile_method_set_cache_scale>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |
  178. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | void | :ref:`set_cache_underline_position<class_FontFile_method_set_cache_underline_position>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |
  180. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`set_cache_underline_thickness<class_FontFile_method_set_cache_underline_thickness>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |
  182. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | void | :ref:`set_embolden<class_FontFile_method_set_embolden>` **(** :ref:`int<class_int>` cache_index, :ref:`float<class_float>` strength **)** |
  184. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | void | :ref:`set_extra_spacing<class_FontFile_method_set_extra_spacing>` **(** :ref:`int<class_int>` cache_index, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |
  186. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | void | :ref:`set_face_index<class_FontFile_method_set_face_index>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` face_index **)** |
  188. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | void | :ref:`set_glyph_advance<class_FontFile_method_set_glyph_advance>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |
  190. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | void | :ref:`set_glyph_offset<class_FontFile_method_set_glyph_offset>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |
  192. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`set_glyph_size<class_FontFile_method_set_glyph_size>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |
  194. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`set_glyph_texture_idx<class_FontFile_method_set_glyph_texture_idx>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |
  196. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | void | :ref:`set_glyph_uv_rect<class_FontFile_method_set_glyph_uv_rect>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |
  198. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | void | :ref:`set_kerning<class_FontFile_method_set_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |
  200. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | void | :ref:`set_language_support_override<class_FontFile_method_set_language_support_override>` **(** :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |
  202. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | void | :ref:`set_script_support_override<class_FontFile_method_set_script_support_override>` **(** :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |
  204. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | void | :ref:`set_texture_image<class_FontFile_method_set_texture_image>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |
  206. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | void | :ref:`set_texture_offsets<class_FontFile_method_set_texture_offsets>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |
  208. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`set_transform<class_FontFile_method_set_transform>` **(** :ref:`int<class_int>` cache_index, :ref:`Transform2D<class_Transform2D>` transform **)** |
  210. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | void | :ref:`set_variation_coordinates<class_FontFile_method_set_variation_coordinates>` **(** :ref:`int<class_int>` cache_index, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |
  212. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. .. rst-class:: classref-section-separator
  214. ----
  215. .. rst-class:: classref-descriptions-group
  216. Property Descriptions
  217. ---------------------
  218. .. _class_FontFile_property_allow_system_fallback:
  219. .. rst-class:: classref-property
  220. :ref:`bool<class_bool>` **allow_system_fallback** = ``true``
  221. .. rst-class:: classref-property-setget
  222. - void **set_allow_system_fallback** **(** :ref:`bool<class_bool>` value **)**
  223. - :ref:`bool<class_bool>` **is_allow_system_fallback** **(** **)**
  224. If set to ``true``, system fonts can be automatically used as fallbacks.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_FontFile_property_antialiasing:
  228. .. rst-class:: classref-property
  229. :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1``
  230. .. rst-class:: classref-property-setget
  231. - void **set_antialiasing** **(** :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` value **)**
  232. - :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing** **(** **)**
  233. Font anti-aliasing mode.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _class_FontFile_property_data:
  237. .. rst-class:: classref-property
  238. :ref:`PackedByteArray<class_PackedByteArray>` **data** = ``PackedByteArray()``
  239. .. rst-class:: classref-property-setget
  240. - void **set_data** **(** :ref:`PackedByteArray<class_PackedByteArray>` value **)**
  241. - :ref:`PackedByteArray<class_PackedByteArray>` **get_data** **(** **)**
  242. Contents of the dynamic font source file.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_FontFile_property_fixed_size:
  246. .. rst-class:: classref-property
  247. :ref:`int<class_int>` **fixed_size** = ``0``
  248. .. rst-class:: classref-property-setget
  249. - void **set_fixed_size** **(** :ref:`int<class_int>` value **)**
  250. - :ref:`int<class_int>` **get_fixed_size** **(** **)**
  251. Font size, used only for the bitmap fonts.
  252. .. rst-class:: classref-item-separator
  253. ----
  254. .. _class_FontFile_property_fixed_size_scale_mode:
  255. .. rst-class:: classref-property
  256. :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **fixed_size_scale_mode** = ``0``
  257. .. rst-class:: classref-property-setget
  258. - void **set_fixed_size_scale_mode** **(** :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` value **)**
  259. - :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **get_fixed_size_scale_mode** **(** **)**
  260. Scaling mode, used only for the bitmap fonts with :ref:`fixed_size<class_FontFile_property_fixed_size>` greater than zero.
  261. .. rst-class:: classref-item-separator
  262. ----
  263. .. _class_FontFile_property_font_name:
  264. .. rst-class:: classref-property
  265. :ref:`String<class_String>` **font_name** = ``""``
  266. .. rst-class:: classref-property-setget
  267. - void **set_font_name** **(** :ref:`String<class_String>` value **)**
  268. - :ref:`String<class_String>` **get_font_name** **(** **)**
  269. Font family name.
  270. .. rst-class:: classref-item-separator
  271. ----
  272. .. _class_FontFile_property_font_stretch:
  273. .. rst-class:: classref-property
  274. :ref:`int<class_int>` **font_stretch** = ``100``
  275. .. rst-class:: classref-property-setget
  276. - void **set_font_stretch** **(** :ref:`int<class_int>` value **)**
  277. - :ref:`int<class_int>` **get_font_stretch** **(** **)**
  278. Font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_FontFile_property_font_style:
  282. .. rst-class:: classref-property
  283. |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **font_style** = ``0``
  284. .. rst-class:: classref-property-setget
  285. - void **set_font_style** **(** |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> value **)**
  286. - |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **get_font_style** **(** **)**
  287. Font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _class_FontFile_property_font_weight:
  291. .. rst-class:: classref-property
  292. :ref:`int<class_int>` **font_weight** = ``400``
  293. .. rst-class:: classref-property-setget
  294. - void **set_font_weight** **(** :ref:`int<class_int>` value **)**
  295. - :ref:`int<class_int>` **get_font_weight** **(** **)**
  296. Weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``.
  297. .. rst-class:: classref-item-separator
  298. ----
  299. .. _class_FontFile_property_force_autohinter:
  300. .. rst-class:: classref-property
  301. :ref:`bool<class_bool>` **force_autohinter** = ``false``
  302. .. rst-class:: classref-property-setget
  303. - void **set_force_autohinter** **(** :ref:`bool<class_bool>` value **)**
  304. - :ref:`bool<class_bool>` **is_force_autohinter** **(** **)**
  305. If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting).
  306. .. rst-class:: classref-item-separator
  307. ----
  308. .. _class_FontFile_property_generate_mipmaps:
  309. .. rst-class:: classref-property
  310. :ref:`bool<class_bool>` **generate_mipmaps** = ``false``
  311. .. rst-class:: classref-property-setget
  312. - void **set_generate_mipmaps** **(** :ref:`bool<class_bool>` value **)**
  313. - :ref:`bool<class_bool>` **get_generate_mipmaps** **(** **)**
  314. If set to ``true``, generate mipmaps for the font textures.
  315. .. rst-class:: classref-item-separator
  316. ----
  317. .. _class_FontFile_property_hinting:
  318. .. rst-class:: classref-property
  319. :ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1``
  320. .. rst-class:: classref-property-setget
  321. - void **set_hinting** **(** :ref:`Hinting<enum_TextServer_Hinting>` value **)**
  322. - :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting** **(** **)**
  323. Font hinting mode. Used by dynamic fonts only.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _class_FontFile_property_msdf_pixel_range:
  327. .. rst-class:: classref-property
  328. :ref:`int<class_int>` **msdf_pixel_range** = ``16``
  329. .. rst-class:: classref-property-setget
  330. - void **set_msdf_pixel_range** **(** :ref:`int<class_int>` value **)**
  331. - :ref:`int<class_int>` **get_msdf_pixel_range** **(** **)**
  332. The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` value of ``16`` allows outline sizes up to ``8`` to look correct.
  333. .. rst-class:: classref-item-separator
  334. ----
  335. .. _class_FontFile_property_msdf_size:
  336. .. rst-class:: classref-property
  337. :ref:`int<class_int>` **msdf_size** = ``48``
  338. .. rst-class:: classref-property-setget
  339. - void **set_msdf_size** **(** :ref:`int<class_int>` value **)**
  340. - :ref:`int<class_int>` **get_msdf_size** **(** **)**
  341. Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering.
  342. .. rst-class:: classref-item-separator
  343. ----
  344. .. _class_FontFile_property_multichannel_signed_distance_field:
  345. .. rst-class:: classref-property
  346. :ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false``
  347. .. rst-class:: classref-property-setget
  348. - void **set_multichannel_signed_distance_field** **(** :ref:`bool<class_bool>` value **)**
  349. - :ref:`bool<class_bool>` **is_multichannel_signed_distance_field** **(** **)**
  350. If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control<class_Control>`\ s that are scaled down (or for :ref:`Label3D<class_Label3D>`\ s viewed from a long distance). 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.
  351. \ **Note:** If using font outlines, :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the size of the largest font outline.
  352. \ **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.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_FontFile_property_opentype_feature_overrides:
  356. .. rst-class:: classref-property
  357. :ref:`Dictionary<class_Dictionary>` **opentype_feature_overrides** = ``{}``
  358. .. rst-class:: classref-property-setget
  359. - void **set_opentype_feature_overrides** **(** :ref:`Dictionary<class_Dictionary>` value **)**
  360. - :ref:`Dictionary<class_Dictionary>` **get_opentype_feature_overrides** **(** **)**
  361. Font OpenType feature set override.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_FontFile_property_oversampling:
  365. .. rst-class:: classref-property
  366. :ref:`float<class_float>` **oversampling** = ``0.0``
  367. .. rst-class:: classref-property-setget
  368. - void **set_oversampling** **(** :ref:`float<class_float>` value **)**
  369. - :ref:`float<class_float>` **get_oversampling** **(** **)**
  370. Font oversampling factor. If set to ``0.0``, the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling).
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_FontFile_property_style_name:
  374. .. rst-class:: classref-property
  375. :ref:`String<class_String>` **style_name** = ``""``
  376. .. rst-class:: classref-property-setget
  377. - void **set_font_style_name** **(** :ref:`String<class_String>` value **)**
  378. - :ref:`String<class_String>` **get_font_style_name** **(** **)**
  379. Font style name.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _class_FontFile_property_subpixel_positioning:
  383. .. rst-class:: classref-property
  384. :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1``
  385. .. rst-class:: classref-property-setget
  386. - void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` value **)**
  387. - :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning** **(** **)**
  388. Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` to automatically enable it based on the font size.
  389. .. rst-class:: classref-section-separator
  390. ----
  391. .. rst-class:: classref-descriptions-group
  392. Method Descriptions
  393. -------------------
  394. .. _class_FontFile_method_clear_cache:
  395. .. rst-class:: classref-method
  396. void **clear_cache** **(** **)**
  397. Removes all font cache entries.
  398. .. rst-class:: classref-item-separator
  399. ----
  400. .. _class_FontFile_method_clear_glyphs:
  401. .. rst-class:: classref-method
  402. void **clear_glyphs** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)**
  403. Removes all rendered glyphs information from the cache entry.
  404. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture<class_FontFile_method_remove_texture>` to remove them manually.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_FontFile_method_clear_kerning_map:
  408. .. rst-class:: classref-method
  409. void **clear_kerning_map** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)**
  410. Removes all kerning overrides.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_FontFile_method_clear_size_cache:
  414. .. rst-class:: classref-method
  415. void **clear_size_cache** **(** :ref:`int<class_int>` cache_index **)**
  416. Removes all font sizes from the cache entry
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_FontFile_method_clear_textures:
  420. .. rst-class:: classref-method
  421. void **clear_textures** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)**
  422. Removes all textures from font cache entry.
  423. \ **Note:** This function will not remove glyphs associated with the texture, use :ref:`remove_glyph<class_FontFile_method_remove_glyph>` to remove them manually.
  424. .. rst-class:: classref-item-separator
  425. ----
  426. .. _class_FontFile_method_get_cache_ascent:
  427. .. rst-class:: classref-method
  428. :ref:`float<class_float>` **get_cache_ascent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  429. Returns the font ascent (number of pixels above the baseline).
  430. .. rst-class:: classref-item-separator
  431. ----
  432. .. _class_FontFile_method_get_cache_count:
  433. .. rst-class:: classref-method
  434. :ref:`int<class_int>` **get_cache_count** **(** **)** |const|
  435. Returns number of the font cache entries.
  436. .. rst-class:: classref-item-separator
  437. ----
  438. .. _class_FontFile_method_get_cache_descent:
  439. .. rst-class:: classref-method
  440. :ref:`float<class_float>` **get_cache_descent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  441. Returns the font descent (number of pixels below the baseline).
  442. .. rst-class:: classref-item-separator
  443. ----
  444. .. _class_FontFile_method_get_cache_scale:
  445. .. rst-class:: classref-method
  446. :ref:`float<class_float>` **get_cache_scale** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  447. Returns scaling factor of the color bitmap font.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_FontFile_method_get_cache_underline_position:
  451. .. rst-class:: classref-method
  452. :ref:`float<class_float>` **get_cache_underline_position** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  453. Returns pixel offset of the underline below the baseline.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _class_FontFile_method_get_cache_underline_thickness:
  457. .. rst-class:: classref-method
  458. :ref:`float<class_float>` **get_cache_underline_thickness** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  459. Returns thickness of the underline in pixels.
  460. .. rst-class:: classref-item-separator
  461. ----
  462. .. _class_FontFile_method_get_char_from_glyph_index:
  463. .. rst-class:: classref-method
  464. :ref:`int<class_int>` **get_char_from_glyph_index** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const|
  465. Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>`.
  466. .. rst-class:: classref-item-separator
  467. ----
  468. .. _class_FontFile_method_get_embolden:
  469. .. rst-class:: classref-method
  470. :ref:`float<class_float>` **get_embolden** **(** :ref:`int<class_int>` cache_index **)** |const|
  471. Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  472. .. rst-class:: classref-item-separator
  473. ----
  474. .. _class_FontFile_method_get_extra_spacing:
  475. .. rst-class:: classref-method
  476. :ref:`int<class_int>` **get_extra_spacing** **(** :ref:`int<class_int>` cache_index, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const|
  477. Returns spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size).
  478. .. rst-class:: classref-item-separator
  479. ----
  480. .. _class_FontFile_method_get_face_index:
  481. .. rst-class:: classref-method
  482. :ref:`int<class_int>` **get_face_index** **(** :ref:`int<class_int>` cache_index **)** |const|
  483. Returns an active face index in the TrueType / OpenType collection.
  484. .. rst-class:: classref-item-separator
  485. ----
  486. .. _class_FontFile_method_get_glyph_advance:
  487. .. rst-class:: classref-method
  488. :ref:`Vector2<class_Vector2>` **get_glyph_advance** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const|
  489. Returns glyph advance (offset of the next glyph).
  490. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_FontFile_method_get_glyph_index:
  494. .. rst-class:: classref-method
  495. :ref:`int<class_int>` **get_glyph_index** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const|
  496. Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``.
  497. .. rst-class:: classref-item-separator
  498. ----
  499. .. _class_FontFile_method_get_glyph_list:
  500. .. rst-class:: classref-method
  501. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_glyph_list** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  502. Returns list of rendered glyphs in the cache entry.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_FontFile_method_get_glyph_offset:
  506. .. rst-class:: classref-method
  507. :ref:`Vector2<class_Vector2>` **get_glyph_offset** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  508. Returns glyph offset from the baseline.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_FontFile_method_get_glyph_size:
  512. .. rst-class:: classref-method
  513. :ref:`Vector2<class_Vector2>` **get_glyph_size** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  514. Returns glyph size.
  515. .. rst-class:: classref-item-separator
  516. ----
  517. .. _class_FontFile_method_get_glyph_texture_idx:
  518. .. rst-class:: classref-method
  519. :ref:`int<class_int>` **get_glyph_texture_idx** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  520. Returns index of the cache texture containing the glyph.
  521. .. rst-class:: classref-item-separator
  522. ----
  523. .. _class_FontFile_method_get_glyph_uv_rect:
  524. .. rst-class:: classref-method
  525. :ref:`Rect2<class_Rect2>` **get_glyph_uv_rect** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const|
  526. Returns rectangle in the cache texture containing the glyph.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_FontFile_method_get_kerning:
  530. .. rst-class:: classref-method
  531. :ref:`Vector2<class_Vector2>` **get_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const|
  532. Returns kerning for the pair of glyphs.
  533. .. rst-class:: classref-item-separator
  534. ----
  535. .. _class_FontFile_method_get_kerning_list:
  536. .. rst-class:: classref-method
  537. :ref:`Vector2i[]<class_Vector2i>` **get_kerning_list** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const|
  538. Returns list of the kerning overrides.
  539. .. rst-class:: classref-item-separator
  540. ----
  541. .. _class_FontFile_method_get_language_support_override:
  542. .. rst-class:: classref-method
  543. :ref:`bool<class_bool>` **get_language_support_override** **(** :ref:`String<class_String>` language **)** |const|
  544. Returns ``true`` if support override is enabled for the ``language``.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_FontFile_method_get_language_support_overrides:
  548. .. rst-class:: classref-method
  549. :ref:`PackedStringArray<class_PackedStringArray>` **get_language_support_overrides** **(** **)** |const|
  550. Returns list of language support overrides.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _class_FontFile_method_get_script_support_override:
  554. .. rst-class:: classref-method
  555. :ref:`bool<class_bool>` **get_script_support_override** **(** :ref:`String<class_String>` script **)** |const|
  556. Returns ``true`` if support override is enabled for the ``script``.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_FontFile_method_get_script_support_overrides:
  560. .. rst-class:: classref-method
  561. :ref:`PackedStringArray<class_PackedStringArray>` **get_script_support_overrides** **(** **)** |const|
  562. Returns list of script support overrides.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_FontFile_method_get_size_cache_list:
  566. .. rst-class:: classref-method
  567. :ref:`Vector2i[]<class_Vector2i>` **get_size_cache_list** **(** :ref:`int<class_int>` cache_index **)** |const|
  568. Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_FontFile_method_get_texture_count:
  572. .. rst-class:: classref-method
  573. :ref:`int<class_int>` **get_texture_count** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const|
  574. Returns number of textures used by font cache entry.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_FontFile_method_get_texture_image:
  578. .. rst-class:: classref-method
  579. :ref:`Image<class_Image>` **get_texture_image** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  580. Returns a copy of the font cache texture image.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_FontFile_method_get_texture_offsets:
  584. .. rst-class:: classref-method
  585. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_texture_offsets** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const|
  586. Returns a copy of the array containing glyph packing data.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _class_FontFile_method_get_transform:
  590. .. rst-class:: classref-method
  591. :ref:`Transform2D<class_Transform2D>` **get_transform** **(** :ref:`int<class_int>` cache_index **)** |const|
  592. Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_FontFile_method_get_variation_coordinates:
  596. .. rst-class:: classref-method
  597. :ref:`Dictionary<class_Dictionary>` **get_variation_coordinates** **(** :ref:`int<class_int>` cache_index **)** |const|
  598. Returns variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list<class_Font_method_get_supported_variation_list>` for more info.
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_FontFile_method_load_bitmap_font:
  602. .. rst-class:: classref-method
  603. :ref:`Error<enum_@GlobalScope_Error>` **load_bitmap_font** **(** :ref:`String<class_String>` path **)**
  604. Loads an AngelCode BMFont (.fnt, .font) bitmap font from file ``path``.
  605. \ **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the ``user://`` directory.
  606. .. rst-class:: classref-item-separator
  607. ----
  608. .. _class_FontFile_method_load_dynamic_font:
  609. .. rst-class:: classref-method
  610. :ref:`Error<enum_@GlobalScope_Error>` **load_dynamic_font** **(** :ref:`String<class_String>` path **)**
  611. Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file ``path``.
  612. \ **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the ``user://`` directory.
  613. .. rst-class:: classref-item-separator
  614. ----
  615. .. _class_FontFile_method_remove_cache:
  616. .. rst-class:: classref-method
  617. void **remove_cache** **(** :ref:`int<class_int>` cache_index **)**
  618. Removes specified font cache entry.
  619. .. rst-class:: classref-item-separator
  620. ----
  621. .. _class_FontFile_method_remove_glyph:
  622. .. rst-class:: classref-method
  623. void **remove_glyph** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)**
  624. Removes specified rendered glyph information from the cache entry.
  625. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture<class_FontFile_method_remove_texture>` to remove them manually.
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_FontFile_method_remove_kerning:
  629. .. rst-class:: classref-method
  630. void **remove_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)**
  631. Removes kerning override for the pair of glyphs.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _class_FontFile_method_remove_language_support_override:
  635. .. rst-class:: classref-method
  636. void **remove_language_support_override** **(** :ref:`String<class_String>` language **)**
  637. Remove language support override.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_FontFile_method_remove_script_support_override:
  641. .. rst-class:: classref-method
  642. void **remove_script_support_override** **(** :ref:`String<class_String>` script **)**
  643. Removes script support override.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_FontFile_method_remove_size_cache:
  647. .. rst-class:: classref-method
  648. void **remove_size_cache** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)**
  649. Removes specified font size from the cache entry.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_FontFile_method_remove_texture:
  653. .. rst-class:: classref-method
  654. void **remove_texture** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)**
  655. Removes specified texture from the cache entry.
  656. \ **Note:** This function will not remove glyphs associated with the texture. Remove them manually using :ref:`remove_glyph<class_FontFile_method_remove_glyph>`.
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_FontFile_method_render_glyph:
  660. .. rst-class:: classref-method
  661. void **render_glyph** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)**
  662. Renders specified glyph to the font cache texture.
  663. .. rst-class:: classref-item-separator
  664. ----
  665. .. _class_FontFile_method_render_range:
  666. .. rst-class:: classref-method
  667. void **render_range** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)**
  668. Renders the range of characters to the font cache texture.
  669. .. rst-class:: classref-item-separator
  670. ----
  671. .. _class_FontFile_method_set_cache_ascent:
  672. .. rst-class:: classref-method
  673. void **set_cache_ascent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)**
  674. Sets the font ascent (number of pixels above the baseline).
  675. .. rst-class:: classref-item-separator
  676. ----
  677. .. _class_FontFile_method_set_cache_descent:
  678. .. rst-class:: classref-method
  679. void **set_cache_descent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)**
  680. Sets the font descent (number of pixels below the baseline).
  681. .. rst-class:: classref-item-separator
  682. ----
  683. .. _class_FontFile_method_set_cache_scale:
  684. .. rst-class:: classref-method
  685. void **set_cache_scale** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)**
  686. Sets scaling factor of the color bitmap font.
  687. .. rst-class:: classref-item-separator
  688. ----
  689. .. _class_FontFile_method_set_cache_underline_position:
  690. .. rst-class:: classref-method
  691. void **set_cache_underline_position** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)**
  692. Sets pixel offset of the underline below the baseline.
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _class_FontFile_method_set_cache_underline_thickness:
  696. .. rst-class:: classref-method
  697. void **set_cache_underline_thickness** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)**
  698. Sets thickness of the underline in pixels.
  699. .. rst-class:: classref-item-separator
  700. ----
  701. .. _class_FontFile_method_set_embolden:
  702. .. rst-class:: classref-method
  703. void **set_embolden** **(** :ref:`int<class_int>` cache_index, :ref:`float<class_float>` strength **)**
  704. Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
  705. .. rst-class:: classref-item-separator
  706. ----
  707. .. _class_FontFile_method_set_extra_spacing:
  708. .. rst-class:: classref-method
  709. void **set_extra_spacing** **(** :ref:`int<class_int>` cache_index, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)**
  710. Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size).
  711. .. rst-class:: classref-item-separator
  712. ----
  713. .. _class_FontFile_method_set_face_index:
  714. .. rst-class:: classref-method
  715. void **set_face_index** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` face_index **)**
  716. Sets an active face index in the TrueType / OpenType collection.
  717. .. rst-class:: classref-item-separator
  718. ----
  719. .. _class_FontFile_method_set_glyph_advance:
  720. .. rst-class:: classref-method
  721. void **set_glyph_advance** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)**
  722. Sets glyph advance (offset of the next glyph).
  723. \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved.
  724. .. rst-class:: classref-item-separator
  725. ----
  726. .. _class_FontFile_method_set_glyph_offset:
  727. .. rst-class:: classref-method
  728. void **set_glyph_offset** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)**
  729. Sets glyph offset from the baseline.
  730. .. rst-class:: classref-item-separator
  731. ----
  732. .. _class_FontFile_method_set_glyph_size:
  733. .. rst-class:: classref-method
  734. void **set_glyph_size** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)**
  735. Sets glyph size.
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_FontFile_method_set_glyph_texture_idx:
  739. .. rst-class:: classref-method
  740. void **set_glyph_texture_idx** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)**
  741. Sets index of the cache texture containing the glyph.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_FontFile_method_set_glyph_uv_rect:
  745. .. rst-class:: classref-method
  746. void **set_glyph_uv_rect** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)**
  747. Sets rectangle in the cache texture containing the glyph.
  748. .. rst-class:: classref-item-separator
  749. ----
  750. .. _class_FontFile_method_set_kerning:
  751. .. rst-class:: classref-method
  752. void **set_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)**
  753. Sets kerning for the pair of glyphs.
  754. .. rst-class:: classref-item-separator
  755. ----
  756. .. _class_FontFile_method_set_language_support_override:
  757. .. rst-class:: classref-method
  758. void **set_language_support_override** **(** :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)**
  759. Adds override for :ref:`Font.is_language_supported<class_Font_method_is_language_supported>`.
  760. .. rst-class:: classref-item-separator
  761. ----
  762. .. _class_FontFile_method_set_script_support_override:
  763. .. rst-class:: classref-method
  764. void **set_script_support_override** **(** :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)**
  765. Adds override for :ref:`Font.is_script_supported<class_Font_method_is_script_supported>`.
  766. .. rst-class:: classref-item-separator
  767. ----
  768. .. _class_FontFile_method_set_texture_image:
  769. .. rst-class:: classref-method
  770. void **set_texture_image** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)**
  771. Sets font cache texture image.
  772. .. rst-class:: classref-item-separator
  773. ----
  774. .. _class_FontFile_method_set_texture_offsets:
  775. .. rst-class:: classref-method
  776. void **set_texture_offsets** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)**
  777. Sets array containing glyph packing data.
  778. .. rst-class:: classref-item-separator
  779. ----
  780. .. _class_FontFile_method_set_transform:
  781. .. rst-class:: classref-method
  782. void **set_transform** **(** :ref:`int<class_int>` cache_index, :ref:`Transform2D<class_Transform2D>` transform **)**
  783. Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
  784. .. rst-class:: classref-item-separator
  785. ----
  786. .. _class_FontFile_method_set_variation_coordinates:
  787. .. rst-class:: classref-method
  788. void **set_variation_coordinates** **(** :ref:`int<class_int>` cache_index, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)**
  789. Sets variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list<class_Font_method_get_supported_variation_list>` for more info.
  790. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  791. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  792. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  793. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  794. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  795. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  796. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`