mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
1478 lines
102 KiB
ReStructuredText
1478 lines
102 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_FontFile:
|
||
|
||
FontFile
|
||
========
|
||
|
||
**Успадковує:** :ref:`Font<class_Font>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Утримувати дані джерела шрифтів і попередньо відхилений кеш-пам'яті glyph, імпортований з динамічного або бітмапа.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
**FontFile** містить набір гліфів для представлення символів Unicode, імпортованих із файлу шрифту, а також кеш растеризованих гліфів і набір резервних :ref:`Font<class_Font>` для використання.
|
||
|
||
Використовуйте :ref:`FontVariation<class_FontVariation>`, щоб отримати доступ до певної варіації шрифту OpenType, створити імітацію жирного/похилого шрифту та намалювати рядки тексту.
|
||
|
||
Для більш складної обробки тексту використовуйте :ref:`FontVariation<class_FontVariation>` у поєднанні з :ref:`TextLine<class_TextLine>` або :ref:`TextParagraph<class_TextParagraph>`.
|
||
|
||
Підтримувані формати шрифтів:
|
||
|
||
— Імпорт динамічних шрифтів: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
|
||
|
||
— Імпорт растрових шрифтів: AngelCode BMFont (.fnt, .font), текстовий і двійковий (версія 3) формати.
|
||
|
||
— Імпорт шрифтів моноширинних зображень: усі підтримувані формати зображень.
|
||
|
||
\ **Примітка:** Символ — це символ, який представляє елемент (літеру, цифру тощо) абстрактним способом.
|
||
|
||
\ **Примітка.** Гліф — це растрове зображення або фігура, яка використовується для малювання одного чи кількох символів залежно від контексту. Індекси гліфів прив’язані до певного джерела даних шрифту.
|
||
|
||
\ **Примітка:** Якщо жодне з джерел даних шрифту не містить гліфів для символу, що використовується в рядку, символ, про який йде мова, буде замінено полем із відображенням його шістнадцяткового коду.
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
var f = load("res://BarlowCondensed-Bold.ttf")
|
||
$Label.add_theme_font_override("font", f)
|
||
$Label.add_theme_font_size_override("size_font", 64)
|
||
|
||
.. code-tab:: csharp
|
||
|
||
var f = ResourceLoader.Load<FontFile>("res://BarlowCondensed-Bold.ttf");
|
||
GetNode("Label").AddThemeFontOverride("font", f);
|
||
GetNode("Label").AddThemeFontSizeOverride("font_size", 64);
|
||
|
||
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- :doc:`Завантаження та збереження файлів під час виконання <../tutorials/io/runtime_file_loading_and_saving>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`allow_system_fallback<class_FontFile_property_allow_system_fallback>` | ``true`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`antialiasing<class_FontFile_property_antialiasing>` | ``1`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`data<class_FontFile_property_data>` | ``PackedByteArray()`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_FontFile_property_disable_embedded_bitmaps>` | ``true`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`int<class_int>` | :ref:`fixed_size<class_FontFile_property_fixed_size>` | ``0`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`fixed_size_scale_mode<class_FontFile_property_fixed_size_scale_mode>` | ``0`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`String<class_String>` | :ref:`font_name<class_FontFile_property_font_name>` | ``""`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_stretch<class_FontFile_property_font_stretch>` | ``100`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_style<class_FontFile_property_font_style>` | ``0`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_weight<class_FontFile_property_font_weight>` | ``400`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`force_autohinter<class_FontFile_property_force_autohinter>` | ``false`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`generate_mipmaps<class_FontFile_property_generate_mipmaps>` | ``false`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`hinting<class_FontFile_property_hinting>` | ``1`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`keep_rounding_remainders<class_FontFile_property_keep_rounding_remainders>` | ``true`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`modulate_color_glyphs<class_FontFile_property_modulate_color_glyphs>` | ``false`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`int<class_int>` | :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` | ``16`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`int<class_int>` | :ref:`msdf_size<class_FontFile_property_msdf_size>` | ``48`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` | ``false`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`opentype_feature_overrides<class_FontFile_property_opentype_feature_overrides>` | ``{}`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`float<class_float>` | :ref:`oversampling<class_FontFile_property_oversampling>` | ``0.0`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`String<class_String>` | :ref:`style_name<class_FontFile_property_style_name>` | ``""`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
| :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`subpixel_positioning<class_FontFile_property_subpixel_positioning>` | ``1`` |
|
||
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_cache<class_FontFile_method_clear_cache>`\ (\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_glyphs<class_FontFile_method_clear_glyphs>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_kerning_map<class_FontFile_method_clear_kerning_map>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_size_cache<class_FontFile_method_clear_size_cache>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`clear_textures<class_FontFile_method_clear_textures>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_cache_ascent<class_FontFile_method_get_cache_ascent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_cache_count<class_FontFile_method_get_cache_count>`\ (\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_cache_descent<class_FontFile_method_get_cache_descent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_cache_scale<class_FontFile_method_get_cache_scale>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_cache_underline_position<class_FontFile_method_get_cache_underline_position>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_cache_underline_thickness<class_FontFile_method_get_cache_underline_thickness>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_char_from_glyph_index<class_FontFile_method_get_char_from_glyph_index>`\ (\ size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_embolden<class_FontFile_method_get_embolden>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_extra_baseline_offset<class_FontFile_method_get_extra_baseline_offset>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_extra_spacing<class_FontFile_method_get_extra_spacing>`\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_face_index<class_FontFile_method_get_face_index>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_advance<class_FontFile_method_get_glyph_advance>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>`\ (\ size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_glyph_list<class_FontFile_method_get_glyph_list>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_offset<class_FontFile_method_get_glyph_offset>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_size<class_FontFile_method_get_glyph_size>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_glyph_texture_idx<class_FontFile_method_get_glyph_texture_idx>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`get_glyph_uv_rect<class_FontFile_method_get_glyph_uv_rect>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_kerning<class_FontFile_method_get_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_kerning_list<class_FontFile_method_get_kerning_list>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_language_support_override<class_FontFile_method_get_language_support_override>`\ (\ language\: :ref:`String<class_String>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_language_support_overrides<class_FontFile_method_get_language_support_overrides>`\ (\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_script_support_override<class_FontFile_method_get_script_support_override>`\ (\ script\: :ref:`String<class_String>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_script_support_overrides<class_FontFile_method_get_script_support_overrides>`\ (\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_size_cache_list<class_FontFile_method_get_size_cache_list>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_texture_count<class_FontFile_method_get_texture_count>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Image<class_Image>` | :ref:`get_texture_image<class_FontFile_method_get_texture_image>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_texture_offsets<class_FontFile_method_get_texture_offsets>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform2D<class_Transform2D>` | :ref:`get_transform<class_FontFile_method_get_transform>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_variation_coordinates<class_FontFile_method_get_variation_coordinates>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bitmap_font<class_FontFile_method_load_bitmap_font>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_dynamic_font<class_FontFile_method_load_dynamic_font>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_cache<class_FontFile_method_remove_cache>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_glyph<class_FontFile_method_remove_glyph>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_kerning<class_FontFile_method_remove_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_language_support_override<class_FontFile_method_remove_language_support_override>`\ (\ language\: :ref:`String<class_String>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_script_support_override<class_FontFile_method_remove_script_support_override>`\ (\ script\: :ref:`String<class_String>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_size_cache<class_FontFile_method_remove_size_cache>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_texture<class_FontFile_method_remove_texture>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`render_glyph<class_FontFile_method_render_glyph>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`render_range<class_FontFile_method_render_range>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cache_ascent<class_FontFile_method_set_cache_ascent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cache_descent<class_FontFile_method_set_cache_descent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cache_scale<class_FontFile_method_set_cache_scale>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cache_underline_position<class_FontFile_method_set_cache_underline_position>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_cache_underline_thickness<class_FontFile_method_set_cache_underline_thickness>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_embolden<class_FontFile_method_set_embolden>`\ (\ cache_index\: :ref:`int<class_int>`, strength\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_extra_baseline_offset<class_FontFile_method_set_extra_baseline_offset>`\ (\ cache_index\: :ref:`int<class_int>`, baseline_offset\: :ref:`float<class_float>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_extra_spacing<class_FontFile_method_set_extra_spacing>`\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_face_index<class_FontFile_method_set_face_index>`\ (\ cache_index\: :ref:`int<class_int>`, face_index\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glyph_advance<class_FontFile_method_set_glyph_advance>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glyph_offset<class_FontFile_method_set_glyph_offset>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glyph_size<class_FontFile_method_set_glyph_size>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glyph_texture_idx<class_FontFile_method_set_glyph_texture_idx>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glyph_uv_rect<class_FontFile_method_set_glyph_uv_rect>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_kerning<class_FontFile_method_set_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_language_support_override<class_FontFile_method_set_language_support_override>`\ (\ language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_script_support_override<class_FontFile_method_set_script_support_override>`\ (\ script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_texture_image<class_FontFile_method_set_texture_image>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_texture_offsets<class_FontFile_method_set_texture_offsets>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_transform<class_FontFile_method_set_transform>`\ (\ cache_index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_variation_coordinates<class_FontFile_method_set_variation_coordinates>`\ (\ cache_index\: :ref:`int<class_int>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_FontFile_property_allow_system_fallback:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` :ref:`🔗<class_FontFile_property_allow_system_fallback>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_allow_system_fallback**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_allow_system_fallback**\ (\ )
|
||
|
||
Якщо встановити на ``true``, можна автоматично використовувати шрифти системи.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_antialiasing:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1`` :ref:`🔗<class_FontFile_property_antialiasing>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_antialiasing**\ (\ value\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ )
|
||
- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing**\ (\ )
|
||
|
||
Шрифт антиалюзивний режим.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_data:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`PackedByteArray<class_PackedByteArray>` **data** = ``PackedByteArray()`` :ref:`🔗<class_FontFile_property_data>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_data**\ (\ value\: :ref:`PackedByteArray<class_PackedByteArray>`\ )
|
||
- :ref:`PackedByteArray<class_PackedByteArray>` **get_data**\ (\ )
|
||
|
||
Зміст динамічного файлу джерела шрифту.
|
||
|
||
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_disable_embedded_bitmaps:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true`` :ref:`🔗<class_FontFile_property_disable_embedded_bitmaps>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_disable_embedded_bitmaps**\ (\ )
|
||
|
||
Якщо встановити на ``true``, вбудоване завантаження бітма в шрифті вимкнено (розрядні та кольорові шрифти ігнорують цю властивість).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_fixed_size:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **fixed_size** = ``0`` :ref:`🔗<class_FontFile_property_fixed_size>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fixed_size**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_fixed_size**\ (\ )
|
||
|
||
Розмір шрифту, що використовується тільки для шрифтів бітма.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_fixed_size_scale_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **fixed_size_scale_mode** = ``0`` :ref:`🔗<class_FontFile_property_fixed_size_scale_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fixed_size_scale_mode**\ (\ value\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ )
|
||
- :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **get_fixed_size_scale_mode**\ (\ )
|
||
|
||
Режим масштабування, що використовується лише для растрових шрифтів з :ref:`fixed_size<class_FontFile_property_fixed_size>`, більшим за нуль.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_font_name:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`String<class_String>` **font_name** = ``""`` :ref:`🔗<class_FontFile_property_font_name>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_font_name**\ (\ value\: :ref:`String<class_String>`\ )
|
||
- :ref:`String<class_String>` **get_font_name**\ (\ )
|
||
|
||
Ім'я родини шрифтів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_font_stretch:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **font_stretch** = ``100`` :ref:`🔗<class_FontFile_property_font_stretch>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_font_stretch**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_font_stretch**\ (\ )
|
||
|
||
Розмір шрифту, у порівнянні з нормальною шириною. Відсоткова вартість між ``50%`` і ``200%``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_font_style:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_style** = ``0`` :ref:`🔗<class_FontFile_property_font_style>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_font_style**\ (\ value\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ )
|
||
- |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **get_font_style**\ (\ )
|
||
|
||
Прапори стилю шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_font_weight:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **font_weight** = ``400`` :ref:`🔗<class_FontFile_property_font_weight>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_font_weight**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_font_weight**\ (\ )
|
||
|
||
Вага (брудність) шрифту. Значення в діапазоні ``100...999``, нормальна вага шрифту ``400``, незначна вага шрифту ``700``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_force_autohinter:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **force_autohinter** = ``false`` :ref:`🔗<class_FontFile_property_force_autohinter>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_force_autohinter**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_force_autohinter**\ (\ )
|
||
|
||
Якщо встановити до ``true``, автоматично закріплюється і віддають перевагу над шрифтом вбудованим натяком. Використовуються тільки динамічні шрифти (MSDF шрифти не підтримують підказки).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_generate_mipmaps:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` :ref:`🔗<class_FontFile_property_generate_mipmaps>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_generate_mipmaps**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_generate_mipmaps**\ (\ )
|
||
|
||
Якщо встановити на ``true``, генеруйте карти для текстур шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_hinting:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1`` :ref:`🔗<class_FontFile_property_hinting>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_hinting**\ (\ value\: :ref:`Hinting<enum_TextServer_Hinting>`\ )
|
||
- :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting**\ (\ )
|
||
|
||
Режим натяження шрифту. Використовується тільки динамічними шрифтами.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_keep_rounding_remainders:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **keep_rounding_remainders** = ``true`` :ref:`🔗<class_FontFile_property_keep_rounding_remainders>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_keep_rounding_remainders**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_keep_rounding_remainders**\ (\ )
|
||
|
||
Якщо встановлено значення ``true``, під час вирівнювання гліфів до меж пікселів залишки округлення накопичуються для забезпечення більш рівномірного розподілу гліфів. Цей параметр не діє, якщо ввімкнено субпіксельне позиціонування.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_modulate_color_glyphs:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **modulate_color_glyphs** = ``false`` :ref:`🔗<class_FontFile_property_modulate_color_glyphs>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_modulate_color_glyphs**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_modulate_color_glyphs**\ (\ )
|
||
|
||
Якщо встановлено значення ``true``, колірна модуляція застосовується під час малювання кольорових гліфів, інакше вона застосовується лише до монохромних гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_msdf_pixel_range:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **msdf_pixel_range** = ``16`` :ref:`🔗<class_FontFile_property_msdf_pixel_range>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_msdf_pixel_range**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_msdf_pixel_range**\ (\ )
|
||
|
||
Ширина діапазону навколо форми між мінімальною і максимальною відкритою Якщо ви використовуєте шрифти, :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` необхідно встановити принаймні *twice* розмір найбільшого шрифту. ``16`` дозволяє визначити розміри до ``8``, щоб виглядати правильно.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_msdf_size:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **msdf_size** = ``48`` :ref:`🔗<class_FontFile_property_msdf_size>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_msdf_size**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_msdf_size**\ (\ )
|
||
|
||
Розмір шрифту джерела використовується для створення текстур MSDF. Найвищі значення дозволяють більш точність, але повільніше рендерити і вимагати більше пам'яті. Тільки збільшити це значення, якщо ви помітили видимий недолік точності в рендерингу glyph.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_multichannel_signed_distance_field:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` :ref:`🔗<class_FontFile_property_multichannel_signed_distance_field>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_multichannel_signed_distance_field**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_multichannel_signed_distance_field**\ (\ )
|
||
|
||
Якщо встановити до ``true``, glyphs всіх розмірів подаються за допомогою одного багатоканального пульта дистанційного поля (MSDF) з динамічних даних шрифтів. Оскільки цей підхід не спирається на растровий шрифт кожного разу його зміни розміру, це дозволяє переосмислити шрифт в режимі реального часу без штрафних характеристик. Текст також не буде виглядати зерно для :ref:`Control<class_Control>`, які масштабуються (або для :ref:`Label3D<class_Label3D>`, виданого з далекої відстані. Як знизу, підказка шрифту не доступна з MSDF. Недолік шрифту може призвести до меншої кількості хрустких і менш читаних шрифтів у невеликих розмірах.
|
||
|
||
\ **Примітка:** Якщо за допомогою контурів шрифтів, :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` повинна бути встановлена принаймні *twice* розмір найбільшого шрифту.
|
||
|
||
\ **Примітка:** MSDF шрифт рендеринг не рендерує гліфи з перекриттям форм правильно. Передавання форм не діє за стандартом OpenType, але все ще зустрічається в багатьох файлах шрифту, особливо тих, які перетворюються на Google Fonts. Щоб уникнути проблем з перекриттям гліфів, розгляньте завантаження файлу шрифту безпосередньо з вибраного типу замість перекриття на Google Fonts.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_opentype_feature_overrides:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **opentype_feature_overrides** = ``{}`` :ref:`🔗<class_FontFile_property_opentype_feature_overrides>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_opentype_feature_overrides**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ )
|
||
- :ref:`Dictionary<class_Dictionary>` **get_opentype_feature_overrides**\ (\ )
|
||
|
||
Відкрито Функція типу встановлюється надряддя.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_oversampling:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **oversampling** = ``0.0`` :ref:`🔗<class_FontFile_property_oversampling>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_oversampling**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_oversampling**\ (\ )
|
||
|
||
Якщо встановлено додатне значення, перевизначає коефіцієнт передискретизації області перегляду, в якій використовується цей шрифт. Див. :ref:`Viewport.oversampling<class_Viewport_property_oversampling>`. Це значення не перевизначає параметр ``oversampling`` методів ``draw_*``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_style_name:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`String<class_String>` **style_name** = ``""`` :ref:`🔗<class_FontFile_property_style_name>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_font_style_name**\ (\ value\: :ref:`String<class_String>`\ )
|
||
- :ref:`String<class_String>` **get_font_style_name**\ (\ )
|
||
|
||
Ім'я стилю шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_property_subpixel_positioning:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1`` :ref:`🔗<class_FontFile_property_subpixel_positioning>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_subpixel_positioning**\ (\ value\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ )
|
||
- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning**\ (\ )
|
||
|
||
Режим позиціонування шрифту glyph. Підпіксельне позиціонування забезпечує формувальний текст та кращий кермінг для менших розмірів шрифтів, за вартістю використання більшої кількості пам'яті та швидкості растрової обробки нижнього шрифту. Використовуйте :ref:`TextServer. SUBPIXEL_SETTINGING_AUTO<class_TextServer_constant_ SUBPIXEL_SETTINGING_AUTO>` для автоматичного включення його на основі розміру шрифту.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_FontFile_method_clear_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_cache**\ (\ ) :ref:`🔗<class_FontFile_method_clear_cache>`
|
||
|
||
Видаліть всі записи кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_clear_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_glyphs**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_clear_glyphs>`
|
||
|
||
Видаліть всю інформацію про гліф з вхідного кешу.
|
||
|
||
\ **Примітка:** Ця функція не видаляє текстури, пов'язані з гліфами, використовувати :ref:`видалення_текстура()<class_FontFile_method_видалення_текстура>` для видалення їх вручну.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_clear_kerning_map:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_kerning_map**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_clear_kerning_map>`
|
||
|
||
Видаліть всі накладки керма.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_clear_size_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_size_cache**\ (\ cache_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_clear_size_cache>`
|
||
|
||
Видаліть всі розміри шрифтів з вхідного кешу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_clear_textures:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **clear_textures**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_clear_textures>`
|
||
|
||
Видаляє всі текстури з запису кешу шрифтів.
|
||
|
||
\ **Примітка:** Ця функція не видаляє гліфи, пов'язані з текстурою, використовуйте :ref:`remove_glyph()<class_FontFile_method_remove_glyph>`, щоб видалити їх вручну.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_ascent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_cache_ascent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_ascent>`
|
||
|
||
Повертає розмір шрифту (номер пікселів вище базової лінії).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_cache_count**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_count>`
|
||
|
||
Повертає кількість записів кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_descent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_cache_descent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_descent>`
|
||
|
||
Повертає піксельний спуск (номер пікселів нижче базової лінії).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_scale:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_cache_scale**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_scale>`
|
||
|
||
Повертає фактор масштабування кольорового бітмапа шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_underline_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_cache_underline_position**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_underline_position>`
|
||
|
||
Повертає піксельний зсув нижньої лінії нижче базової лінії.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_cache_underline_thickness:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_cache_underline_thickness**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_underline_thickness>`
|
||
|
||
Повертає товщину нижньої лінії в пікселях.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_char_from_glyph_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_char_from_glyph_index**\ (\ size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_char_from_glyph_index>`
|
||
|
||
Повертає код персонажа, пов'язаний з ``glyph_index``, або ``0``, якщо ``glyph_index`` недійсний. :ref:`get_glyph_index()<class_FontFile_method_get_glyph_index>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_embolden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_embolden**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_embolden>`
|
||
|
||
Повертає міцність емболдену, якщо не дорівнює нулю, емболденує параметри шрифту. Негативні значення зменшують товщину контуру.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_extra_baseline_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_extra_baseline_offset**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_extra_baseline_offset>`
|
||
|
||
Повертає додатковий базовий зсув (як дроб висоти шрифту).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_extra_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_extra_spacing**\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_FontFile_method_get_extra_spacing>`
|
||
|
||
Повертає інтервал для ``spacing`` у пікселях (не відносно розміру шрифту).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_face_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_face_index**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_face_index>`
|
||
|
||
Повертає індекс активного обличчя в колекції TrueType / OpenType.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_advance:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_glyph_advance**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_advance>`
|
||
|
||
Повернення glyph заздалегідь (зміщення наступного glyph).
|
||
|
||
\ **Примітка:** Перевага для контурів glyph є таким же, як основа glyph заздалегідь і не збережена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_glyph_index**\ (\ size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_index>`
|
||
|
||
Повертає індекс гліфів ``char``, додатково модифікований ``version_selector``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_glyph_list**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_list>`
|
||
|
||
Повертає список рендерованих гліфів в записі кешу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_glyph_offset**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_offset>`
|
||
|
||
Повернення гліфів з базової лінії.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_glyph_size**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_size>`
|
||
|
||
Повертає розмір гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_texture_idx:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_glyph_texture_idx**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_texture_idx>`
|
||
|
||
Повертає індекс кеш-фактури, що містить гліф.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_glyph_uv_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **get_glyph_uv_rect**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_uv_rect>`
|
||
|
||
Повертає прямокутник в текстурі кешу, що містить гліф.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_kerning>`
|
||
|
||
Повертає кермо для пари гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_kerning_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_kerning_list**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_kerning_list>`
|
||
|
||
Повертає список кермових накладів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_language_support_override**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_FontFile_method_get_language_support_override>`
|
||
|
||
Повертає ``true``, якщо для ``language`` увімкнено заміну підтримки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_language_support_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **get_language_support_overrides**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_language_support_overrides>`
|
||
|
||
Повернути список мовної підтримки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_script_support_override**\ (\ script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_FontFile_method_get_script_support_override>`
|
||
|
||
Повертає ``true``, якщо для сценарію ``script`` увімкнено перевизначення підтримки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_script_support_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **get_script_support_overrides**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_script_support_overrides>`
|
||
|
||
Повертає список сценаріїв, що підтримує перевизначення.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_size_cache_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_size_cache_list**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_size_cache_list>`
|
||
|
||
Повертає список розмірів шрифтів у кеші. Кожен розмір :ref:`Vector2i<class_Vector2i>` з розмірами шрифту та розміром контурів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_texture_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_texture_count**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_count>`
|
||
|
||
Повертає кількість текстур, що використовуються записом кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_texture_image:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Image<class_Image>` **get_texture_image**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_image>`
|
||
|
||
Повертає копію зображення кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_texture_offsets:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_texture_offsets**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_offsets>`
|
||
|
||
Повертає копію масиву, що містить дані про упаковку glyph.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform2D<class_Transform2D>` **get_transform**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_transform>`
|
||
|
||
Повертає 2D трансформацію, наноситься на шрифтові контури, може використовуватися для сланцевих, фліпихових і обертальних гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_get_variation_coordinates:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **get_variation_coordinates**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_variation_coordinates>`
|
||
|
||
Повертає варіаційні координати за вказаний запис кешу шрифту. Див. :ref:`Font.get_supported_variation_list()<class_Font_method_get_supported_variation_list>` для отримання додаткової інформації.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_load_bitmap_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Error<enum_@GlobalScope_Error>` **load_bitmap_font**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_load_bitmap_font>`
|
||
|
||
Завантажує шрифт AngelCode BMFont (.fnt, .font) з файлу ``path``.
|
||
|
||
\ **Навігація:** Цей метод повинен бути використаний тільки в редакторі або в випадках, коли вам потрібно завантажити зовнішні шрифти в режимі run-time, такі як шрифти, розташовані в каталозі ``user://``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_load_dynamic_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Error<enum_@GlobalScope_Error>` **load_dynamic_font**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_load_dynamic_font>`
|
||
|
||
Завантажує динамічний шрифт TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) або Type 1 (.pfb, .pfm) із файлу ``path``.
|
||
|
||
\ **Попередження:** Цей метод слід використовувати лише в редакторі або у випадках, коли вам потрібно завантажити зовнішні шрифти під час виконання, наприклад шрифти, розташовані за адресою ``user://`` каталог.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_cache**\ (\ cache_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_cache>`
|
||
|
||
Вилучає вказаний запис кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_glyph**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_glyph>`
|
||
|
||
Видаліть зазначену інформацію про гліф з запису кешу.
|
||
|
||
\ **Примітка:** Ця функція не видаляє текстури, пов'язані з гліфами, використовувати :ref:`remove_texture()<class_FontFile_method_remove_texture>` для видалення їх вручну.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_remove_kerning>`
|
||
|
||
Знімає кермовий наклад для пари гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_language_support_override**\ (\ language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_remove_language_support_override>`
|
||
|
||
Видалення мовної підтримки наречених.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_script_support_override**\ (\ script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_remove_script_support_override>`
|
||
|
||
Вилучає підтримку сценаріїв наднаряддя.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_size_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_size_cache**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_remove_size_cache>`
|
||
|
||
Вилучає вказаний розмір шрифту з запису кешу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_remove_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_texture**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_texture>`
|
||
|
||
Видаліть зазначену текстуру з вхідного кешу.
|
||
|
||
\ **Примітка:** Ця функція не виведе гліфи, пов'язані з фактурою. Видалити їх вручну за допомогою :ref:`remove_glyph()<class_FontFile_method_remove_glyph>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_render_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **render_glyph**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_render_glyph>`
|
||
|
||
Рендери вказані гліф до текстури кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_render_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **render_range**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_render_range>`
|
||
|
||
Рендери діапазону символів до текстури кешу шрифту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_cache_ascent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cache_ascent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_ascent>`
|
||
|
||
Встановлює сходження шрифту (номер пікселів над базовою лінією).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_cache_descent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cache_descent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_descent>`
|
||
|
||
Налаштовує піксельний спуск (номер пікселів нижче базової лінії).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_cache_scale:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cache_scale**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_scale>`
|
||
|
||
Встановлює фактор масштабування шрифту кольорової бітмапи.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_cache_underline_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cache_underline_position**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_underline_position>`
|
||
|
||
Налаштовує піксельний зсув нижньої лінії нижче базової лінії.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_cache_underline_thickness:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_cache_underline_thickness**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_underline_thickness>`
|
||
|
||
Встановлює товщину нижньої лінії в пікселях.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_embolden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_embolden**\ (\ cache_index\: :ref:`int<class_int>`, strength\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_embolden>`
|
||
|
||
Налаштовує емболдену міцність, якщо не дорівнює нулю, емболденує контури шрифту. Негативні значення зменшують товщину контуру.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_extra_baseline_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_extra_baseline_offset**\ (\ cache_index\: :ref:`int<class_int>`, baseline_offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_extra_baseline_offset>`
|
||
|
||
Набори додаткового базового офсету (як дроб висоти шрифту).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_extra_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_extra_spacing**\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_extra_spacing>`
|
||
|
||
Встановлює інтервал для ``spacing`` на ``value`` у пікселях (не відносно розміру шрифту).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_face_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_face_index**\ (\ cache_index\: :ref:`int<class_int>`, face_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_face_index>`
|
||
|
||
Встановіть активний індекс обличчя в колекції TrueType / OpenType.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_glyph_advance:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glyph_advance**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_advance>`
|
||
|
||
Набори glyph заздалегідь (зміщення наступного glyph).
|
||
|
||
\ **Примітка:** Перевага для контурів glyph є таким же, як основа glyph заздалегідь і не збережена.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_glyph_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glyph_offset**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_offset>`
|
||
|
||
Комплекти гліфового офсету з базової лінії.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_glyph_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glyph_size**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_size>`
|
||
|
||
Набори розмірів гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_glyph_texture_idx:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glyph_texture_idx**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_texture_idx>`
|
||
|
||
Встановлює індекс кеш-фактури, що містить гліф.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_glyph_uv_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glyph_uv_rect**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_uv_rect>`
|
||
|
||
Встановлює прямокутник в текстурі кешу, що містить гліф.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_kerning>`
|
||
|
||
Набори керма для пари гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_language_support_override**\ (\ language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_FontFile_method_set_language_support_override>`
|
||
|
||
Додає перевизначення для :ref:`Font.is_language_supported()<class_Font_method_is_language_supported>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_script_support_override**\ (\ script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_FontFile_method_set_script_support_override>`
|
||
|
||
Додає перевизначення для :ref:`Font.is_script_supported()<class_Font_method_is_script_supported>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_texture_image:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_texture_image**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_FontFile_method_set_texture_image>`
|
||
|
||
Налаштовує зображення текстури шрифту кешу.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_texture_offsets:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_texture_offsets**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_FontFile_method_set_texture_offsets>`
|
||
|
||
Встановлює масив, що містить дані про упаковку glyph.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_transform**\ (\ cache_index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_FontFile_method_set_transform>`
|
||
|
||
Набори 2D трансформуються, нанесені на шрифтові контури, можуть використовуватися для сланцевих, флипсових і поворотних гліфів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_FontFile_method_set_variation_coordinates:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_variation_coordinates**\ (\ cache_index\: :ref:`int<class_int>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_FontFile_method_set_variation_coordinates>`
|
||
|
||
Налаштовує координати варіації для вказаного запису кешу шрифту. Див. :ref:`Font.get_supported_variation_list()<class_Font_method_get_supported_variation_list>` для отримання додаткової інформації.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|