:github_url: hide

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the TLDynamicFontFace.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.

.. _class_TLDynamicFontFace:

TLDynamicFontFace
=================

**Inherits:** :ref:`TLFontFace<class_TLFontFace>`

**Category:** Core

Brief Description
-----------------

A TrueType, OpenType or Graphite font for drawing text.

Properties
----------

+-------+----------------------------------------------------------------------------+-------------+
| bool  | :ref:`force_autohinter<class_TLDynamicFontFace_property_force_autohinter>` | false       |
+-------+----------------------------------------------------------------------------+-------------+
| int   | :ref:`hinting<class_TLDynamicFontFace_property_hinting>`                   | 2           |
+-------+----------------------------------------------------------------------------+-------------+
| float | :ref:`oversampling<class_TLDynamicFontFace_property_oversampling>`         | 1.0         |
+-------+----------------------------------------------------------------------------+-------------+
| int   | texture_flags                                                              | **O:** 2048 |
+-------+----------------------------------------------------------------------------+-------------+

Methods
-------

.. table::
   :class: longtable
   :widths: 7 20

   +------+------------------------------------------------------------------------------------+
   | bool | :ref:`has_graphite<class_TLDynamicFontFace_method_has_graphite>` **(** **)** const |
   +------+------------------------------------------------------------------------------------+

Enumerations
------------

.. _enum_TLDynamicFontFace_DynamicFaceHinting:

.. _class_TLDynamicFontFace_constant_DF_HINTING_NONE:

.. _class_TLDynamicFontFace_constant_DF_HINTING_LIGHT:

.. _class_TLDynamicFontFace_constant_DF_HINTING_NORMAL:

enum **DynamicFaceHinting**:

- **DF_HINTING_NONE** = **0** --- Disable font hinting (smoother but less crisp)

- **DF_HINTING_LIGHT** = **1** --- Use the light font hinting mode

- **DF_HINTING_NORMAL** = **2** --- Use the default font hinting mode (crisper but less smooth)

Property Descriptions
---------------------

.. _class_TLDynamicFontFace_property_force_autohinter:

- bool **force_autohinter**

.. table::
   :class: longtable
   :widths: 7 20

   +-----------+-----------------------------+
   | *Default* | false                       |
   +-----------+-----------------------------+
   | *Setter*  | set_force_autohinter(value) |
   +-----------+-----------------------------+
   | *Getter*  | get_force_autohinter()      |
   +-----------+-----------------------------+

If ``true``, prefers FreeType auto-hinter over the font's native hinter.

----

.. _class_TLDynamicFontFace_property_hinting:

- int **hinting**

.. table::
   :class: longtable
   :widths: 7 20

   +-----------+--------------------+
   | *Default* | 2                  |
   +-----------+--------------------+
   | *Setter*  | set_hinting(value) |
   +-----------+--------------------+
   | *Getter*  | get_hinting()      |
   +-----------+--------------------+

The font hinting mode used by FreeType auto-hinter.

----

.. _class_TLDynamicFontFace_property_oversampling:

- float **oversampling**

.. table::
   :class: longtable
   :widths: 7 20

   +-----------+-------------------------+
   | *Default* | 1.0                     |
   +-----------+-------------------------+
   | *Setter*  | set_oversampling(value) |
   +-----------+-------------------------+
   | *Getter*  | get_oversampling()      |
   +-----------+-------------------------+

Font oversampling factor.

Method Descriptions
-------------------

.. _class_TLDynamicFontFace_method_has_graphite:

- bool **has_graphite** **(** **)** const

Returns ``true`` if module is built with SIL Graphite 2 shaper support.

