:github_url: hide

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

.. _class_TLFontFamily:

TLFontFamily
============

**Inherits:** 

**Category:** Core

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

A set of fonts that make up a font family.

Properties
----------

+-------------------------------------+-----------------------------------------------------------------------------------------------------------+
| :ref:`TLFontFace<class_TLFontFace>` | :ref:`{style_name}/{index}<class_TLFontFamily_property_{style_name}/{index}>`                             |
+-------------------------------------+-----------------------------------------------------------------------------------------------------------+
| :ref:`TLFontFace<class_TLFontFace>` | :ref:`{style_name}/script/{tag}/{index}<class_TLFontFamily_property_{style_name}/script/{tag}/{index}>`   |
+-------------------------------------+-----------------------------------------------------------------------------------------------------------+
| :ref:`TLFontFace<class_TLFontFace>` | :ref:`{style_name}/script/{lang}/{index}<class_TLFontFamily_property_{style_name}/script/{lang}/{index}>` |
+-------------------------------------+-----------------------------------------------------------------------------------------------------------+

Methods
-------

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

   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_face<class_TLFontFamily_method_add_face>` **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref **)**                                        |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_face_for_language<class_TLFontFamily_method_add_face_for_language>` **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref, String lang **)** |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_face_for_script<class_TLFontFamily_method_add_face_for_script>` **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref, String script **)**   |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_face_unlinked<class_TLFontFamily_method_add_face_unlinked>` **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref **)**                      |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_language<class_TLFontFamily_method_add_language>` **(** String style, String language **)**                                                        |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_script<class_TLFontFamily_method_add_script>` **(** String style, String script **)**                                                              |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`add_style<class_TLFontFamily_method_add_style>` **(** String style **)**                                                                               |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | :ref:`TLFontIterator<class_TLFontIterator>` | :ref:`get_face<class_TLFontFamily_method_get_face>` **(** String style **)** const                                                                           |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | :ref:`TLFontIterator<class_TLFontIterator>` | :ref:`get_face_for_language<class_TLFontFamily_method_get_face_for_language>` **(** String style, String lang **)** const                                    |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | :ref:`TLFontIterator<class_TLFontIterator>` | :ref:`get_face_for_script<class_TLFontFamily_method_get_face_for_script>` **(** String style, String script **)** const                                      |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | bool                                        | :ref:`has_style<class_TLFontFamily_method_has_style>` **(** String style **)** const                                                                         |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`remove_language<class_TLFontFamily_method_remove_language>` **(** String style, String language **)**                                                  |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`remove_script<class_TLFontFamily_method_remove_script>` **(** String style, String script **)**                                                        |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | void                                        | :ref:`remove_style<class_TLFontFamily_method_remove_style>` **(** String style **)**                                                                         |
   +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+

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

.. _class_TLFontFamily_property_{style_name}/{index}:

- :ref:`TLFontFace<class_TLFontFace>` **{style_name}/{index}**

Font faces not linked to the language or script.

----

.. _class_TLFontFamily_property_{style_name}/script/{tag}/{index}:

- :ref:`TLFontFace<class_TLFontFace>` **{style_name}/script/{tag}/{index}**

Font faces linked to the script.

----

.. _class_TLFontFamily_property_{style_name}/script/{lang}/{index}:

- :ref:`TLFontFace<class_TLFontFace>` **{style_name}/script/{lang}/{index}**

Font faces linked to the language.

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

.. _class_TLFontFamily_method_add_face:

- void **add_face** **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref **)**

Adds font face to be used for specific style. Supported scripts are detected automatically.

----

.. _class_TLFontFamily_method_add_face_for_language:

- void **add_face_for_language** **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref, String lang **)**

Adds font face to be used for specific language and style.

----

.. _class_TLFontFamily_method_add_face_for_script:

- void **add_face_for_script** **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref, String script **)**

Adds font face to be used for specific script and style.

----

.. _class_TLFontFamily_method_add_face_unlinked:

- void **add_face_unlinked** **(** String style, :ref:`TLFontFace<class_TLFontFace>` ref **)**

Adds font face to be used for specific style, without associating it with the script or language.

----

.. _class_TLFontFamily_method_add_language:

- void **add_language** **(** String style, String language **)**

Creates new font fallback list for the language, list is created automatically when add_face or add_face_for_language function is called.

Use ISO 639-1 (https://en.wikipedia.org/wiki/ISO_639-1) codes for the language names.

----

.. _class_TLFontFamily_method_add_script:

- void **add_script** **(** String style, String script **)**

Creates new font fallback list for the script, list is created automatically when add_face or add_face_for_script function is called.

Use ISO 15924 (https://en.wikipedia.org/wiki/ISO_15924) for the script names.

----

.. _class_TLFontFamily_method_add_style:

- void **add_style** **(** String style **)**

Adds new style to the family, style is created automatically when any of the add_face functions is called.

----

.. _class_TLFontFamily_method_get_face:

- :ref:`TLFontIterator<class_TLFontIterator>` **get_face** **(** String style **)** const

Returns font iterator for the specific style.

----

.. _class_TLFontFamily_method_get_face_for_language:

- :ref:`TLFontIterator<class_TLFontIterator>` **get_face_for_language** **(** String style, String lang **)** const

Returns font iterator for the specific style and supported language.

----

.. _class_TLFontFamily_method_get_face_for_script:

- :ref:`TLFontIterator<class_TLFontIterator>` **get_face_for_script** **(** String style, String script **)** const

Returns font iterator for the specific style and supported script.

----

.. _class_TLFontFamily_method_has_style:

- bool **has_style** **(** String style **)** const

Returns ``true`` if font family has style.

----

.. _class_TLFontFamily_method_remove_language:

- void **remove_language** **(** String style, String language **)**

Removes font fallback list for the language.

----

.. _class_TLFontFamily_method_remove_script:

- void **remove_script** **(** String style, String script **)**

Removes font fallback list for the script.

----

.. _class_TLFontFamily_method_remove_style:

- void **remove_style** **(** String style **)**

Removes style from the font family.

