123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SystemFont.xml.
- .. _class_SystemFont:
- SystemFont
- ==========
- **Inherits:** :ref:`Font<class_Font>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Font loaded from a system font.
- \ **Note:** This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font.
- Description
- -----------
- ``SystemFont`` loads a font from a system font with the first matching name from :ref:`font_names<class_SystemFont_property_font_names>`.
- It will attempt to match font style, but it's not guaranteed.
- The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
- You can create :ref:`FontVariation<class_FontVariation>` of the system font for fine control over its features.
- Properties
- ----------
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`bool<class_bool>` | :ref:`antialiased<class_SystemFont_property_antialiased>` | ``true`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`Font[]<class_Font>` | :ref:`fallbacks<class_SystemFont_property_fallbacks>` | ``[]`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_names<class_SystemFont_property_font_names>` | ``PackedStringArray()`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`FontStyle<enum_TextServer_FontStyle>` | :ref:`font_style<class_SystemFont_property_font_style>` | ``0`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`bool<class_bool>` | :ref:`force_autohinter<class_SystemFont_property_force_autohinter>` | ``false`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`bool<class_bool>` | :ref:`generate_mipmaps<class_SystemFont_property_generate_mipmaps>` | ``false`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`hinting<class_SystemFont_property_hinting>` | ``1`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`float<class_float>` | :ref:`oversampling<class_SystemFont_property_oversampling>` | ``0.0`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`subpixel_positioning<class_SystemFont_property_subpixel_positioning>` | ``1`` |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+
- Property Descriptions
- ---------------------
- .. _class_SystemFont_property_antialiased:
- - :ref:`bool<class_bool>` **antialiased**
- +-----------+------------------------+
- | *Default* | ``true`` |
- +-----------+------------------------+
- | *Setter* | set_antialiased(value) |
- +-----------+------------------------+
- | *Getter* | is_antialiased() |
- +-----------+------------------------+
- If set to ``true``, font 8-bit anitialiased glyph rendering is supported and enabled.
- ----
- .. _class_SystemFont_property_fallbacks:
- - :ref:`Font[]<class_Font>` **fallbacks**
- +-----------+----------------------+
- | *Default* | ``[]`` |
- +-----------+----------------------+
- | *Setter* | set_fallbacks(value) |
- +-----------+----------------------+
- | *Getter* | get_fallbacks() |
- +-----------+----------------------+
- Array of fallback :ref:`Font<class_Font>`\ s.
- ----
- .. _class_SystemFont_property_font_names:
- - :ref:`PackedStringArray<class_PackedStringArray>` **font_names**
- +-----------+-------------------------+
- | *Default* | ``PackedStringArray()`` |
- +-----------+-------------------------+
- | *Setter* | set_font_names(value) |
- +-----------+-------------------------+
- | *Getter* | get_font_names() |
- +-----------+-------------------------+
- Array of font family names to search, first matching font found is used.
- ----
- .. _class_SystemFont_property_font_style:
- - :ref:`FontStyle<enum_TextServer_FontStyle>` **font_style**
- +-----------+-----------------------+
- | *Default* | ``0`` |
- +-----------+-----------------------+
- | *Setter* | set_font_style(value) |
- +-----------+-----------------------+
- | *Getter* | get_font_style() |
- +-----------+-----------------------+
- Font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`.
- ----
- .. _class_SystemFont_property_force_autohinter:
- - :ref:`bool<class_bool>` **force_autohinter**
- +-----------+-----------------------------+
- | *Default* | ``false`` |
- +-----------+-----------------------------+
- | *Setter* | set_force_autohinter(value) |
- +-----------+-----------------------------+
- | *Getter* | is_force_autohinter() |
- +-----------+-----------------------------+
- If set to ``true``, auto-hinting is supported and preferred over font built-in hinting.
- ----
- .. _class_SystemFont_property_generate_mipmaps:
- - :ref:`bool<class_bool>` **generate_mipmaps**
- +-----------+-----------------------------+
- | *Default* | ``false`` |
- +-----------+-----------------------------+
- | *Setter* | set_generate_mipmaps(value) |
- +-----------+-----------------------------+
- | *Getter* | get_generate_mipmaps() |
- +-----------+-----------------------------+
- If set to ``true``, generate mipmaps for the font textures.
- ----
- .. _class_SystemFont_property_hinting:
- - :ref:`Hinting<enum_TextServer_Hinting>` **hinting**
- +-----------+--------------------+
- | *Default* | ``1`` |
- +-----------+--------------------+
- | *Setter* | set_hinting(value) |
- +-----------+--------------------+
- | *Getter* | get_hinting() |
- +-----------+--------------------+
- Font hinting mode.
- ----
- .. _class_SystemFont_property_oversampling:
- - :ref:`float<class_float>` **oversampling**
- +-----------+-------------------------+
- | *Default* | ``0.0`` |
- +-----------+-------------------------+
- | *Setter* | set_oversampling(value) |
- +-----------+-------------------------+
- | *Getter* | get_oversampling() |
- +-----------+-------------------------+
- Font oversampling factor, if set to ``0.0`` global oversampling factor is used instead.
- ----
- .. _class_SystemFont_property_subpixel_positioning:
- - :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning**
- +-----------+---------------------------------+
- | *Default* | ``1`` |
- +-----------+---------------------------------+
- | *Setter* | set_subpixel_positioning(value) |
- +-----------+---------------------------------+
- | *Getter* | get_subpixel_positioning() |
- +-----------+---------------------------------+
- Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` to automatically enable it based on the font size.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|