Files
godot-docs-l10n/classes/zh_Hans/class_resourceimporterbmfont.rst

96 lines
3.7 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_ResourceImporterBMFont:
ResourceImporterBMFont
======================
**继承:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
导入 BMFont\ ``.fnt``\ )格式的位图字体。
.. rst-class:: classref-introduction-group
描述
----
BMFont 格式是由 `BMFont <https://www.angelcode.com/products/bmfont/>`__ 程序创建的格式。也存在许多与 BMFont 兼容的程序,例如 `BMGlyph <https://www.bmglyph.com/>`__\ 。
与 :ref:`ResourceImporterImageFont<class_ResourceImporterImageFont>` 相比,\ **ResourceImporterBMFont** 能够支持不同字形宽高的位图字体。
另见 :ref:`ResourceImporterDynamicFont<class_ResourceImporterDynamicFont>`\ 。
.. rst-class:: classref-introduction-group
教程
----
- `位图字体——使用字体 <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__
.. rst-class:: classref-reftable-group
属性
----
.. table::
:widths: auto
+---------------------------+-------------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterBMFont_property_compress>` | ``true`` |
+---------------------------+-------------------------------------------------------------------------+----------+
| :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterBMFont_property_fallbacks>` | ``[]`` |
+---------------------------+-------------------------------------------------------------------------+----------+
| :ref:`int<class_int>` | :ref:`scaling_mode<class_ResourceImporterBMFont_property_scaling_mode>` | ``2`` |
+---------------------------+-------------------------------------------------------------------------+----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_ResourceImporterBMFont_property_compress:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterBMFont_property_compress>`
如果为 ``true``\ ,则会对得到的字体使用无损压缩。
.. rst-class:: classref-item-separator
----
.. _class_ResourceImporterBMFont_property_fallbacks:
.. rst-class:: classref-property
:ref:`Array<class_Array>` **fallbacks** = ``[]`` :ref:`🔗<class_ResourceImporterBMFont_property_fallbacks>`
回退字体列表,在这个位图字体中未找到某个字形时使用。优先尝试靠前的字体。
.. rst-class:: classref-item-separator
----
.. _class_ResourceImporterBMFont_property_scaling_mode:
.. rst-class:: classref-property
:ref:`int<class_int>` **scaling_mode** = ``2`` :ref:`🔗<class_ResourceImporterBMFont_property_scaling_mode>`
字体缩放模式。
.. |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 (无返回值。)`