: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` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`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`. 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` of the system font for fine control over its features. Properties ---------- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`antialiased` | ``true`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`FontStyle` | :ref:`font_style` | ``0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`force_autohinter` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`Hinting` | :ref:`hinting` | ``1`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`oversampling` | ``0.0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ | :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------+ Property Descriptions --------------------- .. _class_SystemFont_property_antialiased: - :ref:`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[]` **fallbacks** +-----------+----------------------+ | *Default* | ``[]`` | +-----------+----------------------+ | *Setter* | set_fallbacks(value) | +-----------+----------------------+ | *Getter* | get_fallbacks() | +-----------+----------------------+ Array of fallback :ref:`Font`\ s. ---- .. _class_SystemFont_property_font_names: - :ref:`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` **font_style** +-----------+-----------------------+ | *Default* | ``0`` | +-----------+-----------------------+ | *Setter* | set_font_style(value) | +-----------+-----------------------+ | *Getter* | get_font_style() | +-----------+-----------------------+ Font style flags, see :ref:`FontStyle`. ---- .. _class_SystemFont_property_force_autohinter: - :ref:`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` **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` **hinting** +-----------+--------------------+ | *Default* | ``1`` | +-----------+--------------------+ | *Setter* | set_hinting(value) | +-----------+--------------------+ | *Getter* | get_hinting() | +-----------+--------------------+ Font hinting mode. ---- .. _class_SystemFont_property_oversampling: - :ref:`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` **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` 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.)`