mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
4648 lines
372 KiB
ReStructuredText
4648 lines
372 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_TextServer:
|
||
|
||
TextServer
|
||
==========
|
||
|
||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
**派生:** :ref:`TextServerExtension<class_TextServerExtension>`
|
||
|
||
字体管理和文本渲染的服务器接口。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
描述
|
||
----
|
||
|
||
**TextServer** 即文本服务器,是管理字体、渲染文本的 API 后端。
|
||
|
||
\ **注意:**\ 这是底层 API,请考虑改用 :ref:`TextLine<class_TextLine>`\ 、\ :ref:`TextParagraph<class_TextParagraph>`\ 、\ :ref:`Font<class_Font>` 等类。
|
||
|
||
这是抽象类,获取当前活动的 **TextServer** 实例请使用如下代码:
|
||
|
||
|
||
.. tabs::
|
||
|
||
.. code-tab:: gdscript
|
||
|
||
var ts = TextServerManager.get_primary_interface()
|
||
|
||
.. code-tab:: csharp
|
||
|
||
var ts = TextServerManager.GetPrimaryInterface();
|
||
|
||
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>`\ (\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`create_font_linked_variation<class_TextServer_method_create_font_linked_variation>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>`\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>`\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_clear_system_fallback_cache<class_TextServer_method_font_clear_system_fallback_cache>`\ (\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_baseline_offset<class_TextServer_method_font_get_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_get_disable_embedded_bitmaps<class_TextServer_method_font_get_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`font_get_fixed_size_scale_mode<class_TextServer_method_font_get_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>`\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_get_keep_rounding_remainders<class_TextServer_method_font_get_keep_rounding_remainders>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`font_get_size_cache_info<class_TextServer_method_font_get_size_cache_info>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_get_style<class_TextServer_method_font_get_style>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_supported_glyphs<class_TextServer_method_font_get_supported_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>`\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_modulate_color_glyphs<class_TextServer_method_font_is_modulate_color_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_render_range<class_TextServer_method_font_render_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_baseline_offset<class_TextServer_method_font_set_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_data<class_TextServer_method_font_set_data>`\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_descent<class_TextServer_method_font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_disable_embedded_bitmaps<class_TextServer_method_font_set_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_fixed_size_scale_mode<class_TextServer_method_font_set_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>`\ (\ oversampling\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_keep_rounding_remainders<class_TextServer_method_font_set_keep_rounding_remainders>`\ (\ font_rid\: :ref:`RID<class_RID>`, keep_rounding_remainders\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_modulate_color_glyphs<class_TextServer_method_font_set_modulate_color_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_name<class_TextServer_method_font_set_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_scale<class_TextServer_method_font_set_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_style<class_TextServer_method_font_set_style>`\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_transform<class_TextServer_method_font_set_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`font_set_weight<class_TextServer_method_font_set_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`free_rid<class_TextServer_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>`\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_support_data<class_TextServer_method_get_support_data>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>`\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_locale_using_support_data<class_TextServer_method_is_locale_using_support_data>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_valid_letter<class_TextServer_method_is_valid_letter>`\ (\ unicode\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>`\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>`\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_get_run_count<class_TextServer_method_shaped_get_run_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_get_run_direction<class_TextServer_method_shaped_get_run_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`shaped_get_run_font_rid<class_TextServer_method_shaped_get_run_font_rid>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_get_run_font_size<class_TextServer_method_shaped_get_run_font_size>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`shaped_get_run_language<class_TextServer_method_shaped_get_run_language>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`shaped_get_run_object<class_TextServer_method_shaped_get_run_object>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_get_run_range<class_TextServer_method_shaped_get_run_range>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`shaped_get_run_text<class_TextServer_method_shaped_get_run_text>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_embedded_object<class_TextServer_method_shaped_get_span_embedded_object>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_object<class_TextServer_method_shaped_get_span_object>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`shaped_get_span_text<class_TextServer_method_shaped_get_span_text>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`shaped_get_text<class_TextServer_method_shaped_get_text>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>`\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`shaped_text_duplicate<class_TextServer_method_shaped_text_duplicate>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>`\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_object_glyph<class_TextServer_method_shaped_text_get_object_glyph>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_object_range<class_TextServer_method_shaped_text_get_object_range>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_has_object<class_TextServer_method_shaped_text_has_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>`\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_custom_ellipsis<class_TextServer_method_shaped_text_set_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>`\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`string_to_title<class_TextServer_method_string_to_title>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
枚举
|
||
----
|
||
|
||
.. _enum_TextServer_FontAntialiasing:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **FontAntialiasing**: :ref:`🔗<enum_TextServer_FontAntialiasing>`
|
||
|
||
.. _class_TextServer_constant_FONT_ANTIALIASING_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_NONE** = ``0``
|
||
|
||
字体字形栅格化为 1 位的位图。
|
||
|
||
.. _class_TextServer_constant_FONT_ANTIALIASING_GRAY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_GRAY** = ``1``
|
||
|
||
字体字形栅格化为 8 位的灰度抗锯齿位图。
|
||
|
||
.. _class_TextServer_constant_FONT_ANTIALIASING_LCD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **FONT_ANTIALIASING_LCD** = ``2``
|
||
|
||
字体字形针对 LCD 屏幕栅格化。
|
||
|
||
LCD 次像素布局由项目设置 :ref:`ProjectSettings.gui/theme/lcd_subpixel_layout<class_ProjectSettings_property_gui/theme/lcd_subpixel_layout>` 的值决定。
|
||
|
||
LCD 次像素抗锯齿模式仅适用于在 2D 中渲染横向、无缩放的文本。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_FontLCDSubpixelLayout:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **FontLCDSubpixelLayout**: :ref:`🔗<enum_TextServer_FontLCDSubpixelLayout>`
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0``
|
||
|
||
未知或不支持的次像素布局,禁用 LCD 次像素抗锯齿。
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1``
|
||
|
||
水平 RGB 次像素布局。
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2``
|
||
|
||
水平 BGR 次像素布局。
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3``
|
||
|
||
垂直 RGB 次像素布局。
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4``
|
||
|
||
垂直 BGR 次像素布局。
|
||
|
||
.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5``
|
||
|
||
代表 :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` 枚举的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_Direction:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **Direction**: :ref:`🔗<enum_TextServer_Direction>`
|
||
|
||
.. _class_TextServer_constant_DIRECTION_AUTO:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **DIRECTION_AUTO** = ``0``
|
||
|
||
文本的书写方向由根据内容和当前区域设置确定。
|
||
|
||
.. _class_TextServer_constant_DIRECTION_LTR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **DIRECTION_LTR** = ``1``
|
||
|
||
文本从左至右书写。
|
||
|
||
.. _class_TextServer_constant_DIRECTION_RTL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **DIRECTION_RTL** = ``2``
|
||
|
||
文本从右至左书写。
|
||
|
||
.. _class_TextServer_constant_DIRECTION_INHERITED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **DIRECTION_INHERITED** = ``3``
|
||
|
||
文本的书写方向与基础字符串书写方向一致。仅用于 BiDi 覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_Orientation:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **Orientation**: :ref:`🔗<enum_TextServer_Orientation>`
|
||
|
||
.. _class_TextServer_constant_ORIENTATION_HORIZONTAL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_HORIZONTAL** = ``0``
|
||
|
||
文本水平书写。
|
||
|
||
.. _class_TextServer_constant_ORIENTATION_VERTICAL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Orientation<enum_TextServer_Orientation>` **ORIENTATION_VERTICAL** = ``1``
|
||
|
||
从左至右的文本从上到下书写。
|
||
|
||
从右至左的文本从下到上书写。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_JustificationFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **JustificationFlag**: :ref:`🔗<enum_TextServer_JustificationFlag>`
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_NONE** = ``0``
|
||
|
||
不两端对齐文本。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_KASHIDA:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_KASHIDA** = ``1``
|
||
|
||
通过添加和移除 Kashida 来两端对齐文本。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_WORD_BOUND** = ``2``
|
||
|
||
通过更改单词之间空格的宽度来两端对齐文本。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4``
|
||
|
||
从两端对齐的文本中移除前缀和后缀的空格。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_AFTER_LAST_TAB** = ``8``
|
||
|
||
仅对最后一个制表符之后的文本应用两端对齐。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16``
|
||
|
||
使用省略号对修剪行应用对齐。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE** = ``32``
|
||
|
||
段落中的最后一行不应用两端对齐。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64``
|
||
|
||
段落中存在可见字符的最后一行不应用两端对齐(优先于 :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>`\ )。
|
||
|
||
.. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`JustificationFlag<enum_TextServer_JustificationFlag>` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128``
|
||
|
||
始终对只有一行的段落应用两端对齐(忽略 :ref:`JUSTIFICATION_SKIP_LAST_LINE<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE>` 和 :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS<class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS>`\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_AutowrapMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **AutowrapMode**: :ref:`🔗<enum_TextServer_AutowrapMode>`
|
||
|
||
.. _class_TextServer_constant_AUTOWRAP_OFF:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_OFF** = ``0``
|
||
|
||
自动换行已禁用。
|
||
|
||
.. _class_TextServer_constant_AUTOWRAP_ARBITRARY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_ARBITRARY** = ``1``
|
||
|
||
让文本在节点的边界矩形内自动换行,允许在任意位置断行,在空间非常有限的情况下非常有用。
|
||
|
||
.. _class_TextServer_constant_AUTOWRAP_WORD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD** = ``2``
|
||
|
||
让文本在节点的边界矩形内自动换行,允许在单词之间进行软换行。
|
||
|
||
.. _class_TextServer_constant_AUTOWRAP_WORD_SMART:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **AUTOWRAP_WORD_SMART** = ``3``
|
||
|
||
行为与 :ref:`AUTOWRAP_WORD<class_TextServer_constant_AUTOWRAP_WORD>` 类似,但如果一行的大小无法放下该单词,则会强制断开该单词。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_LineBreakFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **LineBreakFlag**: :ref:`🔗<enum_TextServer_LineBreakFlag>`
|
||
|
||
.. _class_TextServer_constant_BREAK_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_NONE** = ``0``
|
||
|
||
不换行。
|
||
|
||
.. _class_TextServer_constant_BREAK_MANDATORY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_MANDATORY** = ``1``
|
||
|
||
在强制换行符处换行(例如 ``"\n"``\ )。
|
||
|
||
.. _class_TextServer_constant_BREAK_WORD_BOUND:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_WORD_BOUND** = ``2``
|
||
|
||
在单词之间换行。
|
||
|
||
.. _class_TextServer_constant_BREAK_GRAPHEME_BOUND:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_GRAPHEME_BOUND** = ``4``
|
||
|
||
在任何不相连的字素之间换行。
|
||
|
||
.. _class_TextServer_constant_BREAK_ADAPTIVE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_ADAPTIVE** = ``8``
|
||
|
||
只应与 :ref:`BREAK_WORD_BOUND<class_TextServer_constant_BREAK_WORD_BOUND>` 一起使用,如果不可能在单词之间换行,则在任何不相连的字素之间换行。
|
||
|
||
.. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_EDGE_SPACES** = ``16``
|
||
|
||
**已弃用:** Use ``BREAK_TRIM_START_EDGE_SPACES | BREAK_TRIM_END_EDGE_SPACES`` instead.
|
||
|
||
移除每一行头尾的空格。
|
||
|
||
.. _class_TextServer_constant_BREAK_TRIM_INDENT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_INDENT** = ``32``
|
||
|
||
从第一行之后的所有行中减去第一行的缩进宽度。
|
||
|
||
.. _class_TextServer_constant_BREAK_TRIM_START_EDGE_SPACES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_START_EDGE_SPACES** = ``64``
|
||
|
||
自动换行后,移除行首的空格和换行字符。
|
||
|
||
例如将 ``test \n next`` 换行后,如果设置该标志则第二段为 ``next``\ ,如果未设置则为 `` next``\ 。
|
||
|
||
.. _class_TextServer_constant_BREAK_TRIM_END_EDGE_SPACES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_END_EDGE_SPACES** = ``128``
|
||
|
||
自动换行后,移除行尾的空格和换行字符。
|
||
|
||
例如将 ``test \n next`` 换行后,如果设置该标志则第一段为 ``test``\ ,如果未设置则为 ``test \n``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_VisibleCharactersBehavior:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **VisibleCharactersBehavior**: :ref:`🔗<enum_TextServer_VisibleCharactersBehavior>`
|
||
|
||
.. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_BEFORE_SHAPING** = ``0``
|
||
|
||
塑形前截断文本。例如,增加 :ref:`Label.visible_characters<class_Label_property_visible_characters>` 或 :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` 的值在视觉上会与输入该文本等价。
|
||
|
||
\ **注意:**\ 该模式下完全不处理截断前的文本,断行和计算大小时也不会考虑。
|
||
|
||
.. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_CHARS_AFTER_SHAPING** = ``1``
|
||
|
||
显示映射到文本开头的前 :ref:`Label.visible_characters<class_Label_property_visible_characters>` 或 :ref:`RichTextLabel.visible_characters<class_RichTextLabel_property_visible_characters>` 个字符的字形。
|
||
|
||
.. _class_TextServer_constant_VC_GLYPHS_AUTO:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_AUTO** = ``2``
|
||
|
||
显示字形数量由 :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` 或 :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` 决定,从左至右计数还是从右至左计数由 :ref:`Control.layout_direction<class_Control_property_layout_direction>` 的值决定。
|
||
|
||
.. _class_TextServer_constant_VC_GLYPHS_LTR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_LTR** = ``3``
|
||
|
||
显示字形数量由 :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` 或 :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` 决定,从左侧开始计数。
|
||
|
||
.. _class_TextServer_constant_VC_GLYPHS_RTL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **VC_GLYPHS_RTL** = ``4``
|
||
|
||
显示字形数量由 :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` 或 :ref:`RichTextLabel.visible_ratio<class_RichTextLabel_property_visible_ratio>` 决定,从右侧开始计数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_OverrunBehavior:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **OverrunBehavior**: :ref:`🔗<enum_TextServer_OverrunBehavior>`
|
||
|
||
.. _class_TextServer_constant_OVERRUN_NO_TRIMMING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_NO_TRIMMING** = ``0``
|
||
|
||
不执行文本修剪。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_CHAR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_CHAR** = ``1``
|
||
|
||
逐字符修剪文本。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_WORD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD** = ``2``
|
||
|
||
逐单词修剪文本。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS** = ``3``
|
||
|
||
逐字符修剪文本,如果文本修剪后至少有 6 个字符,则会通过添加省略号来表示部分文本已隐藏。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4``
|
||
|
||
逐单词修剪文本,如果文本修剪后至少有 6 个字符,则会通过添加省略号来表示部分文本已隐藏。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS_FORCE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_ELLIPSIS_FORCE** = ``5``
|
||
|
||
逐字符修剪文本,通过添加省略号来表示部分文本已隐藏,不考虑文本修剪后的长度。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS_FORCE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **OVERRUN_TRIM_WORD_ELLIPSIS_FORCE** = ``6``
|
||
|
||
逐单词修剪文本,通过添加省略号来表示部分文本已隐藏,不考虑文本修剪后的长度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_TextOverrunFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **TextOverrunFlag**: :ref:`🔗<enum_TextServer_TextOverrunFlag>`
|
||
|
||
.. _class_TextServer_constant_OVERRUN_NO_TRIM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_NO_TRIM** = ``0``
|
||
|
||
不执行修剪。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM** = ``1``
|
||
|
||
当文本超过给定宽度时,修剪文本。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_TRIM_WORD_ONLY** = ``2``
|
||
|
||
逐词修剪文本,而不是逐字素修剪文本。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ADD_ELLIPSIS** = ``4``
|
||
|
||
决定是否应在文本末尾添加省略号。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_ENFORCE_ELLIPSIS** = ``8``
|
||
|
||
决定是否应在文本末尾强制添加省略号,该省略号无法被隐藏。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16``
|
||
|
||
在尝试修剪文本之前考虑文本是否对齐(请参阅 :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\ )。
|
||
|
||
.. _class_TextServer_constant_OVERRUN_SHORT_STRING_ELLIPSIS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_SHORT_STRING_ELLIPSIS** = ``32``
|
||
|
||
Determines whether the ellipsis should be added regardless of the string length, otherwise it is added only if the string is 6 characters or longer.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_GraphemeFlag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **GraphemeFlag**: :ref:`🔗<enum_TextServer_GraphemeFlag>`
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_VALID:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VALID** = ``1``
|
||
|
||
字素由字体支持,并且可以被绘制。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_RTL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_RTL** = ``2``
|
||
|
||
字素是从右至左或从下至上书写的一部分。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_VIRTUAL** = ``4``
|
||
|
||
字素不是源文本的一部分,而是通过两端对齐过程添加的。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_SPACE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SPACE** = ``8``
|
||
|
||
字素是空白字符。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_HARD** = ``16``
|
||
|
||
字素是强制换行点(例如 ``"\n"``\ )。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_BREAK_SOFT** = ``32``
|
||
|
||
字素是可选换行点(例如空格)。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_TAB:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_TAB** = ``64``
|
||
|
||
字素是制表符。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_ELONGATION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_ELONGATION** = ``128``
|
||
|
||
字素是 Kashida。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_PUNCTUATION** = ``256``
|
||
|
||
字素是标点符号。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_UNDERSCORE** = ``512``
|
||
|
||
字素是下划线字符。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_CONNECTED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_CONNECTED** = ``1024``
|
||
|
||
字素与前一个字素相连。在这个字素之前换行是不安全的。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048``
|
||
|
||
在这个字素之前插入 U+0640 以进行伸长是安全的。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096``
|
||
|
||
字素是内嵌对象的对象替换字符。
|
||
|
||
.. _class_TextServer_constant_GRAPHEME_IS_SOFT_HYPHEN:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SOFT_HYPHEN** = ``8192``
|
||
|
||
字素是一个软连字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_Hinting:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **Hinting**: :ref:`🔗<enum_TextServer_Hinting>`
|
||
|
||
.. _class_TextServer_constant_HINTING_NONE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NONE** = ``0``
|
||
|
||
禁用字体提示(更平滑但不那么清晰)。
|
||
|
||
.. _class_TextServer_constant_HINTING_LIGHT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Hinting<enum_TextServer_Hinting>` **HINTING_LIGHT** = ``1``
|
||
|
||
使用浅色字体提示模式。
|
||
|
||
.. _class_TextServer_constant_HINTING_NORMAL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Hinting<enum_TextServer_Hinting>` **HINTING_NORMAL** = ``2``
|
||
|
||
使用默认的字体微调模式(更锐利,但平滑度更低)。
|
||
|
||
\ **注意:**\ 此处的微调模式会改变字形的水平和垂直度量。应用于等宽字体时,可能会让部分字形的宽度发生变化。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_SubpixelPositioning:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **SubpixelPositioning**: :ref:`🔗<enum_TextServer_SubpixelPositioning>`
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_DISABLED** = ``0``
|
||
|
||
将字形的水平位置舍入至整数像素大小,每个字形光栅化一次。
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_AUTO** = ``1``
|
||
|
||
将字形的水平位置根据字体大小进行舍入。
|
||
|
||
- 如果字体大小小于等于 :ref:`SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE<class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE>`\ ,则舍入至四分之一像素大小。
|
||
|
||
- 如果字体大小小于等于 :ref:`SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE<class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE>`\ ,则舍入至二分之一像素大小。
|
||
|
||
- 如果是更大的字体,则舍入至整数像素大小。
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2``
|
||
|
||
将字形的水平位置舍入至像素大小的一半,每个字形最多光栅化两次。
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3``
|
||
|
||
将字形的水平位置舍入至像素大小的四分之一,每个字形最多光栅化四次。
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20``
|
||
|
||
在 :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` 模式下,次像素定位时使用“二分之一像素”大小的最大字体大小。
|
||
|
||
.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16``
|
||
|
||
在 :ref:`SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` 模式下,次像素定位时使用“四分之一像素”大小的最大字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_Feature:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **Feature**: :ref:`🔗<enum_TextServer_Feature>`
|
||
|
||
.. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_SIMPLE_LAYOUT** = ``1``
|
||
|
||
TextServer 支持简单排版。
|
||
|
||
.. _class_TextServer_constant_FEATURE_BIDI_LAYOUT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_BIDI_LAYOUT** = ``2``
|
||
|
||
TextServer 支持双向排版。
|
||
|
||
.. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_VERTICAL_LAYOUT** = ``4``
|
||
|
||
TextServer 支持垂直布局。
|
||
|
||
.. _class_TextServer_constant_FEATURE_SHAPING:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_SHAPING** = ``8``
|
||
|
||
TextServer 支持复杂文本塑形。
|
||
|
||
.. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_KASHIDA_JUSTIFICATION** = ``16``
|
||
|
||
TextServer 支持使用 kashida 进行两端对齐。
|
||
|
||
.. _class_TextServer_constant_FEATURE_BREAK_ITERATORS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_BREAK_ITERATORS** = ``32``
|
||
|
||
TextServer 支持复杂断行/断词规则(例如基于字典)。
|
||
|
||
.. _class_TextServer_constant_FEATURE_FONT_BITMAP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_BITMAP** = ``64``
|
||
|
||
TextServer 支持加载位图字体。
|
||
|
||
.. _class_TextServer_constant_FEATURE_FONT_DYNAMIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_DYNAMIC** = ``128``
|
||
|
||
TextServer 支持加载动态字体(TrueType、OpeType 等)。
|
||
|
||
.. _class_TextServer_constant_FEATURE_FONT_MSDF:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_MSDF** = ``256``
|
||
|
||
TextServer 支持多通道有符号距离场动态字体的渲染。
|
||
|
||
.. _class_TextServer_constant_FEATURE_FONT_SYSTEM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_SYSTEM** = ``512``
|
||
|
||
TextServer 支持加载系统字体。
|
||
|
||
.. _class_TextServer_constant_FEATURE_FONT_VARIABLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_FONT_VARIABLE** = ``1024``
|
||
|
||
TextServer 支持可变字体。
|
||
|
||
.. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048``
|
||
|
||
TextServer 支持依赖于区域设置、上下文敏感的大小写转换。
|
||
|
||
.. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_USE_SUPPORT_DATA** = ``4096``
|
||
|
||
TextServer 的某些功能需要外部数据文件,见 :ref:`load_support_data()<class_TextServer_method_load_support_data>`\ 。
|
||
|
||
.. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_IDENTIFIERS** = ``8192``
|
||
|
||
TextServer 支持 UAX #31 标识符验证,见 :ref:`is_valid_identifier()<class_TextServer_method_is_valid_identifier>`\ 。
|
||
|
||
.. _class_TextServer_constant_FEATURE_UNICODE_SECURITY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`Feature<enum_TextServer_Feature>` **FEATURE_UNICODE_SECURITY** = ``16384``
|
||
|
||
TextServer 支持基于 `Unicode 技术报告 #36 <https://unicode.org/reports/tr36/>`__ 和 `Unicode 技术标准 #39 <https://unicode.org/reports/tr39/>`__ 的欺骗检测功能。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_ContourPointTag:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ContourPointTag**: :ref:`🔗<enum_TextServer_ContourPointTag>`
|
||
|
||
.. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_ON** = ``1``
|
||
|
||
轮廓点在曲线上。
|
||
|
||
.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0``
|
||
|
||
轮廓点不在曲线上,而是作为圆锥(二次)贝塞尔曲线的控制点。
|
||
|
||
.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ContourPointTag<enum_TextServer_ContourPointTag>` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2``
|
||
|
||
轮廓点不在曲线上,而是作为三次贝塞尔曲线的控制点。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_SpacingType:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **SpacingType**: :ref:`🔗<enum_TextServer_SpacingType>`
|
||
|
||
.. _class_TextServer_constant_SPACING_GLYPH:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_GLYPH** = ``0``
|
||
|
||
每个字形的间距。
|
||
|
||
.. _class_TextServer_constant_SPACING_SPACE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_SPACE** = ``1``
|
||
|
||
空格字符的间距。
|
||
|
||
.. _class_TextServer_constant_SPACING_TOP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_TOP** = ``2``
|
||
|
||
行顶部的间距。
|
||
|
||
.. _class_TextServer_constant_SPACING_BOTTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_BOTTOM** = ``3``
|
||
|
||
行底部的间距。
|
||
|
||
.. _class_TextServer_constant_SPACING_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4``
|
||
|
||
代表 :ref:`SpacingType<enum_TextServer_SpacingType>` 枚举的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_FontStyle:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
flags **FontStyle**: :ref:`🔗<enum_TextServer_FontStyle>`
|
||
|
||
.. _class_TextServer_constant_FONT_BOLD:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_BOLD** = ``1``
|
||
|
||
字体为粗体。
|
||
|
||
.. _class_TextServer_constant_FONT_ITALIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_ITALIC** = ``2``
|
||
|
||
字体为斜体(italic)或伪斜体(oblique)。
|
||
|
||
.. _class_TextServer_constant_FONT_FIXED_WIDTH:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FontStyle<enum_TextServer_FontStyle>` **FONT_FIXED_WIDTH** = ``4``
|
||
|
||
字体中有等宽字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_StructuredTextParser:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **StructuredTextParser**: :ref:`🔗<enum_TextServer_StructuredTextParser>`
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_DEFAULT** = ``0``
|
||
|
||
使用默认的 Unicode BiDi 算法。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_URI:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_URI** = ``1``
|
||
|
||
URI 的 BiDi 覆盖。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_FILE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_FILE** = ``2``
|
||
|
||
文件路径的 BiDi 覆盖。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_EMAIL** = ``3``
|
||
|
||
电子邮件的 BiDi 覆盖。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_LIST:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4``
|
||
|
||
列表的 BiDi 覆盖。结构化文本选项:列表分隔符 :ref:`String<class_String>`\ 。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_GDSCRIPT** = ``5``
|
||
|
||
GDScript 的 BiDi 覆盖。
|
||
|
||
.. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_CUSTOM** = ``6``
|
||
|
||
用户定义的结构化文本 BiDi 覆盖函数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_TextServer_FixedSizeScaleMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **FixedSizeScaleMode**: :ref:`🔗<enum_TextServer_FixedSizeScaleMode>`
|
||
|
||
.. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0``
|
||
|
||
位图字体未被缩放。
|
||
|
||
.. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1``
|
||
|
||
位图字体被缩放至字体固定大小的最接近整数倍。这是像素艺术字体的推荐选项。
|
||
|
||
.. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2``
|
||
|
||
位图字体被缩放为任意(分数)大小。这是非像素艺术字体的推荐选项。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法说明
|
||
--------
|
||
|
||
.. _class_TextServer_method_create_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **create_font**\ (\ ) :ref:`🔗<class_TextServer_method_create_font>`
|
||
|
||
新建空的字体缓存条目资源。要释放生成的资源,请使用 :ref:`free_rid()<class_TextServer_method_free_rid>` 方法。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_create_font_linked_variation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_create_font_linked_variation>`
|
||
|
||
创建一个新的已有的字体变体,该字体重用相同的字形缓存和字体数据。要释放生成的资源,请使用 :ref:`free_rid()<class_TextServer_method_free_rid>` 方法。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_create_shaped_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) :ref:`🔗<class_TextServer_method_create_shaped_text>`
|
||
|
||
使用给定的方向 ``direction`` 和朝向 ``orientation`` 新建缓冲区,用于复杂排版。要释放生成的缓冲区,请使用 :ref:`free_rid()<class_TextServer_method_free_rid>`\ 方法。
|
||
|
||
\ **注意:**\ 如果服务器不支持 :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` 特性,则会忽略方向(\ :ref:`TextServerAdvanced<class_TextServerAdvanced>` 支持)。
|
||
|
||
\ **注意:**\ 如果服务器不支持 :ref:`FEATURE_VERTICAL_LAYOUT<class_TextServer_constant_FEATURE_VERTICAL_LAYOUT>` 特性,则会忽略朝向(\ :ref:`TextServerAdvanced<class_TextServerAdvanced>` 支持)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_draw_hex_code_box:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **draw_hex_code_box**\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| :ref:`🔗<class_TextServer_method_draw_hex_code_box>`
|
||
|
||
绘制显示字符十六进制码的框。用于替换缺失的字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_clear_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_clear_glyphs>`
|
||
|
||
从缓存条目中移除所有的渲染字形信息。
|
||
|
||
\ **注意:**\ 该函数不会移除与字形关联的纹理,请使用 :ref:`font_remove_texture()<class_TextServer_method_font_remove_texture>` 手动移除。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_clear_kerning_map:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_clear_kerning_map>`
|
||
|
||
移除所有字距调整覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_clear_size_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_clear_size_cache>`
|
||
|
||
从缓存条目中移除所有的字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_clear_system_fallback_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_clear_system_fallback_cache**\ (\ ) :ref:`🔗<class_TextServer_method_font_clear_system_fallback_cache>`
|
||
|
||
释放所有自动加载的系统字体。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_clear_textures:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_clear_textures>`
|
||
|
||
从字体缓存条目中移除所有的纹理。
|
||
|
||
\ **注意:**\ 该函数不会移除与纹理关联的字形,请使用 :ref:`font_remove_glyph()<class_TextServer_method_font_remove_glyph>` 手动移除。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_draw_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_draw_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| :ref:`🔗<class_TextServer_method_font_draw_glyph>`
|
||
|
||
在画布项中某个位置绘制单个字形,使用的字体为 ``font_rid``\ ,大小为 ``size``\ 。如果 ``oversampling`` 大于零则会用作字体过采样系数,否则使用视口的过采样设置。
|
||
|
||
\ **注意:**\ 字形索引是特定于字体的,请使用 :ref:`shaped_text_get_glyphs()<class_TextServer_method_shaped_text_get_glyphs>` 或 :ref:`font_get_glyph_index()<class_TextServer_method_font_get_glyph_index>` 返回的字形索引。
|
||
|
||
\ **注意:**\ 如果有待渲染的字形,调用这个函数可能会触发纹理缓存的更新。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_draw_glyph_outline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| :ref:`🔗<class_TextServer_method_font_draw_glyph_outline>`
|
||
|
||
在画布项中某个位置绘制单个字形轮廓,使用的字体为 ``font_rid``\ ,大小为 ``size``\ 。如果 ``oversampling`` 大于零则会用作字体过采样系数,否则使用视口的过采样设置。
|
||
|
||
\ **注意:**\ 字形索引是特定于字体的,请使用 :ref:`shaped_text_get_glyphs()<class_TextServer_method_shaped_text_get_glyphs>` 或 :ref:`font_get_glyph_index()<class_TextServer_method_font_get_glyph_index>` 返回的字形索引。
|
||
|
||
\ **注意:**\ 如果有待渲染的字形,调用这个函数可能会触发纹理缓存的更新。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_antialiasing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_antialiasing>`
|
||
|
||
返回字体的抗锯齿模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_ascent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_ascent>`
|
||
|
||
返回字体的上升幅度(超出基线的像素数)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_baseline_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_baseline_offset>`
|
||
|
||
返回额外的基线偏移(作为字体高度的一部分)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_char_from_glyph_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_char_from_glyph_index>`
|
||
|
||
返回与 ``glyph_index`` 关联的字符码,如果 ``glyph_index`` 无效则返回 ``0``\ 。见 :ref:`font_get_glyph_index()<class_TextServer_method_font_get_glyph_index>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_descent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_descent>`
|
||
|
||
返回字体的减少量(低于基线的像素数)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_disable_embedded_bitmaps:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_disable_embedded_bitmaps>`
|
||
|
||
返回字体是否仅用了内嵌位图加载。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_embolden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_embolden>`
|
||
|
||
返回字体的加粗力度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_face_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_face_count>`
|
||
|
||
返回 TrueType / OpenType 集合中的字体数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_face_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_face_index>`
|
||
|
||
返回 TrueType / OpenType 集合中的活动字体索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_fixed_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_fixed_size>`
|
||
|
||
返回位图字体的固定大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_fixed_size_scale_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_fixed_size_scale_mode>`
|
||
|
||
返回位图字体的缩放模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_generate_mipmaps:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_generate_mipmaps>`
|
||
|
||
如果启用了字体纹理 mipmap 生成,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_global_oversampling:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_global_oversampling**\ (\ ) |const| :ref:`🔗<class_TextServer_method_font_get_global_oversampling>`
|
||
|
||
**已弃用:** Use :ref:`Viewport<class_Viewport>` oversampling, or the ``oversampling`` argument of the ``draw_*`` methods instead.
|
||
|
||
This method does nothing and always returns ``1.0``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_advance:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **font_get_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_advance>`
|
||
|
||
返回字形前进量(下一个字形的偏移量)。
|
||
|
||
\ **注意:**\ 字形轮廓的前进量,与基础字形的前进量相同,不会被保存。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_contours:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours**\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_contours>`
|
||
|
||
返回字形的轮廓,是一个包含以下内容的 :ref:`Dictionary<class_Dictionary>`\ :
|
||
|
||
\ ``points`` - :ref:`PackedVector3Array<class_PackedVector3Array>`\ ,包含轮廓点。\ ``x`` 和 ``y`` 是点的坐标。\ ``z`` 是点的类型,使用 :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` 的值。
|
||
|
||
\ ``contours`` - :ref:`PackedInt32Array<class_PackedInt32Array>`\ ,包含每个轮廓的端点索引。
|
||
|
||
\ ``orientation`` - :ref:`bool<class_bool>`\ ,轮廓方向。如果为 ``true`` 则必须填充顺时针轮廓。
|
||
|
||
- 两个连续的 :ref:`CONTOUR_CURVE_TAG_ON<class_TextServer_constant_CONTOUR_CURVE_TAG_ON>` 点表示一条线段。
|
||
|
||
- 在两个 :ref:`CONTOUR_CURVE_TAG_ON<class_TextServer_constant_CONTOUR_CURVE_TAG_ON>` 点之间的一个 :ref:`CONTOUR_CURVE_TAG_OFF_CONIC<class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC>` 点表示一个一条圆锥(二次)贝塞尔弧。
|
||
|
||
- 在两个 :ref:`CONTOUR_CURVE_TAG_ON<class_TextServer_constant_CONTOUR_CURVE_TAG_ON>` 点之间的两个 :ref:`CONTOUR_CURVE_TAG_OFF_CUBIC<class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC>` 点表示一个一条三次贝塞尔弧。
|
||
|
||
- 两个连续的 :ref:`CONTOUR_CURVE_TAG_OFF_CONIC<class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC>` 点表示两条连续的圆锥(二次)贝塞尔弧,中点处存在一个虚拟的 :ref:`CONTOUR_CURVE_TAG_ON<class_TextServer_constant_CONTOUR_CURVE_TAG_ON>` 点。
|
||
|
||
- 每个轮廓都是闭合的。轮廓的最后一个点使用轮廓的第一个点作为下一个点,反之亦然。第一个点可以是 :ref:`CONTOUR_CURVE_TAG_OFF_CONIC<class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC>` 点。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_index>`
|
||
|
||
返回 ``char`` 的字形索引,可以选择由 ``variation_selector`` 进行修改。见 :ref:`font_get_char_from_glyph_index()<class_TextServer_method_font_get_char_from_glyph_index>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_list>`
|
||
|
||
返回缓存条目中的已渲染字形列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **font_get_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_offset>`
|
||
|
||
返回字形的基线偏移量。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **font_get_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_size>`
|
||
|
||
返回该字形的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_texture_idx:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_idx>`
|
||
|
||
返回包含该字形的缓存纹理的索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_texture_rid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_rid>`
|
||
|
||
返回包含字形的缓存纹理的资源 ID。
|
||
|
||
\ **注意:**\ 如果有待渲染的字形,调用此函数可能会触发纹理缓存的更新。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_texture_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_size>`
|
||
|
||
返回包含字形的缓存纹理的大小。
|
||
|
||
\ **注意:**\ 如果有待渲染的字形,调用此函数可能会触发纹理缓存的更新。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_glyph_uv_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_uv_rect>`
|
||
|
||
返回包含该字形的缓存纹理中的矩形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_hinting:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_hinting>`
|
||
|
||
返回字体微调模式。仅用于动态字体。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_keep_rounding_remainders:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_get_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_keep_rounding_remainders>`
|
||
|
||
返回字形位置的舍入行为。如果设为 ``true``\ ,在将字形对齐到像素边界时会累积余数,确保字形分布更加均匀。如果启用了次像素定位,则该设置无效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **font_get_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_kerning>`
|
||
|
||
返回字形对的字距调整。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_kerning_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_kerning_list>`
|
||
|
||
返回字距调整覆盖的列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_get_language_support_override>`
|
||
|
||
如果为 ``language`` 启用了支持覆盖,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_language_support_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_get_language_support_overrides>`
|
||
|
||
返回语言支持覆盖的列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_msdf_pixel_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_msdf_pixel_range>`
|
||
|
||
返回最小和最大可表示有符号距离之间形状周围范围的宽度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_msdf_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_msdf_size>`
|
||
|
||
返回用于生成 MSDF 纹理的源字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_name>`
|
||
|
||
返回字体家族名称。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_opentype_feature_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_opentype_feature_overrides>`
|
||
|
||
返回字体 OpenType 特性集覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_ot_name_strings:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_ot_name_strings>`
|
||
|
||
返回 OpenType 字体名称字符串的 :ref:`Dictionary<class_Dictionary>`\ (本地化的字体名称、版本、描述、许可信息、示例文本等)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_oversampling:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_oversampling>`
|
||
|
||
返回过采样系数覆盖值。如果设为正数,则会覆盖使用该字体的视口的过采样系数。见 :ref:`Viewport.oversampling<class_Viewport_property_oversampling>`\ 。该值不会覆盖 ``draw_*`` 方法的 ``oversampling`` 参数。仅适用于动态字体。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_scale:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_scale>`
|
||
|
||
返回颜色位图字体的缩放系数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_get_script_support_override>`
|
||
|
||
如果为 ``script`` 启用了支持覆盖,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_script_support_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_get_script_support_overrides>`
|
||
|
||
返回文字支持覆盖的列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_size_cache_info:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **font_get_size_cache_info**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_size_cache_info>`
|
||
|
||
返回字体缓存信息,每个条目都包含以下字段:\ ``Vector2i size_px`` - 字体大小,单位为像素,\ ``float viewport_oversampling`` - 视口过采样系数,\ ``int glyphs`` - 已渲染的字形数,\ ``int textures`` - 已使用的纹理数,\ ``int textures_size`` - 纹理数据大小,单位为字节。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_size_cache_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_size_cache_list>`
|
||
|
||
返回缓存中字体大小的列表。每个大小都是由字体大小和轮廓大小组成的 :ref:`Vector2i<class_Vector2i>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_spacing>`
|
||
|
||
返回 ``spacing`` 的间距,单位为像素(与字体大小无关)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_stretch:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_stretch>`
|
||
|
||
返回与正常宽度相比的字体拉伸量。一个介于 ``50%`` 和 ``200%`` 之间的百分比值。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_style:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_style>`
|
||
|
||
返回字体样式标志。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_style_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_style_name>`
|
||
|
||
返回字体样式名称。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_subpixel_positioning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_subpixel_positioning>`
|
||
|
||
返回字体的次像素字形定位模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_supported_chars:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_supported_chars>`
|
||
|
||
返回包含字体中所有可用字符的字符串。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_supported_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_supported_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_supported_glyphs>`
|
||
|
||
返回包含字体中所有字形索引的数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_texture_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_count>`
|
||
|
||
返回字体缓存条目所使用的纹理数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_texture_image:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Image<class_Image>` **font_get_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_image>`
|
||
|
||
返回字体缓存纹理图像数据。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_texture_offsets:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_offsets>`
|
||
|
||
返回包含字形打包数据的数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform2D<class_Transform2D>` **font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_transform>`
|
||
|
||
返回应用于字体轮廓的 2D 变换。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_underline_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_underline_position>`
|
||
|
||
返回基线下方下划线的像素偏移。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_underline_thickness:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_underline_thickness>`
|
||
|
||
返回下划线的粗细度,单位为像素。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_variation_coordinates:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_variation_coordinates>`
|
||
|
||
返回指定字体缓存条目的变体坐标。详见 :ref:`font_supported_variation_list()<class_TextServer_method_font_supported_variation_list>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_get_weight:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_weight>`
|
||
|
||
返回该字体的字重(粗度)。一个在 ``100...999`` 范围内的值,正常字体字重为 ``400``\ ,粗体字体字重为 ``700``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_has_char:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_has_char>`
|
||
|
||
如果该字体中包含 Unicode 字符 ``char``\ ,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_allow_system_fallback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_allow_system_fallback>`
|
||
|
||
如果可以自动使用系统字体作为回退字体,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_force_autohinter:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_force_autohinter>`
|
||
|
||
如果自动提示被支持且优先于字体内置提示,则返回 ``true``\ 。仅由动态字体使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_language_supported:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_language_supported>`
|
||
|
||
Returns ``true`` if the font supports the given language (as a `ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_modulate_color_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_modulate_color_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_modulate_color_glyphs>`
|
||
|
||
Returns ``true`` if color modulation is applied when drawing the font's colored glyphs.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_multichannel_signed_distance_field:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_multichannel_signed_distance_field>`
|
||
|
||
如果使用从动态字体矢量数据生成的单个多通道有符号距离场渲染所有大小的字形,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_is_script_supported:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_script_supported>`
|
||
|
||
Returns ``true`` if the font supports the given script (as a `ISO 15924 <https://en.wikipedia.org/wiki/ISO_15924>`__ code).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_remove_glyph>`
|
||
|
||
从缓存条目中移除指定的渲染字形信息。
|
||
|
||
\ **注意:**\ 这个函数不会移除与字形相关的纹理,请使用 :ref:`font_remove_texture()<class_TextServer_method_font_remove_texture>` 手动移除。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_remove_kerning>`
|
||
|
||
移除字形对的字距调整覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_remove_language_support_override>`
|
||
|
||
移除语言支持覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_remove_script_support_override>`
|
||
|
||
移除文字支持覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_size_cache:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_remove_size_cache>`
|
||
|
||
从缓存条目中移除指定的字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_remove_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_remove_texture>`
|
||
|
||
从缓存条目中移除指定纹理。
|
||
|
||
\ **注意:**\ 这个函数不会移除与纹理关联的字形,请使用 :ref:`font_remove_glyph()<class_TextServer_method_font_remove_glyph>` 手动移除。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_render_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_render_glyph>`
|
||
|
||
将指定的字符渲染到字体缓存纹理。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_render_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_render_range**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_render_range>`
|
||
|
||
将范围内的字符渲染到字体缓存纹理。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_allow_system_fallback:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_allow_system_fallback>`
|
||
|
||
如果设置为 ``true``\ ,则可以自动将系统字体作为回退使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_antialiasing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) :ref:`🔗<class_TextServer_method_font_set_antialiasing>`
|
||
|
||
使用字体抗锯齿模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_ascent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_ascent>`
|
||
|
||
设置字体的升部(基线上方的像素数)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_baseline_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_baseline_offset>`
|
||
|
||
设置额外的基线偏移(作为字体高度的一部分)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_TextServer_method_font_set_data>`
|
||
|
||
设置字体源数据,例如动态字体的源文件内容。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_descent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_descent>`
|
||
|
||
设置字体的降部(基线下方的像素数)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_disable_embedded_bitmaps:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_disable_embedded_bitmaps>`
|
||
|
||
如果为 ``true``\ ,则会禁用内嵌字体位图的加载(仅包含位图的字体以及彩色字体会禁用该属性)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_embolden:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_embolden>`
|
||
|
||
设置字体的加粗强度。如果 ``strength`` 不等于零,则会加粗字体轮廓。负值会减小轮廓的粗细度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_face_index:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_face_index>`
|
||
|
||
在 TrueType / OpenType 集合中设置活动字体索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_fixed_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_fixed_size>`
|
||
|
||
设置位图字体的固定大小。如果设置为大于零的值,则会为所有字体大小使用相同的缓存条目。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_fixed_size_scale_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) :ref:`🔗<class_TextServer_method_font_set_fixed_size_scale_mode>`
|
||
|
||
设置位图字体缩放模式。仅当 ``fixed_size`` 大于零时才使用该属性。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_force_autohinter:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_force_autohinter>`
|
||
|
||
如果设置为 ``true``\ ,则优先使用自动微调,而不是字体的内置微调。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_generate_mipmaps:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_generate_mipmaps>`
|
||
|
||
如果设置为 ``true``\ ,则启用字体纹理 mipmap 生成。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_global_oversampling:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_global_oversampling>`
|
||
|
||
**已弃用:** Use :ref:`Viewport<class_Viewport>` oversampling, or the ``oversampling`` argument of the ``draw_*`` methods instead.
|
||
|
||
这个方法什么也不做。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_glyph_advance:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_advance>`
|
||
|
||
设置字形前进量(下一个字形的偏移量)。
|
||
|
||
\ **注意:**\ 字形轮廓的前进量与基础字形的前进量相同,不会被保存。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_glyph_offset:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_offset>`
|
||
|
||
设置字形相对于基线的偏移量。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_glyph_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_size>`
|
||
|
||
设置字形的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_glyph_texture_idx:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_texture_idx>`
|
||
|
||
设置包含该字形的缓存纹理的索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_glyph_uv_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_uv_rect>`
|
||
|
||
设置包含该字形的缓存纹理中,该字形的矩形区域。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_hinting:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) :ref:`🔗<class_TextServer_method_font_set_hinting>`
|
||
|
||
设置字体微调模式。仅由动态字体使用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_keep_rounding_remainders:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID<class_RID>`, keep_rounding_remainders\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_keep_rounding_remainders>`
|
||
|
||
设置字形位置的舍入行为。如果设为 ``true``\ ,则会将字形与像素边界对齐时的舍入余数进行累积,确保字形分布更为均匀。启用次像素定位时该设置无效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_kerning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_kerning>`
|
||
|
||
设置字形对的字距调整。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_language_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_language_support_override>`
|
||
|
||
为 :ref:`font_is_language_supported()<class_TextServer_method_font_is_language_supported>` 添加覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_modulate_color_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_modulate_color_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_modulate_color_glyphs>`
|
||
|
||
如果设为 ``true``\ ,则绘制彩色字形时会应用颜色调制,否则只会对灰度字形应用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_msdf_pixel_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_msdf_pixel_range>`
|
||
|
||
设置最小和最大可表示有符号距离之间形状周围范围的宽度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_msdf_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_msdf_size>`
|
||
|
||
设置用于生成 MSDF 纹理的源字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_multichannel_signed_distance_field:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_multichannel_signed_distance_field>`
|
||
|
||
如果设置为 ``true``\ ,则所有大小的字形都使用同一个从动态字体向量数据生成的多通道带符号距离场进行渲染。MSDF 渲染能够使用任意缩放系数显示字体,字体不会变得模糊,字体大小的改变也不会消耗 CPU 的性能(因为字体不再需要在 CPU 上进行光栅化)。缺点是MSDF 无法使用字体微调。缺少字体微调时,锐度可能降低,较小的字体可能不易阅读。
|
||
|
||
\ **注意:**\ MSDF 字体渲染无法正确渲染存在形状重叠的字形。重叠的形状在 OpenType 标准中是无效的,但在很多字体文件中仍然很常见,尤其是经过 Google Fonts 转换后的那些。要避免形状重叠带来的问题,请考虑直接从字体厂商下载字体文件,不要依赖 Google Fonts。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_set_name>`
|
||
|
||
设置该字体的家族名称。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_opentype_feature_overrides:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_TextServer_method_font_set_opentype_feature_overrides>`
|
||
|
||
设置字体 OpenType 特性集覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_oversampling:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_oversampling>`
|
||
|
||
如果设为正数,则会覆盖使用该字体的视口的过采样系数。见 :ref:`Viewport.oversampling<class_Viewport_property_oversampling>`\ 。该值不会覆盖 ``draw_*`` 方法的 ``oversampling`` 参数。仅适用于动态字体。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_scale:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_scale>`
|
||
|
||
设置彩色位图字体的缩放系数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_script_support_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_script_support_override>`
|
||
|
||
为 :ref:`font_is_script_supported()<class_TextServer_method_font_is_script_supported>` 添加覆盖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_spacing>`
|
||
|
||
将 ``spacing`` 的间距设置为 ``value``\ ,单位为像素(与字体大小无关)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_stretch:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_stretch>`
|
||
|
||
设置字体相对于普通宽度的拉伸量,是在 ``50%`` 和 ``200%`` 之间的百分比值。
|
||
|
||
\ **注意:**\ 这个值仅用于匹配字体,不会影响字体的渲染。请改用 :ref:`font_set_face_index()<class_TextServer_method_font_set_face_index>`\ 、\ :ref:`font_set_variation_coordinates()<class_TextServer_method_font_set_variation_coordinates>` 或 :ref:`font_set_transform()<class_TextServer_method_font_set_transform>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_style:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) :ref:`🔗<class_TextServer_method_font_set_style>`
|
||
|
||
设置字体样式标志。
|
||
|
||
\ **注意:**\ 这个值仅用于匹配字体,不会影响字体的渲染。请改用 :ref:`font_set_face_index()<class_TextServer_method_font_set_face_index>`\ 、\ :ref:`font_set_variation_coordinates()<class_TextServer_method_font_set_variation_coordinates>`\ 、\ :ref:`font_set_embolden()<class_TextServer_method_font_set_embolden>` 或 :ref:`font_set_transform()<class_TextServer_method_font_set_transform>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_style_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_set_style_name>`
|
||
|
||
设置字体的样式名称。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_subpixel_positioning:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) :ref:`🔗<class_TextServer_method_font_set_subpixel_positioning>`
|
||
|
||
设置字体的次像素字形定位模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_texture_image:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_TextServer_method_font_set_texture_image>`
|
||
|
||
设置字体的缓存纹理图像数据。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_texture_offsets:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_TextServer_method_font_set_texture_offsets>`
|
||
|
||
设置包含字形打包数据的数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_TextServer_method_font_set_transform>`
|
||
|
||
设置应用于字体轮廓的 2D 变换,可用于倾斜、翻转和旋转字形。
|
||
|
||
例如,要通过倾斜来模拟斜体字体,请应用以下变换 ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_underline_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_underline_position>`
|
||
|
||
设置基线下方下划线的像素偏移。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_underline_thickness:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_underline_thickness>`
|
||
|
||
设置下划线的粗细度,单位为像素。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_variation_coordinates:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_TextServer_method_font_set_variation_coordinates>`
|
||
|
||
为指定的字体缓存条目设置变体坐标。详见 :ref:`font_supported_variation_list()<class_TextServer_method_font_supported_variation_list>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_set_weight:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_weight>`
|
||
|
||
设置字体的字重(粗度)。字重是在 ``100...999`` 范围内的值,普通字重为 ``400``\ ,粗体字重为 ``700``\ 。
|
||
|
||
\ **注意:**\ 这个值仅用于匹配字体,不会影响字体的渲染。请改用 :ref:`font_set_face_index()<class_TextServer_method_font_set_face_index>`\ 、\ :ref:`font_set_variation_coordinates()<class_TextServer_method_font_set_variation_coordinates>`\ 、\ :ref:`font_set_embolden()<class_TextServer_method_font_set_embolden>` 或 :ref:`font_set_transform()<class_TextServer_method_font_set_transform>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_supported_feature_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_supported_feature_list>`
|
||
|
||
返回支持的 OpenType 特性的字典。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_font_supported_variation_list:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_supported_variation_list>`
|
||
|
||
返回支持的 OpenType 变体坐标的字典。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_format_number:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_format_number>`
|
||
|
||
**已弃用:** Use :ref:`TranslationServer.format_number()<class_TranslationServer_method_format_number>` instead.
|
||
|
||
Converts a number from Western Arabic (0..9) to the numeral system used in the given ``language``.
|
||
|
||
If ``language`` is an empty string, the active locale will be used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_free_rid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_free_rid>`
|
||
|
||
释放由该 **TextServer** 创建的某个对象。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_features:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_features**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_features>`
|
||
|
||
返回文本服务器的功能,见 :ref:`Feature<enum_TextServer_Feature>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_hex_code_box_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_get_hex_code_box_size>`
|
||
|
||
返回替换字符的大小(在无效字符处绘制的带十六进制字符代码的框)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_name>`
|
||
|
||
返回该服务器接口的名称。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_support_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedByteArray<class_PackedByteArray>` **get_support_data**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_support_data>`
|
||
|
||
返回默认的 TextServer 数据库(例如 ICU 中断迭代器和字典)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_support_data_filename:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_support_data_filename**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_support_data_filename>`
|
||
|
||
返回默认的 TextServer 数据库(例如 ICU 中断迭代器和字典)文件名。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_get_support_data_info:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **get_support_data_info**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_support_data_info>`
|
||
|
||
返回 TextServer 数据库(例如 ICU 中断迭代器和字典)的描述。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_has:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **has**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_has>`
|
||
|
||
如果 ``rid`` 是该文本服务器拥有的有效资源,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_has_feature:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| :ref:`🔗<class_TextServer_method_has_feature>`
|
||
|
||
如果服务器支持某个功能,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_is_confusable:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| :ref:`🔗<class_TextServer_method_is_confusable>`
|
||
|
||
返回 ``dict`` 中可能与 ``string`` 发生视觉混淆的第一个字符串的索引,如果没有找到则返回 ``-1``\ 。
|
||
|
||
\ **注意:**\ 这个方法不检测不可见字符,要进行欺骗性检测,请与 :ref:`spoof_check()<class_TextServer_method_spoof_check>` 结合使用。
|
||
|
||
\ **注意:**\ 如果该服务器不支持 :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` 特性,则始终返回 ``-1``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_is_locale_right_to_left:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_is_locale_right_to_left>`
|
||
|
||
如果区域设置为从右至左,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_is_locale_using_support_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_locale_using_support_data**\ (\ locale\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_is_locale_using_support_data>`
|
||
|
||
Returns ``true`` if the locale requires text server support data for line/word breaking.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_is_valid_identifier:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_is_valid_identifier>`
|
||
|
||
如果 ``string`` 为有效的标识符,则返回 ``true``\ 。
|
||
|
||
如果文字服务器支持 :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` 特性,则有效的标识符必须:
|
||
|
||
- 遵循 C 范式。
|
||
|
||
- 开头是 XID_Start 类的 Unicode 字符或 ``"_"``\ 。
|
||
|
||
- 其他位置可以包含 XID_Continue 类的 Unicode 字符。
|
||
|
||
- 仅使用 UAX #31 推荐的文字(允许混合文字)。
|
||
|
||
如果不支持 :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS>` 特性,则有效的标识符必须:
|
||
|
||
- 开头是 XID_Start 类的 Unicode 字符或 ``"_"``\ 。
|
||
|
||
- 其他位置可以包含 XID_Continue 类的 Unicode 字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_is_valid_letter:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_valid_letter**\ (\ unicode\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_is_valid_letter>`
|
||
|
||
如果给定的码位是有效的字母,即属于 Unicode 的“L”分类,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_load_support_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **load_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_load_support_data>`
|
||
|
||
加载可选的 TextServer 数据库(例如 ICU 断字迭代器和字典)。
|
||
|
||
\ **注意:**\ 这个函数应该在使用任何其他 TextServer 函数之前调用,否则不会起任何作用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_name_to_tag:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_name_to_tag>`
|
||
|
||
Converts the given readable name of a feature, variation, script, or language to an OpenType tag.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_parse_number:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_parse_number>`
|
||
|
||
**已弃用:** Use :ref:`TranslationServer.parse_number()<class_TranslationServer_method_parse_number>` instead.
|
||
|
||
Converts ``number`` from the numeral system used in the given ``language`` to Western Arabic (0..9).
|
||
|
||
If ``language`` is an empty string, the active locale will be used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_parse_structured_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_parse_structured_text>`
|
||
|
||
BiDi 算法覆盖函数的默认实现。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_percent_sign:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **percent_sign**\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_percent_sign>`
|
||
|
||
**已弃用:** Use :ref:`TranslationServer.get_percent_sign()<class_TranslationServer_method_get_percent_sign>` instead.
|
||
|
||
Returns the percent sign used in the given ``language``.
|
||
|
||
If ``language`` is an empty string, the active locale will be used.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_save_support_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_save_support_data>`
|
||
|
||
将可选的 TextServer 数据库(例如 ICU 断字迭代器和字典)保存到文件中。
|
||
|
||
\ **注意:**\ 这个函数在导出项目时会用到,用于包含 TextServer 数据库。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_get_run_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_count>`
|
||
|
||
返回缓冲中统一文本行程的个数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **shaped_get_run_direction**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_direction>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_font_rid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **shaped_get_run_font_rid**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_font_rid>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的字体 RID。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_font_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_get_run_font_size**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_font_size>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的字体大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_language:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **shaped_get_run_language**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_language>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的语言。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **shaped_get_run_object**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_object>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的内嵌对象。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2i<class_Vector2i>` **shaped_get_run_range**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_range>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的源文本范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_run_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **shaped_get_run_text**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_run_text>`
|
||
|
||
返回索引为 ``index`` 的文本行程(按显示顺序)的源文本。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_span_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_count>`
|
||
|
||
返回使用 :ref:`shaped_text_add_string()<class_TextServer_method_shaped_text_add_string>` 或 :ref:`shaped_text_add_object()<class_TextServer_method_shaped_text_add_object>` 添加的文本区间的数量。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_span_embedded_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **shaped_get_span_embedded_object**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_embedded_object>`
|
||
|
||
返回文本内嵌对象的键。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_span_meta:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_meta>`
|
||
|
||
返回文本区间的元数据。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_span_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **shaped_get_span_object**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_object>`
|
||
|
||
返回文本区间内嵌对象的键。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_span_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **shaped_get_span_text**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_text>`
|
||
|
||
返回文本区间的源文本。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_get_text:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **shaped_get_text**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_text>`
|
||
|
||
返回文本缓冲的源文本,包含对象替换字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_set_span_update_font:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) :ref:`🔗<class_TextServer_method_shaped_set_span_update_font>`
|
||
|
||
在不更改文本的情况下,更改文本区间的字体、字体大小和 OpenType 特性。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_add_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_add_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextServer_method_shaped_text_add_object>`
|
||
|
||
向文本缓冲中添加内联对象,\ ``key`` 必须唯一。在文本中,对象使用 ``length`` 个对象替换字符表示。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_add_string:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_add_string**\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_TextServer_method_shaped_text_add_string>`
|
||
|
||
添加文本区间和字体,将其绘制到文本缓冲中。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_clear:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_clear**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_clear>`
|
||
|
||
清空文本缓冲(移除文本和内联对象)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_closest_character_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_closest_character_pos>`
|
||
|
||
返回距离 ``pos`` 最近的组合字符位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_draw:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_draw**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_draw>`
|
||
|
||
在画布项的给定位置绘制塑形后的文本,颜色为 ``color``\ 。\ ``pos`` 指定的是基线的最左侧(横向排版)或基线的最顶部(纵向排版)。如果 ``oversampling`` 大于零则会用作字体过采样系数,否则使用视口的过采样设置。
|
||
|
||
\ ``clip_l`` 和 ``clip_r`` 是相对于 ``pos`` 的偏移量,横向排版时朝右、纵向排版时朝下。如果 ``clip_l`` 非负数,则会裁剪在偏移量之前开始的字形。如果 ``clip_r`` 非负数,则会裁剪在偏移量之后结束的字形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_draw_outline:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_draw_outline**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), oversampling\: :ref:`float<class_float>` = 0.0\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_draw_outline>`
|
||
|
||
在画布项的给定位置绘制塑形后的文本轮廓,颜色为 ``color``\ 。\ ``pos`` 指定的是基线的最左侧(横向排版)或基线的最顶部(纵向排版)。如果 ``oversampling`` 大于零则会用作字体过采样系数,否则使用视口的过采样设置。
|
||
|
||
\ ``clip_l`` 和 ``clip_r`` 是相对于 ``pos`` 的偏移量,横向排版时朝右、纵向排版时朝下。如果 ``clip_l`` 非负数,则会裁剪在偏移量之前开始的字形。如果 ``clip_r`` 非负数,则会裁剪在偏移量之后结束的字形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_duplicate:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **shaped_text_duplicate**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_duplicate>`
|
||
|
||
Duplicates shaped text buffer.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_fit_to_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) :ref:`🔗<class_TextServer_method_shaped_text_fit_to_width>`
|
||
|
||
两端对齐文本以适合指定宽度,返回新的文本宽度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_ascent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ascent>`
|
||
|
||
返回文本上高(水平布局基线上方的像素数,或垂直布局基线左侧的像素数)。
|
||
|
||
\ **注意:**\ 如果某些字形偏离基线,则总体上高可能高于字体上高。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_carets:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_carets>`
|
||
|
||
返回与文本中字符偏移 ``position`` 对应的文本光标的形状。返回的光标形状是宽度为 1 像素的矩形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_character_breaks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_character_breaks>`
|
||
|
||
返回组合字符边界的数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_custom_ellipsis:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_custom_ellipsis>`
|
||
|
||
返回文字裁剪时使用的省略字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_custom_punctuation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_custom_punctuation>`
|
||
|
||
返回自定义标点字符列表,用于断字。如果被设置为空字符串,则使用服务器的默认值。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_descent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_descent>`
|
||
|
||
返回文本下深(水平布局基线下方的像素数,或垂直布局基线右侧的像素数)。
|
||
|
||
\ **注意:**\ 如果某些字形偏离基线,则总体下深可能高于字体下深。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_direction>`
|
||
|
||
返回文本的方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_dominant_direction_in_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_dominant_direction_in_range>`
|
||
|
||
返回文本范围内的主要书写方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>`
|
||
|
||
返回省略号中的字形数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_ellipsis_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_glyphs>`
|
||
|
||
返回省略号中的字形数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_ellipsis_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_pos>`
|
||
|
||
返回省略号的位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_glyph_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_glyph_count>`
|
||
|
||
返回缓冲区中的字形数。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_glyphs:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_glyphs>`
|
||
|
||
返回字形数组,按视觉顺序排序。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_grapheme_bounds:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_grapheme_bounds>`
|
||
|
||
将复合字符的边界返回为距行首的偏移量。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_inferred_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_inferred_direction>`
|
||
|
||
返回由 BiDi 算法推断的文本书写方向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_line_breaks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_line_breaks>`
|
||
|
||
对文本进行断行,返回每一行的字符范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_line_breaks_adv:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_line_breaks_adv>`
|
||
|
||
将文本拆分为行和列。返回每段的字符范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_object_glyph:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_glyph>`
|
||
|
||
返回内联对象的字形索引。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_object_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2i<class_Vector2i>` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_range>`
|
||
|
||
返回内联对象的字符范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_object_rect:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_rect>`
|
||
|
||
返回内联对象的边界矩形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_objects:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>` **shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_objects>`
|
||
|
||
返回内联对象的数组。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_orientation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_orientation>`
|
||
|
||
返回文本朝向。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_parent:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_parent>`
|
||
|
||
返回子字符串源自哪个父缓冲区。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_preserve_control:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_preserve_control>`
|
||
|
||
如果文本缓冲区被配置为显示控制字符,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_preserve_invalid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_preserve_invalid>`
|
||
|
||
如果文本缓冲区被配置为在无效字符处显示十六进制代码,则返回 ``true``\ 。
|
||
|
||
\ **注意:**\ 如果设置为 ``false``\ ,则在无效字符处不显示任何内容。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_range:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2i<class_Vector2i>` **shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_range>`
|
||
|
||
返回父缓冲区中子字符串缓冲区的字符范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_selection:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_selection>`
|
||
|
||
返回用于指定字符范围的选区矩形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_size>`
|
||
|
||
返回该文本的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_spacing>`
|
||
|
||
返回字形或行之间添加的额外间距,单位为像素。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_trim_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_trim_pos>`
|
||
|
||
返回超出修剪的位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_underline_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_underline_position>`
|
||
|
||
返回基线下方下划线的像素偏移。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_underline_thickness:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_underline_thickness>`
|
||
|
||
返回下划线的粗细度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_width>`
|
||
|
||
返回文本的宽度(对于水平排版)或高度(对于垂直排版)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_get_word_breaks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_word_breaks>`
|
||
|
||
将文本分解成单词并返回字符范围的数组。请使用 ``grapheme_flags`` 来设置哪些字符会被用于分解。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_has_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_has_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_has_object>`
|
||
|
||
Returns ``true`` if an object with ``key`` is embedded in this shaped text buffer.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_has_visible_chars:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_has_visible_chars**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_has_visible_chars>`
|
||
|
||
如果文本缓冲区存在可显示字符,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_hit_test_grapheme:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_hit_test_grapheme>`
|
||
|
||
返回字素的索引,该字素位于基线上指定像素偏移的位置,如果没有找到,则返回 ``-1``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_hit_test_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_hit_test_position>`
|
||
|
||
返回基线处指定像素偏移处的文本光标的偏移量。该函数始终返回一个有效位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_is_ready:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_is_ready>`
|
||
|
||
如果缓冲区成功塑形,则返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_next_character_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_next_character_pos>`
|
||
|
||
返回距离 ``pos`` 最近的组合字符结束位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_next_grapheme_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_next_grapheme_pos>`
|
||
|
||
返回距离 ``pos`` 最近的字素结束位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_overrun_trim_to_width:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_overrun_trim_to_width>`
|
||
|
||
如果文本超出给定宽度,则修剪文本。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_prev_character_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_prev_character_pos>`
|
||
|
||
返回距离 ``pos`` 最近的组合字符开始位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_prev_grapheme_pos:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_prev_grapheme_pos>`
|
||
|
||
返回距离 ``pos`` 最近的字素开始位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_resize_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_resize_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextServer_method_shaped_text_resize_object>`
|
||
|
||
设置嵌入对象的新大小和对齐方式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_bidi_override:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_bidi_override>`
|
||
|
||
覆盖用于结构化文本的 BiDi。
|
||
|
||
覆盖范围应覆盖完整的源文本而没有重叠。BiDi 算法将分别被用于每个范围。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_custom_ellipsis:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_custom_ellipsis>`
|
||
|
||
设置文字裁剪时使用的省略字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_custom_punctuation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_custom_punctuation>`
|
||
|
||
设置自定义标点字符列表,用于断字。如果被设置为空字符串,则使用服务器的默认值。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_direction:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_direction>`
|
||
|
||
设置所需的文本方向。如果设置为 :ref:`DIRECTION_AUTO<class_TextServer_constant_DIRECTION_AUTO>`\ ,方向将根据缓冲区的内容和当前的区域设置来检测。
|
||
|
||
\ **注意:**\ 如果服务器不支持 :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` 特性,则方向会被忽略(\ :ref:`TextServerAdvanced<class_TextServerAdvanced>` 支持)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_orientation:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_orientation>`
|
||
|
||
设置所需的文本排版方向。
|
||
|
||
\ **注意:**\ 如果服务器不支持 :ref:`FEATURE_VERTICAL_LAYOUT<class_TextServer_constant_FEATURE_VERTICAL_LAYOUT>` 功能(由 :ref:`TextServerAdvanced<class_TextServerAdvanced>` 支持),则排版方向将被忽略。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_preserve_control:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_preserve_control>`
|
||
|
||
如果设置为 ``true``\ ,则文本缓冲区将显示控制字符。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_preserve_invalid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_preserve_invalid>`
|
||
|
||
如果设置为 ``true``\ ,则文本缓冲区会将无效字符显示为十六进制代码,否则不显示任何内容。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_set_spacing:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_spacing>`
|
||
|
||
设置字形之间或行与行之间添加的额外像素间距。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_shape:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_shape>`
|
||
|
||
形状缓冲区(如果未塑形)。如果字符串塑形成功,则返回 ``true``\ 。
|
||
|
||
\ **注意:**\ 无需手动调用该函数,只要请求其任何输出数据,缓冲区就会自动被塑形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_sort_logical:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_sort_logical>`
|
||
|
||
按逻辑顺序返回文本字形。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_substr:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_substr>`
|
||
|
||
返回 ``shaped`` 文本缓冲区中字符串的子字符串的文本缓冲区(包括内联对象)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_shaped_text_tab_align:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_tab_align>`
|
||
|
||
将塑形文本与给定的制表位对齐。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_spoof_check:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_spoof_check>`
|
||
|
||
如果 ``string`` 可能造成读者的混淆,则返回 ``true``\ 。
|
||
|
||
\ **注意:**\ 如果服务器不支持 :ref:`FEATURE_UNICODE_SECURITY<class_TextServer_constant_FEATURE_UNICODE_SECURITY>` 特性,则始终返回 ``false``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_string_get_character_breaks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_get_character_breaks>`
|
||
|
||
返回组合字符边界的数组。
|
||
|
||
::
|
||
|
||
var ts = TextServerManager.get_primary_interface()
|
||
print(ts.string_get_word_breaks("Test ❤️🔥 Test")) # 输出 [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_string_get_word_breaks:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextServer_method_string_get_word_breaks>`
|
||
|
||
返回分词边界的数组。返回数组中的元素是单词的起点和终点偏移量。因此,该数组的长度始终为偶数。
|
||
|
||
\ ``chars_per_line`` 大于零时,返回的是分行边界。
|
||
|
||
::
|
||
|
||
var ts = TextServerManager.get_primary_interface()
|
||
# 对应以下子字符串: "The"、"Godot"、"Engine"、"4"
|
||
print(ts.string_get_word_breaks("The Godot Engine, 4")) # 输出 [0, 3, 4, 9, 10, 16, 18, 19]
|
||
# 对应以下子字符串:"The"、"Godot"、"Engin"、"e, 4"
|
||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # 输出 [0, 3, 4, 9, 10, 15, 15, 19]
|
||
# 对应以下子字符串:"The Godot"、"Engine, 4"
|
||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # 输出 [0, 9, 10, 19]
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_string_to_lower:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_lower>`
|
||
|
||
Returns the string converted to ``lowercase``.
|
||
|
||
\ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
|
||
|
||
\ **Note:** The result may be longer or shorter than the original.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_string_to_title:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **string_to_title**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_title>`
|
||
|
||
Returns the string converted to ``Title Case``.
|
||
|
||
\ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
|
||
|
||
\ **Note:** The result may be longer or shorter than the original.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_string_to_upper:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_upper>`
|
||
|
||
Returns the string converted to ``UPPERCASE``.
|
||
|
||
\ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`).
|
||
|
||
\ **Note:** The result may be longer or shorter than the original.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_strip_diacritics:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_strip_diacritics>`
|
||
|
||
从字符串中剥离变音符号。
|
||
|
||
\ **注意:**\ 得到的字符串可能比原来的更长,也可能更短。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_TextServer_method_tag_to_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_tag_to_name>`
|
||
|
||
Converts the given OpenType tag to the readable name of a feature, variation, script, or language.
|
||
|
||
.. |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 (无返回值。)`
|