mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
190 lines
8.5 KiB
ReStructuredText
190 lines
8.5 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServerManager.xml.
|
|
|
|
.. _class_TextServerManager:
|
|
|
|
TextServerManager
|
|
=================
|
|
|
|
**继承:** :ref:`Object<class_Object>`
|
|
|
|
用于管理 :ref:`TextServer<class_TextServer>` 实现的单例。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
描述
|
|
----
|
|
|
|
**TextServerManager** 是加载、枚举和切换 :ref:`TextServer<class_TextServer>` 的 API 后端。
|
|
|
|
\ **注意:**\ 文本服务器可以在运行时切换,但会导致所有字体和文本缓冲区失效。请确保在切换之前卸载所有控件、字体和主题。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`add_interface<class_TextServerManager_method_add_interface>`\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`TextServer<class_TextServer>` | :ref:`find_interface<class_TextServerManager_method_find_interface>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`TextServer<class_TextServer>` | :ref:`get_interface<class_TextServerManager_method_get_interface>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_interface_count<class_TextServerManager_method_get_interface_count>`\ (\ ) |const| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_interfaces<class_TextServerManager_method_get_interfaces>`\ (\ ) |const| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`TextServer<class_TextServer>` | :ref:`get_primary_interface<class_TextServerManager_method_get_primary_interface>`\ (\ ) |const| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`remove_interface<class_TextServerManager_method_remove_interface>`\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_primary_interface<class_TextServerManager_method_set_primary_interface>`\ (\ index\: :ref:`TextServer<class_TextServer>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
信号
|
|
----
|
|
|
|
.. _class_TextServerManager_signal_interface_added:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**interface_added**\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TextServerManager_signal_interface_added>`
|
|
|
|
添加新接口时触发。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_signal_interface_removed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**interface_removed**\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TextServerManager_signal_interface_removed>`
|
|
|
|
当接口被移除时触发。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法说明
|
|
--------
|
|
|
|
.. _class_TextServerManager_method_add_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **add_interface**\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_add_interface>`
|
|
|
|
注册 :ref:`TextServer<class_TextServer>` 接口。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_find_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`TextServer<class_TextServer>` **find_interface**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServerManager_method_find_interface>`
|
|
|
|
根据名称 ``name`` 查找接口。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_get_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`TextServer<class_TextServer>` **get_interface**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interface>`
|
|
|
|
返回在给定索引处注册的接口。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_get_interface_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_interface_count**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interface_count>`
|
|
|
|
返回当前注册的接口数。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_get_interfaces:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_interfaces**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interfaces>`
|
|
|
|
返回可用接口的列表,包含每个接口的索引号和名称。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_get_primary_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`TextServer<class_TextServer>` **get_primary_interface**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_primary_interface>`
|
|
|
|
返回当前使用的主 :ref:`TextServer<class_TextServer>` 接口。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_remove_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **remove_interface**\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_remove_interface>`
|
|
|
|
移除接口。在移除接口之前,应释放所有字体和塑形文本的缓存。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TextServerManager_method_set_primary_interface:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_primary_interface**\ (\ index\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_set_primary_interface>`
|
|
|
|
设置主 :ref:`TextServer<class_TextServer>` 接口。
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
|
.. |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 (无返回值。)`
|