2020-08-12 13:49:10 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "TextServer" inherits= "RefCounted" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-08-12 13:49:10 +02:00
<brief_description >
2023-04-30 16:26:09 +02:00
A server interface for font management and text rendering.
2020-08-12 13:49:10 +02:00
</brief_description>
<description >
2023-04-30 16:26:09 +02:00
[TextServer] is the API backend for managing fonts and rendering text.
2020-08-12 13:49:10 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2020-12-27 14:30:33 +01:00
<method name= "create_font" >
2021-07-30 15:28:05 +02:00
<return type= "RID" />
2021-02-06 15:34:06 +01:00
<description >
2023-04-30 16:26:09 +02:00
Creates a new, empty font cache entry resource. To free the resulting resource, use the [method free_rid] method.
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-09-28 09:45:09 +02:00
<method name= "create_font_linked_variation" >
<return type= "RID" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the [method free_rid] method.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "create_shaped_text" >
2021-07-30 15:28:05 +02:00
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "direction" type= "int" enum= "TextServer.Direction" default= "0" />
<param index= "1" name= "orientation" type= "int" enum= "TextServer.Orientation" default= "0" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Creates new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method.
2022-01-17 09:54:45 +01:00
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
[b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "draw_hex_code_box" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "canvas" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "pos" type= "Vector2" />
<param index= "3" name= "index" type= "int" />
<param index= "4" name= "color" type= "Color" />
2020-08-12 13:49:10 +02:00
<description >
Draws box displaying character hexadecimal code. Used for replacing missing characters.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_clear_glyphs" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
2021-02-06 15:34:06 +01:00
<description >
2021-10-05 14:24:34 +02:00
Removes all rendered glyphs information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
2021-02-06 15:34:06 +01:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_clear_kerning_map" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2021-02-06 15:34:06 +01:00
<description >
2020-12-27 14:30:33 +01:00
Removes all kerning overrides.
2021-02-06 15:34:06 +01:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_clear_size_cache" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-12-27 14:30:33 +01:00
<description >
2022-02-13 13:41:29 +01:00
Removes all font sizes from the cache entry.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_clear_textures" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
2021-02-06 15:34:06 +01:00
<description >
2021-10-05 14:24:34 +02:00
Removes all textures from font cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
2021-02-06 15:34:06 +01:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_draw_glyph" qualifiers= "const" >
2020-12-27 14:30:33 +01:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "canvas" type= "RID" />
<param index= "2" name= "size" type= "int" />
<param index= "3" name= "pos" type= "Vector2" />
<param index= "4" name= "index" type= "int" />
<param index= "5" name= "color" type= "Color" default= "Color(1, 1, 1, 1)" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size].
2021-10-05 14:24:34 +02:00
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
2022-04-19 12:27:18 +02:00
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_draw_glyph_outline" qualifiers= "const" >
2020-12-27 14:30:33 +01:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "canvas" type= "RID" />
<param index= "2" name= "size" type= "int" />
<param index= "3" name= "outline_size" type= "int" />
<param index= "4" name= "pos" type= "Vector2" />
<param index= "5" name= "index" type= "int" />
<param index= "6" name= "color" type= "Color" default= "Color(1, 1, 1, 1)" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size].
2021-10-05 14:24:34 +02:00
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
2022-04-19 12:27:18 +02:00
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
2020-08-12 13:49:10 +02:00
</description>
</method>
2022-08-12 13:03:28 +02:00
<method name= "font_get_antialiasing" qualifiers= "const" >
<return type= "int" enum= "TextServer.FontAntialiasing" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Returns font anti-aliasing mode.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_get_ascent" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
2023-02-27 15:21:28 +01:00
<method name= "font_get_char_from_glyph_index" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph_index" type= "int" />
<description >
Returns character code associated with [param glyph_index], or [code]0[/code] if [param glyph_index] is invalid. See [method font_get_glyph_index].
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_get_descent" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Returns the font descent (number of pixels below the baseline).
</description>
</method>
2022-03-11 08:31:16 +01:00
<method name= "font_get_embolden" qualifiers= "const" >
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-03-11 08:31:16 +01:00
<description >
Returns font embolden strength.
</description>
</method>
2022-06-07 10:35:59 +02:00
<method name= "font_get_face_count" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-06-07 10:35:59 +02:00
<description >
Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
<method name= "font_get_face_index" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-06-07 10:35:59 +02:00
<description >
2023-11-12 08:20:49 +01:00
Returns an active face index in the TrueType / OpenType collection.
2022-06-07 10:35:59 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_fixed_size" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns bitmap font fixed size.
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-08-14 09:42:49 +02:00
<method name= "font_get_fixed_size_scale_mode" qualifiers= "const" >
<return type= "int" enum= "TextServer.FixedSizeScaleMode" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2023-11-12 08:20:49 +01:00
Returns bitmap font scaling mode.
2023-08-14 09:42:49 +02:00
</description>
</method>
2022-04-19 12:27:18 +02:00
<method name= "font_get_generate_mipmaps" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-04-19 12:27:18 +02:00
<description >
Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_global_oversampling" qualifiers= "const" >
<return type= "float" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns the font oversampling factor, shared by all fonts in the TextServer.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_glyph_advance" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2021-10-05 14:24:34 +02:00
Returns glyph advance (offset of the next glyph).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-10 16:30:25 +01:00
<method name= "font_get_glyph_contours" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "index" type= "int" />
2020-12-10 16:30:25 +01:00
<description >
2023-10-02 20:11:43 +02:00
Returns outline contours of the glyph as a [Dictionary] with the following contents:
2020-12-10 16:30:25 +01:00
[code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_get_glyph_index" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "char" type= "int" />
<param index= "3" name= "variation_selector" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2023-08-22 10:13:42 +02:00
Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. See [method font_get_char_from_glyph_index].
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_glyph_list" qualifiers= "const" >
2022-08-05 03:41:48 +02:00
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
2020-12-27 14:30:33 +01:00
<description >
Returns list of rendered glyphs in the cache entry.
</description>
</method>
<method name= "font_get_glyph_offset" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns glyph offset from the baseline.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_glyph_size" qualifiers= "const" >
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns size of the glyph.
</description>
</method>
<method name= "font_get_glyph_texture_idx" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Returns index of the cache texture containing the glyph.
</description>
</method>
2022-04-19 12:27:18 +02:00
<method name= "font_get_glyph_texture_rid" qualifiers= "const" >
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2022-04-19 12:27:18 +02:00
<description >
2022-12-08 02:40:49 +01:00
Returns resource ID of the cache texture containing the glyph.
2022-04-19 12:27:18 +02:00
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
<method name= "font_get_glyph_texture_size" qualifiers= "const" >
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2022-04-19 12:27:18 +02:00
<description >
Returns size of the cache texture containing the glyph.
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_glyph_uv_rect" qualifiers= "const" >
<return type= "Rect2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Returns rectangle in the cache texture containing the glyph.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_hinting" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextServer.Hinting" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns the font hinting mode. Used by dynamic fonts only.
</description>
</method>
<method name= "font_get_kerning" qualifiers= "const" >
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph_pair" type= "Vector2i" />
2020-12-27 14:30:33 +01:00
<description >
Returns kerning for the pair of glyphs.
</description>
</method>
<method name= "font_get_kerning_list" qualifiers= "const" >
2022-08-05 03:41:48 +02:00
<return type= "Vector2i[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Returns list of the kerning overrides.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_language_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "language" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns [code]true[/code] if support override is enabled for the [param language].
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_language_support_overrides" >
2021-07-30 15:28:05 +02:00
<return type= "PackedStringArray" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns list of language support overrides.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_msdf_pixel_range" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-12-27 14:30:33 +01:00
<description >
2022-01-02 18:32:49 +01:00
Returns the width of the range around the shape between the minimum and maximum representable signed distance.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_get_msdf_size" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-12-27 14:30:33 +01:00
<description >
Returns source font size used to generate MSDF textures.
</description>
</method>
2021-10-26 08:40:11 +02:00
<method name= "font_get_name" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-10-26 08:40:11 +02:00
<description >
Returns font family name.
</description>
</method>
2021-11-18 22:36:22 +01:00
<method name= "font_get_opentype_feature_overrides" qualifiers= "const" >
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-11-18 22:36:22 +01:00
<description >
Returns font OpenType feature set override.
</description>
</method>
2023-04-05 11:49:38 +02:00
<method name= "font_get_ot_name_strings" qualifiers= "const" >
<return type= "Dictionary" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_get_oversampling" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
<method name= "font_get_scale" qualifiers= "const" >
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Returns scaling factor of the color bitmap font.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_script_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "script" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns [code]true[/code] if support override is enabled for the [param script].
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_get_script_support_overrides" >
2021-07-30 15:28:05 +02:00
<return type= "PackedStringArray" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns list of script support overrides.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_size_cache_list" qualifiers= "const" >
2022-08-05 03:41:48 +02:00
<return type= "Vector2i[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-02-15 09:46:23 +01:00
<description >
2023-10-02 20:11:43 +02:00
Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
2021-02-15 09:46:23 +01:00
</description>
</method>
2023-08-24 10:56:50 +02:00
<method name= "font_get_spacing" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<description >
Returns the spacing for [param spacing] (see [enum TextServer.SpacingType]) in pixels (not relative to the font size).
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_get_stretch" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
</description>
</method>
2021-10-26 08:40:11 +02:00
<method name= "font_get_style" qualifiers= "const" >
2023-06-15 16:06:22 +02:00
<return type= "int" enum= "TextServer.FontStyle" is_bitfield= "true" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-10-26 08:40:11 +02:00
<description >
Returns font style flags, see [enum FontStyle].
</description>
</method>
<method name= "font_get_style_name" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-10-26 08:40:11 +02:00
<description >
Returns font style name.
</description>
</method>
2022-01-10 09:13:22 +01:00
<method name= "font_get_subpixel_positioning" qualifiers= "const" >
<return type= "int" enum= "TextServer.SubpixelPositioning" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-01-10 09:13:22 +01:00
<description >
2022-11-03 18:37:21 +01:00
Returns font subpixel glyph positioning mode.
2022-01-10 09:13:22 +01:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_get_supported_chars" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns a string containing all the characters available in the font.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_texture_count" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns number of textures used by font cache entry.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_texture_image" qualifiers= "const" >
<return type= "Image" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "texture_index" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Returns font cache texture image data.
</description>
</method>
<method name= "font_get_texture_offsets" qualifiers= "const" >
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "texture_index" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
2022-10-18 09:10:24 +02:00
Returns array containing glyph packing data.
2020-12-27 14:30:33 +01:00
</description>
</method>
2022-03-11 08:31:16 +01:00
<method name= "font_get_transform" qualifiers= "const" >
<return type= "Transform2D" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-03-11 08:31:16 +01:00
<description >
Returns 2D transform applied to the font outlines.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_underline_position" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns pixel offset of the underline below the baseline.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_underline_thickness" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
2020-10-22 18:40:18 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns thickness of the underline in pixels.
2020-10-22 18:40:18 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_get_variation_coordinates" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-10-22 18:40:18 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
2020-10-22 18:40:18 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_get_weight" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_has_char" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "char" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns [code]true[/code] if a Unicode [param char] is available in the font.
2020-08-12 13:49:10 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_is_allow_system_fallback" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_is_force_autohinter" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 07:03:58 +01:00
Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_is_language_supported" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "language" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
<method name= "font_is_multichannel_signed_distance_field" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-12-27 14:30:33 +01:00
<description >
Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_is_script_supported" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "script" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_remove_glyph" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
2021-10-05 14:24:34 +02:00
Removes specified rendered glyph information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_remove_kerning" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph_pair" type= "Vector2i" />
2020-12-27 14:30:33 +01:00
<description >
Removes kerning override for the pair of glyphs.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_remove_language_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "language" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Remove language support override.
</description>
</method>
<method name= "font_remove_script_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "script" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Removes script support override.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_remove_size_cache" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
2020-12-27 14:30:33 +01:00
<description >
Removes specified font size from the cache entry.
</description>
</method>
<method name= "font_remove_texture" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "texture_index" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
2022-05-09 11:47:10 +02:00
Removes specified texture from the cache entry.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_render_glyph" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "index" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
2022-02-13 13:41:29 +01:00
Renders specified glyph to the font cache texture.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_render_range" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "start" type= "int" />
<param index= "3" name= "end" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Renders the range of characters to the font cache texture.
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_set_allow_system_fallback" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "allow_system_fallback" type= "bool" />
<description >
If set to [code]true[/code], system fonts can be automatically used as fallbacks.
</description>
</method>
2022-08-12 13:03:28 +02:00
<method name= "font_set_antialiasing" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2022-08-12 13:03:28 +02:00
<param index= "1" name= "antialiasing" type= "int" enum= "TextServer.FontAntialiasing" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-12 13:03:28 +02:00
Sets font anti-aliasing mode.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_ascent" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "ascent" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets the font ascent (number of pixels above the baseline).
</description>
</method>
<method name= "font_set_data" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "data" type= "PackedByteArray" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Sets font source data, e.g contents of the dynamic font source file.
</description>
</method>
<method name= "font_set_descent" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "descent" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets the font descent (number of pixels below the baseline).
</description>
</method>
2022-03-11 08:31:16 +01:00
<method name= "font_set_embolden" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "strength" type= "float" />
2022-03-11 08:31:16 +01:00
<description >
2022-08-09 17:19:47 +02:00
Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
2022-03-11 08:31:16 +01:00
</description>
</method>
2022-06-07 10:35:59 +02:00
<method name= "font_set_face_index" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "face_index" type= "int" />
2022-06-07 10:35:59 +02:00
<description >
Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_fixed_size" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "fixed_size" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-08-14 09:42:49 +02:00
<method name= "font_set_fixed_size_scale_mode" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "fixed_size_scale_mode" type= "int" enum= "TextServer.FixedSizeScaleMode" />
<description >
Sets bitmap font scaling mode. This property is used only if [code]fixed_size[/code] is greater than zero.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_set_force_autohinter" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "force_autohinter" type= "bool" />
2020-12-27 14:30:33 +01:00
<description >
Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 07:03:58 +01:00
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
2020-12-27 14:30:33 +01:00
</description>
</method>
2022-04-19 12:27:18 +02:00
<method name= "font_set_generate_mipmaps" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "generate_mipmaps" type= "bool" />
2022-04-19 12:27:18 +02:00
<description >
If set to [code]true[/code] font texture mipmap generation is enabled.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_global_oversampling" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "oversampling" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets oversampling factor, shared by all font in the TextServer.
Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 07:03:58 +01:00
[b]Note:[/b] This value can be automatically changed by display server.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_set_glyph_advance" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph" type= "int" />
<param index= "3" name= "advance" type= "Vector2" />
2020-12-27 14:30:33 +01:00
<description >
2021-10-05 14:24:34 +02:00
Sets glyph advance (offset of the next glyph).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_set_glyph_offset" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
<param index= "3" name= "offset" type= "Vector2" />
2020-12-27 14:30:33 +01:00
<description >
Sets glyph offset from the baseline.
</description>
</method>
<method name= "font_set_glyph_size" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
<param index= "3" name= "gl_size" type= "Vector2" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Sets size of the glyph.
</description>
</method>
<method name= "font_set_glyph_texture_idx" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
<param index= "3" name= "texture_idx" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Sets index of the cache texture containing the glyph.
</description>
</method>
<method name= "font_set_glyph_uv_rect" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
<param index= "3" name= "uv_rect" type= "Rect2" />
2020-12-27 14:30:33 +01:00
<description >
Sets rectangle in the cache texture containing the glyph.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_set_hinting" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "hinting" type= "int" enum= "TextServer.Hinting" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Sets font hinting mode. Used by dynamic fonts only.
</description>
</method>
<method name= "font_set_kerning" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "glyph_pair" type= "Vector2i" />
<param index= "3" name= "kerning" type= "Vector2" />
2020-12-27 14:30:33 +01:00
<description >
Sets kerning for the pair of glyphs.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_set_language_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "language" type= "String" />
<param index= "2" name= "supported" type= "bool" />
2020-08-12 13:49:10 +02:00
<description >
Adds override for [method font_is_language_supported].
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_msdf_pixel_range" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "msdf_pixel_range" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
<method name= "font_set_msdf_size" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "msdf_size" type= "int" />
2020-12-27 14:30:33 +01:00
<description >
Sets source font size used to generate MSDF textures.
</description>
</method>
<method name= "font_set_multichannel_signed_distance_field" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "msdf" type= "bool" />
2020-12-27 14:30:33 +01:00
<description >
2021-09-15 20:04:57 +02:00
If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
[b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
2020-12-27 14:30:33 +01:00
</description>
</method>
2021-10-26 08:40:11 +02:00
<method name= "font_set_name" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "name" type= "String" />
2021-10-26 08:40:11 +02:00
<description >
Sets the font family name.
</description>
</method>
2021-11-18 22:36:22 +01:00
<method name= "font_set_opentype_feature_overrides" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "overrides" type= "Dictionary" />
2021-11-18 22:36:22 +01:00
<description >
Sets font OpenType feature set override.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "font_set_oversampling" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "oversampling" type= "float" />
2020-08-12 13:49:10 +02:00
<description >
2020-12-27 14:30:33 +01:00
Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
<method name= "font_set_scale" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "scale" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets scaling factor of the color bitmap font.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "font_set_script_support_override" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "script" type= "String" />
<param index= "2" name= "supported" type= "bool" />
2020-08-12 13:49:10 +02:00
<description >
Adds override for [method font_is_script_supported].
</description>
</method>
2023-08-24 10:56:50 +02:00
<method name= "font_set_spacing" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<param index= "2" name= "value" type= "int" />
<description >
Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size).
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_set_stretch" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "weight" type= "int" />
<description >
Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
[b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.
</description>
</method>
2021-10-26 08:40:11 +02:00
<method name= "font_set_style" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2023-06-15 16:06:22 +02:00
<param index= "1" name= "style" type= "int" enum= "TextServer.FontStyle" is_bitfield= "true" />
2021-10-26 08:40:11 +02:00
<description >
Sets the font style flags, see [enum FontStyle].
2022-11-21 14:04:01 +01:00
[b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.
2021-10-26 08:40:11 +02:00
</description>
</method>
<method name= "font_set_style_name" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "name" type= "String" />
2021-10-26 08:40:11 +02:00
<description >
2022-01-10 09:13:22 +01:00
Sets the font style name.
</description>
</method>
<method name= "font_set_subpixel_positioning" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "subpixel_positioning" type= "int" enum= "TextServer.SubpixelPositioning" />
2022-01-10 09:13:22 +01:00
<description >
2022-11-03 18:37:21 +01:00
Sets font subpixel glyph positioning mode.
2021-10-26 08:40:11 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_texture_image" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "texture_index" type= "int" />
<param index= "3" name= "image" type= "Image" />
2021-02-15 09:46:23 +01:00
<description >
2020-12-27 14:30:33 +01:00
Sets font cache texture image data.
2021-02-15 09:46:23 +01:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_texture_offsets" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "Vector2i" />
<param index= "2" name= "texture_index" type= "int" />
<param index= "3" name= "offset" type= "PackedInt32Array" />
2020-12-27 14:30:33 +01:00
<description >
2022-10-18 09:10:24 +02:00
Sets array containing glyph packing data.
2020-12-27 14:30:33 +01:00
</description>
</method>
2022-03-11 08:31:16 +01:00
<method name= "font_set_transform" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "transform" type= "Transform2D" />
2022-03-11 08:31:16 +01:00
<description >
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_set_underline_position" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "underline_position" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets pixel offset of the underline below the baseline.
</description>
</method>
<method name= "font_set_underline_thickness" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "size" type= "int" />
<param index= "2" name= "underline_thickness" type= "float" />
2020-12-27 14:30:33 +01:00
<description >
Sets thickness of the underline in pixels.
</description>
</method>
<method name= "font_set_variation_coordinates" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "variation_coordinates" type= "Dictionary" />
2020-12-27 14:30:33 +01:00
<description >
Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "font_set_weight" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "weight" type= "int" />
<description >
Sets weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
[b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "font_supported_feature_list" qualifiers= "const" >
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-12-27 14:30:33 +01:00
<description >
2021-08-27 23:19:51 +02:00
Returns the dictionary of the supported OpenType features.
2020-12-27 14:30:33 +01:00
</description>
</method>
<method name= "font_supported_variation_list" qualifiers= "const" >
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2020-10-22 18:40:18 +02:00
<description >
2021-08-27 23:19:51 +02:00
Returns the dictionary of the supported OpenType variation coordinates.
2020-10-22 18:40:18 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "format_number" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "number" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].
2022-12-19 05:11:02 +01:00
If [param language] is omitted, the active locale will be used.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "free_rid" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Frees an object created by this [TextServer].
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "get_features" qualifiers= "const" >
<return type= "int" />
<description >
Returns text server features, see [enum Feature].
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "get_hex_code_box_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "size" type= "int" />
<param index= "1" name= "index" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
</description>
</method>
<method name= "get_name" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Returns the name of the server interface.
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "get_support_data_filename" qualifiers= "const" >
<return type= "String" />
<description >
Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
</description>
</method>
<method name= "get_support_data_info" qualifiers= "const" >
<return type= "String" />
<description >
Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "has" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
2020-08-12 13:49:10 +02:00
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "has_feature" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "feature" type= "int" enum= "TextServer.Feature" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if the server supports a feature.
</description>
</method>
2021-11-12 09:12:37 +01:00
<method name= "is_confusable" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "dict" type= "PackedStringArray" />
2021-11-12 09:12:37 +01:00
<description >
2022-08-09 22:53:29 +02:00
Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found.
2021-11-12 09:12:37 +01:00
[b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check].
[b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "is_locale_right_to_left" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "locale" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
2021-10-18 14:07:11 +02:00
<method name= "is_valid_identifier" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
2021-10-18 14:07:11 +02:00
<description >
2023-04-18 13:53:47 +02:00
Returns [code]true[/code] if [param string] is a valid identifier.
2021-10-18 14:07:11 +02:00
If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must:
- Conform to normalization form C.
- Begin with a Unicode character of class XID_Start or [code]"_"[/code].
- May contain Unicode characters of class XID_Continue in the other positions.
- Use UAX #31 recommended scripts only (mixed scripts are allowed).
If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must:
- Begin with a Unicode character of class XID_Start or [code]"_"[/code].
- May contain Unicode characters of class XID_Continue in the other positions.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "load_support_data" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "filename" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
2021-10-05 14:24:34 +02:00
[b]Note:[/b] This function should be called before any other TextServer functions used, otherwise it won't have any effect.
2020-08-12 13:49:10 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "name_to_tag" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "String" />
2020-08-12 13:49:10 +02:00
<description >
Converts readable feature, variation, script or language name to OpenType tag.
</description>
</method>
<method name= "parse_number" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "number" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).
2020-08-12 13:49:10 +02:00
</description>
</method>
2022-04-19 12:27:18 +02:00
<method name= "parse_structured_text" qualifiers= "const" >
2023-01-18 08:33:35 +01:00
<return type= "Vector3i[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "parser_type" type= "int" enum= "TextServer.StructuredTextParser" />
<param index= "1" name= "args" type= "Array" />
<param index= "2" name= "text" type= "String" />
2022-04-19 12:27:18 +02:00
<description >
Default implementation of the BiDi algorithm override function. See [enum StructuredTextParser] for more info.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "percent_sign" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "language" type= "String" default= """" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns percent sign used in the [param language].
2020-08-12 13:49:10 +02:00
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "save_support_data" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "filename" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] This function is used by during project export, to include TextServer database.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-01-20 08:30:42 +01:00
<method name= "shaped_get_span_count" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2022-01-20 08:30:42 +01:00
<description >
Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
</description>
</method>
<method name= "shaped_get_span_meta" qualifiers= "const" >
<return type= "Variant" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "index" type= "int" />
2022-01-20 08:30:42 +01:00
<description >
Returns text span metadata.
</description>
</method>
<method name= "shaped_set_span_update_font" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "index" type= "int" />
2022-08-31 19:24:04 +02:00
<param index= "2" name= "fonts" type= "RID[]" />
2022-08-06 20:11:48 +02:00
<param index= "3" name= "size" type= "int" />
<param index= "4" name= "opentype_features" type= "Dictionary" default= "{}" />
2022-01-20 08:30:42 +01:00
<description >
Changes text span font, font size and OpenType features, without changing the text.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_add_object" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "key" type= "Variant" />
<param index= "2" name= "size" type= "Vector2" />
<param index= "3" name= "inline_align" type= "int" enum= "InlineAlignment" default= "5" />
<param index= "4" name= "length" type= "int" default= "1" />
2022-12-08 21:01:07 +01:00
<param index= "5" name= "baseline" type= "float" default= "0.0" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_add_string" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "text" type= "String" />
2022-08-31 19:24:04 +02:00
<param index= "2" name= "fonts" type= "RID[]" />
2022-08-06 20:11:48 +02:00
<param index= "3" name= "size" type= "int" />
<param index= "4" name= "opentype_features" type= "Dictionary" default= "{}" />
<param index= "5" name= "language" type= "String" default= """" />
<param index= "6" name= "meta" type= "Variant" default= "null" />
2020-08-12 13:49:10 +02:00
<description >
Adds text span and font to draw it to the text buffer.
</description>
</method>
<method name= "shaped_text_clear" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rid" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Clears text buffer (removes text and inline objects).
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_closest_character_pos" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
Returns composite character position closest to the [param pos].
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_draw" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "canvas" type= "RID" />
<param index= "2" name= "pos" type= "Vector2" />
<param index= "3" name= "clip_l" type= "float" default= "-1" />
<param index= "4" name= "clip_r" type= "float" default= "-1" />
<param index= "5" name= "color" type= "Color" default= "Color(1, 1, 1, 1)" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_draw_outline" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "canvas" type= "RID" />
<param index= "2" name= "pos" type= "Vector2" />
<param index= "3" name= "clip_l" type= "float" default= "-1" />
<param index= "4" name= "clip_r" type= "float" default= "-1" />
<param index= "5" name= "outline_size" type= "int" default= "1" />
<param index= "6" name= "color" type= "Color" default= "Color(1, 1, 1, 1)" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_fit_to_width" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "width" type= "float" />
2023-06-15 16:06:22 +02:00
<param index= "2" name= "justification_flags" type= "int" enum= "TextServer.JustificationFlag" is_bitfield= "true" default= "3" />
2020-08-12 13:49:10 +02:00
<description >
2023-03-27 13:29:19 +02:00
Adjusts text width to fit to specified width, returns new text width.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_get_ascent" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
2021-10-05 14:24:34 +02:00
[b]Note:[/b] Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_get_carets" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "position" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_get_character_breaks" qualifiers= "const" >
<return type= "PackedInt32Array" />
<param index= "0" name= "shaped" type= "RID" />
<description >
Returns array of the composite character boundaries.
</description>
</method>
2023-10-01 12:39:13 +02:00
<method name= "shaped_text_get_custom_ellipsis" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<description >
Returns ellipsis character used for text clipping.
</description>
</method>
2021-03-06 10:52:16 +01:00
<method name= "shaped_text_get_custom_punctuation" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-03-06 10:52:16 +01:00
<description >
Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_get_descent" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
2021-10-05 14:24:34 +02:00
[b]Note:[/b] Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_get_direction" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextServer.Direction" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns direction of the text.
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "shaped_text_get_dominant_direction_in_range" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextServer.Direction" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "start" type= "int" />
<param index= "2" name= "end" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Returns dominant direction of in the range of text.
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "shaped_text_get_ellipsis_glyph_count" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
Returns number of glyphs in the ellipsis.
</description>
</method>
<method name= "shaped_text_get_ellipsis_glyphs" qualifiers= "const" >
2022-08-08 00:52:20 +02:00
<return type= "Dictionary[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
Returns array of the glyphs in the ellipsis.
</description>
</method>
<method name= "shaped_text_get_ellipsis_pos" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
Returns position of the ellipsis.
</description>
</method>
<method name= "shaped_text_get_glyph_count" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
Returns number of glyphs in the buffer.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_get_glyphs" qualifiers= "const" >
2022-08-08 00:52:20 +02:00
<return type= "Dictionary[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2022-02-13 13:41:29 +01:00
Returns an array of glyphs in the visual order.
2020-08-12 13:49:10 +02:00
</description>
</method>
2021-11-18 16:55:43 +01:00
<method name= "shaped_text_get_grapheme_bounds" qualifiers= "const" >
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
2021-11-18 16:55:43 +01:00
<description >
Returns composite character's bounds as offsets from the start of the line.
</description>
</method>
2022-01-10 16:24:03 +01:00
<method name= "shaped_text_get_inferred_direction" qualifiers= "const" >
<return type= "int" enum= "TextServer.Direction" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2022-01-10 16:24:03 +01:00
<description >
Returns direction of the text, inferred by the BiDi algorithm.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_get_line_breaks" qualifiers= "const" >
2021-08-27 23:19:51 +02:00
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "width" type= "float" />
<param index= "2" name= "start" type= "int" default= "0" />
2023-06-15 16:06:22 +02:00
<param index= "3" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" is_bitfield= "true" default= "3" />
2020-08-12 13:49:10 +02:00
<description >
Breaks text to the lines and returns character ranges for each line.
</description>
</method>
<method name= "shaped_text_get_line_breaks_adv" qualifiers= "const" >
2021-08-27 23:19:51 +02:00
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "width" type= "PackedFloat32Array" />
<param index= "2" name= "start" type= "int" default= "0" />
<param index= "3" name= "once" type= "bool" default= "true" />
2023-06-15 16:06:22 +02:00
<param index= "4" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" is_bitfield= "true" default= "3" />
2020-08-12 13:49:10 +02:00
<description >
Breaks text to the lines and columns. Returns character ranges for each segment.
</description>
</method>
<method name= "shaped_text_get_object_rect" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Rect2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "key" type= "Variant" />
2020-08-12 13:49:10 +02:00
<description >
Returns bounding rectangle of the inline object.
</description>
</method>
<method name= "shaped_text_get_objects" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns array of inline objects.
</description>
</method>
<method name= "shaped_text_get_orientation" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "TextServer.Orientation" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns text orientation.
</description>
</method>
<method name= "shaped_text_get_parent" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
2022-02-13 13:41:29 +01:00
Returns the parent buffer from which the substring originates.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_get_preserve_control" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if text buffer is configured to display control characters.
</description>
</method>
<method name= "shaped_text_get_preserve_invalid" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_get_range" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2i" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns substring buffer character range in the parent buffer.
</description>
</method>
<method name= "shaped_text_get_selection" qualifiers= "const" >
2021-08-27 23:19:51 +02:00
<return type= "PackedVector2Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "start" type= "int" />
<param index= "2" name= "end" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Returns selection rectangles for the specified character range.
</description>
</method>
<method name= "shaped_text_get_size" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns size of the text.
</description>
</method>
2022-05-09 11:47:10 +02:00
<method name= "shaped_text_get_spacing" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
2022-05-09 11:47:10 +02:00
<description >
Returns extra spacing added between glyphs or lines in pixels.
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "shaped_text_get_trim_pos" qualifiers= "const" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2022-02-13 13:41:29 +01:00
Returns the position of the overrun trim.
2021-08-27 23:19:51 +02:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_get_underline_position" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns pixel offset of the underline below the baseline.
</description>
</method>
<method name= "shaped_text_get_underline_thickness" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns thickness of the underline.
</description>
</method>
<method name= "shaped_text_get_width" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns width (for horizontal layout) or height (for vertical) of the text.
</description>
</method>
<method name= "shaped_text_get_word_breaks" qualifiers= "const" >
2021-08-27 23:19:51 +02:00
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2023-06-15 16:06:22 +02:00
<param index= "1" name= "grapheme_flags" type= "int" enum= "TextServer.GraphemeFlag" is_bitfield= "true" default= "264" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum GraphemeFlag]).
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-03-23 10:22:37 +01:00
<method name= "shaped_text_has_visible_chars" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "shaped" type= "RID" />
<description >
2023-08-22 10:13:42 +02:00
Returns [code]true[/code] if text buffer contains any visible characters.
2023-03-23 10:22:37 +01:00
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_hit_test_grapheme" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "coords" type= "float" />
2020-08-12 13:49:10 +02:00
<description >
Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
</description>
</method>
<method name= "shaped_text_hit_test_position" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "coords" type= "float" />
2020-08-12 13:49:10 +02:00
<description >
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
</description>
</method>
<method name= "shaped_text_is_ready" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Returns [code]true[/code] if buffer is successfully shaped.
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_next_character_pos" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns composite character end position closest to the [param pos].
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_next_grapheme_pos" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
Returns grapheme end position closest to the [param pos].
</description>
</method>
2021-07-04 16:43:55 +02:00
<method name= "shaped_text_overrun_trim_to_width" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "width" type= "float" default= "0" />
2023-06-15 16:06:22 +02:00
<param index= "2" name= "overrun_trim_flags" type= "int" enum= "TextServer.TextOverrunFlag" is_bitfield= "true" default= "0" />
2021-07-04 16:43:55 +02:00
<description >
Trims text if it exceeds the given width.
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_prev_character_pos" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns composite character start position closest to the [param pos].
2020-08-12 13:49:10 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "shaped_text_prev_grapheme_pos" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
Returns grapheme start position closest to the [param pos].
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_resize_object" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "key" type= "Variant" />
<param index= "2" name= "size" type= "Vector2" />
<param index= "3" name= "inline_align" type= "int" enum= "InlineAlignment" default= "5" />
2022-12-08 21:01:07 +01:00
<param index= "4" name= "baseline" type= "float" default= "0.0" />
2020-08-12 13:49:10 +02:00
<description >
Sets new size and alignment of embedded object.
</description>
</method>
<method name= "shaped_text_set_bidi_override" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "override" type= "Array" />
2020-08-12 13:49:10 +02:00
<description >
Overrides BiDi for the structured text.
Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
2023-10-01 12:39:13 +02:00
<method name= "shaped_text_set_custom_ellipsis" >
<return type= "void" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "char" type= "int" />
<description >
Sets ellipsis character used for text clipping.
</description>
</method>
2021-03-06 10:52:16 +01:00
<method name= "shaped_text_set_custom_punctuation" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "punct" type= "String" />
2021-03-06 10:52:16 +01:00
<description >
Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_set_direction" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "direction" type= "int" enum= "TextServer.Direction" default= "0" />
2020-08-12 13:49:10 +02:00
<description >
2022-11-01 15:29:38 +01:00
Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.
2022-01-17 09:54:45 +01:00
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_set_orientation" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "orientation" type= "int" enum= "TextServer.Orientation" default= "0" />
2020-08-12 13:49:10 +02:00
<description >
Sets desired text orientation.
2022-01-17 09:54:45 +01:00
[b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_set_preserve_control" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "enabled" type= "bool" />
2020-08-12 13:49:10 +02:00
<description >
If set to [code]true[/code] text buffer will display control characters.
</description>
</method>
<method name= "shaped_text_set_preserve_invalid" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "enabled" type= "bool" />
2020-08-12 13:49:10 +02:00
<description >
If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
</description>
</method>
2022-05-09 11:47:10 +02:00
<method name= "shaped_text_set_spacing" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<param index= "2" name= "value" type= "int" />
2022-05-09 11:47:10 +02:00
<description >
Sets extra spacing added between glyphs or lines in pixels.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_shape" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2020-08-12 13:49:10 +02:00
<description >
Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
2021-10-05 14:24:34 +02:00
[b]Note:[/b] It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
2020-08-12 13:49:10 +02:00
</description>
</method>
2021-08-27 23:19:51 +02:00
<method name= "shaped_text_sort_logical" >
2022-08-08 00:52:20 +02:00
<return type= "Dictionary[]" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
Returns text glyphs in the logical order.
</description>
</method>
2020-08-12 13:49:10 +02:00
<method name= "shaped_text_substr" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "start" type= "int" />
<param index= "2" name= "length" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
2022-08-09 17:19:47 +02:00
Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
2020-08-12 13:49:10 +02:00
</description>
</method>
<method name= "shaped_text_tab_align" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "tab_stops" type= "PackedFloat32Array" />
2020-08-12 13:49:10 +02:00
<description >
Aligns shaped text to the given tab-stops.
</description>
</method>
2021-11-12 09:12:37 +01:00
<method name= "spoof_check" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
2021-11-12 09:12:37 +01:00
<description >
2022-08-09 17:19:47 +02:00
Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader.
2021-11-12 09:12:37 +01:00
[b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "string_get_character_breaks" qualifiers= "const" >
<return type= "PackedInt32Array" />
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
<description >
Returns array of the composite character boundaries.
[codeblock]
var ts = TextServerManager.get_primary_interface()
print(ts.string_get_word_breaks("Test ❤️🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
[/codeblock]
</description>
</method>
2021-11-04 13:33:37 +01:00
<method name= "string_get_word_breaks" qualifiers= "const" >
<return type= "PackedInt32Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
2022-08-18 10:20:20 +02:00
<param index= "2" name= "chars_per_line" type= "int" default= "0" />
<description >
Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even.
When [param chars_per_line] is greater than zero, line break boundaries are returned instead.
[codeblock]
var ts = TextServerManager.get_primary_interface()
print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12]
print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12]
[/codeblock]
2021-11-04 13:33:37 +01:00
</description>
</method>
2022-01-17 09:54:45 +01:00
<method name= "string_to_lower" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
2022-01-17 09:54:45 +01:00
<description >
Returns the string converted to lowercase.
[b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
[b]Note:[/b] The result may be longer or shorter than the original.
</description>
</method>
<method name= "string_to_upper" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "language" type= "String" default= """" />
2022-01-17 09:54:45 +01:00
<description >
Returns the string converted to uppercase.
[b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
[b]Note:[/b] The result may be longer or shorter than the original.
</description>
</method>
2021-10-12 20:36:08 +02:00
<method name= "strip_diacritics" qualifiers= "const" >
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
2021-10-12 20:36:08 +02:00
<description >
Strips diacritics from the string.
2022-02-13 13:41:29 +01:00
[b]Note:[/b] The result may be longer or shorter than the original.
2021-10-12 20:36:08 +02:00
</description>
</method>
2020-12-27 14:30:33 +01:00
<method name= "tag_to_name" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "tag" type= "int" />
2020-08-12 13:49:10 +02:00
<description >
Converts OpenType tag to readable feature, variation, script or language name.
</description>
</method>
</methods>
<constants >
2022-08-12 13:03:28 +02:00
<constant name= "FONT_ANTIALIASING_NONE" value= "0" enum= "FontAntialiasing" >
Font glyphs are rasterized as 1-bit bitmaps.
</constant>
<constant name= "FONT_ANTIALIASING_GRAY" value= "1" enum= "FontAntialiasing" >
Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
</constant>
<constant name= "FONT_ANTIALIASING_LCD" value= "2" enum= "FontAntialiasing" >
Font glyphs are rasterized for LCD screens.
2022-11-03 18:37:21 +01:00
LCD subpixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings.
LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
2022-08-12 13:03:28 +02:00
</constant>
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_NONE" value= "0" enum= "FontLCDSubpixelLayout" >
2022-11-03 18:37:21 +01:00
Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
2022-08-12 13:03:28 +02:00
</constant>
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value= "1" enum= "FontLCDSubpixelLayout" >
2022-11-03 18:37:21 +01:00
Horizontal RGB subpixel layout.
2022-08-12 13:03:28 +02:00
</constant>
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value= "2" enum= "FontLCDSubpixelLayout" >
2022-11-03 18:37:21 +01:00
Horizontal BGR subpixel layout.
2022-08-12 13:03:28 +02:00
</constant>
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value= "3" enum= "FontLCDSubpixelLayout" >
2022-11-03 18:37:21 +01:00
Vertical RGB subpixel layout.
2022-08-12 13:03:28 +02:00
</constant>
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value= "4" enum= "FontLCDSubpixelLayout" >
2022-11-03 18:37:21 +01:00
Vertical BGR subpixel layout.
2022-08-12 13:03:28 +02:00
</constant>
2022-09-27 10:23:34 +02:00
<constant name= "FONT_LCD_SUBPIXEL_LAYOUT_MAX" value= "5" enum= "FontLCDSubpixelLayout" >
</constant>
2020-08-12 13:49:10 +02:00
<constant name= "DIRECTION_AUTO" value= "0" enum= "Direction" >
Text direction is determined based on contents and current locale.
</constant>
<constant name= "DIRECTION_LTR" value= "1" enum= "Direction" >
Text is written from left to right.
</constant>
<constant name= "DIRECTION_RTL" value= "2" enum= "Direction" >
Text is written from right to left.
</constant>
2023-01-18 08:33:35 +01:00
<constant name= "DIRECTION_INHERITED" value= "3" enum= "Direction" >
Text writing direction is the same as base string writing direction. Used for BiDi override only.
</constant>
2020-08-12 13:49:10 +02:00
<constant name= "ORIENTATION_HORIZONTAL" value= "0" enum= "Orientation" >
Text is written horizontally.
</constant>
<constant name= "ORIENTATION_VERTICAL" value= "1" enum= "Orientation" >
Left to right text is written vertically from top to bottom.
Right to left text is written vertically from bottom to top.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_NONE" value= "0" enum= "JustificationFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Do not justify text.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_KASHIDA" value= "1" enum= "JustificationFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Justify text by adding and removing kashidas.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_WORD_BOUND" value= "2" enum= "JustificationFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Justify text by changing width of the spaces between the words.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_TRIM_EDGE_SPACES" value= "4" enum= "JustificationFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Remove trailing and leading spaces from the justified text.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_AFTER_LAST_TAB" value= "8" enum= "JustificationFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Only apply justification to the part of the text after the last tab.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "JUSTIFICATION_CONSTRAIN_ELLIPSIS" value= "16" enum= "JustificationFlag" is_bitfield= "true" >
2021-08-27 23:19:51 +02:00
Apply justification to the trimmed line with ellipsis.
</constant>
2023-03-23 10:22:37 +01:00
<constant name= "JUSTIFICATION_SKIP_LAST_LINE" value= "32" enum= "JustificationFlag" is_bitfield= "true" >
Do not apply justification to the last line of the paragraph.
</constant>
<constant name= "JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS" value= "64" enum= "JustificationFlag" is_bitfield= "true" >
Do not apply justification to the last line of the paragraph with visible characters (takes precedence over [constant JUSTIFICATION_SKIP_LAST_LINE]).
</constant>
<constant name= "JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE" value= "128" enum= "JustificationFlag" is_bitfield= "true" >
Always apply justification to the paragraphs with a single line ([constant JUSTIFICATION_SKIP_LAST_LINE] and [constant JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS] are ignored).
</constant>
2022-06-15 10:01:45 +02:00
<constant name= "AUTOWRAP_OFF" value= "0" enum= "AutowrapMode" >
Autowrap is disabled.
</constant>
<constant name= "AUTOWRAP_ARBITRARY" value= "1" enum= "AutowrapMode" >
Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
</constant>
<constant name= "AUTOWRAP_WORD" value= "2" enum= "AutowrapMode" >
Wraps the text inside the node's bounding rectangle by soft-breaking between words.
</constant>
<constant name= "AUTOWRAP_WORD_SMART" value= "3" enum= "AutowrapMode" >
Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "BREAK_NONE" value= "0" enum= "LineBreakFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Do not break the line.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "BREAK_MANDATORY" value= "1" enum= "LineBreakFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "BREAK_WORD_BOUND" value= "2" enum= "LineBreakFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Break the line between the words.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "BREAK_GRAPHEME_BOUND" value= "4" enum= "LineBreakFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Break the line between any unconnected graphemes.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "BREAK_ADAPTIVE" value= "8" enum= "LineBreakFlag" is_bitfield= "true" >
2022-08-30 10:56:17 +02:00
Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.
</constant>
<constant name= "BREAK_TRIM_EDGE_SPACES" value= "16" enum= "LineBreakFlag" is_bitfield= "true" >
Remove edge spaces from the broken line segments.
2021-08-27 23:19:51 +02:00
</constant>
2022-06-15 10:01:45 +02:00
<constant name= "VC_CHARS_BEFORE_SHAPING" value= "0" enum= "VisibleCharactersBehavior" >
Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
</constant>
<constant name= "VC_CHARS_AFTER_SHAPING" value= "1" enum= "VisibleCharactersBehavior" >
Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
</constant>
<constant name= "VC_GLYPHS_AUTO" value= "2" enum= "VisibleCharactersBehavior" >
2022-08-20 20:06:13 +02:00
Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
2022-06-15 10:01:45 +02:00
</constant>
<constant name= "VC_GLYPHS_LTR" value= "3" enum= "VisibleCharactersBehavior" >
2022-08-20 20:06:13 +02:00
Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.
2022-06-15 10:01:45 +02:00
</constant>
<constant name= "VC_GLYPHS_RTL" value= "4" enum= "VisibleCharactersBehavior" >
2022-08-20 20:06:13 +02:00
Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.
2022-06-15 10:01:45 +02:00
</constant>
<constant name= "OVERRUN_NO_TRIMMING" value= "0" enum= "OverrunBehavior" >
No text trimming is performed.
</constant>
<constant name= "OVERRUN_TRIM_CHAR" value= "1" enum= "OverrunBehavior" >
Trims the text per character.
</constant>
<constant name= "OVERRUN_TRIM_WORD" value= "2" enum= "OverrunBehavior" >
Trims the text per word.
</constant>
<constant name= "OVERRUN_TRIM_ELLIPSIS" value= "3" enum= "OverrunBehavior" >
Trims the text per character and adds an ellipsis to indicate that parts are hidden.
</constant>
<constant name= "OVERRUN_TRIM_WORD_ELLIPSIS" value= "4" enum= "OverrunBehavior" >
Trims the text per word and adds an ellipsis to indicate that parts are hidden.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_NO_TRIM" value= "0" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-07-04 16:43:55 +02:00
No trimming is performed.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_TRIM" value= "1" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-07-04 16:43:55 +02:00
Trims the text when it exceeds the given width.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_TRIM_WORD_ONLY" value= "2" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-07-04 16:43:55 +02:00
Trims the text per word instead of per grapheme.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_ADD_ELLIPSIS" value= "4" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-07-04 16:43:55 +02:00
Determines whether an ellipsis should be added at the end of the text.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_ENFORCE_ELLIPSIS" value= "8" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-07-04 16:43:55 +02:00
Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "OVERRUN_JUSTIFICATION_AWARE" value= "16" enum= "TextOverrunFlag" is_bitfield= "true" >
2021-08-27 23:19:51 +02:00
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_VALID" value= "1" enum= "GraphemeFlag" is_bitfield= "true" >
Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 07:03:58 +01:00
Grapheme is supported by the font, and can be drawn.
2021-08-27 23:19:51 +02:00
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_RTL" value= "2" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is part of right-to-left or bottom-to-top run.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_VIRTUAL" value= "4" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is not part of source text, it was added by justification process.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_SPACE" value= "8" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is whitespace.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_BREAK_HARD" value= "16" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is mandatory break point (e.g. [code]"\n"[/code]).
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_BREAK_SOFT" value= "32" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is optional break point (e.g. space).
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_TAB" value= "64" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is the tabulation character.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_ELONGATION" value= "128" enum= "GraphemeFlag" is_bitfield= "true" >
2020-08-12 13:49:10 +02:00
Grapheme is kashida.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_PUNCTUATION" value= "256" enum= "GraphemeFlag" is_bitfield= "true" >
2020-12-14 09:30:32 +01:00
Grapheme is punctuation character.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_UNDERSCORE" value= "512" enum= "GraphemeFlag" is_bitfield= "true" >
2021-09-21 11:27:06 +02:00
Grapheme is underscore character.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "GRAPHEME_IS_CONNECTED" value= "1024" enum= "GraphemeFlag" is_bitfield= "true" >
2021-09-21 11:27:06 +02:00
Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
</constant>
2022-08-04 07:16:56 +02:00
<constant name= "GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL" value= "2048" enum= "GraphemeFlag" is_bitfield= "true" >
It is safe to insert a U+0640 before this grapheme for elongation.
</constant>
2023-04-12 09:08:51 +02:00
<constant name= "GRAPHEME_IS_EMBEDDED_OBJECT" value= "4096" enum= "GraphemeFlag" is_bitfield= "true" >
Grapheme is an object replacement character for the embedded object.
</constant>
2020-08-12 13:49:10 +02:00
<constant name= "HINTING_NONE" value= "0" enum= "Hinting" >
Disables font hinting (smoother but less crisp).
</constant>
<constant name= "HINTING_LIGHT" value= "1" enum= "Hinting" >
Use the light font hinting mode.
</constant>
<constant name= "HINTING_NORMAL" value= "2" enum= "Hinting" >
Use the default font hinting mode (crisper but less smooth).
2022-09-14 10:05:09 +02:00
[b]Note:[/b] This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
2020-08-12 13:49:10 +02:00
</constant>
2022-01-10 09:13:22 +01:00
<constant name= "SUBPIXEL_POSITIONING_DISABLED" value= "0" enum= "SubpixelPositioning" >
Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
</constant>
<constant name= "SUBPIXEL_POSITIONING_AUTO" value= "1" enum= "SubpixelPositioning" >
Glyph horizontal position is rounded based on font size.
2022-02-13 13:41:29 +01:00
- To one quarter of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE].
- To one half of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE].
2022-01-10 09:13:22 +01:00
- To the whole pixel size for larger fonts.
</constant>
<constant name= "SUBPIXEL_POSITIONING_ONE_HALF" value= "2" enum= "SubpixelPositioning" >
Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
</constant>
<constant name= "SUBPIXEL_POSITIONING_ONE_QUARTER" value= "3" enum= "SubpixelPositioning" >
Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE" value= "20" enum= "SubpixelPositioning" >
2022-08-09 22:53:29 +02:00
Maximum font size which will use one half of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
2022-02-13 13:41:29 +01:00
</constant>
<constant name= "SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE" value= "16" enum= "SubpixelPositioning" >
2022-08-09 22:53:29 +02:00
Maximum font size which will use one quarter of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
2022-02-13 13:41:29 +01:00
</constant>
<constant name= "FEATURE_SIMPLE_LAYOUT" value= "1" enum= "Feature" >
TextServer supports simple text layouts.
</constant>
<constant name= "FEATURE_BIDI_LAYOUT" value= "2" enum= "Feature" >
TextServer supports bidirectional text layouts.
2020-08-12 13:49:10 +02:00
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_VERTICAL_LAYOUT" value= "4" enum= "Feature" >
2020-08-12 13:49:10 +02:00
TextServer supports vertical layouts.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_SHAPING" value= "8" enum= "Feature" >
2020-08-12 13:49:10 +02:00
TextServer supports complex text shaping.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_KASHIDA_JUSTIFICATION" value= "16" enum= "Feature" >
2020-08-12 13:49:10 +02:00
TextServer supports justification using kashidas.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_BREAK_ITERATORS" value= "32" enum= "Feature" >
2020-08-12 13:49:10 +02:00
TextServer supports complex line/word breaking rules (e.g. dictionary based).
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_FONT_BITMAP" value= "64" enum= "Feature" >
TextServer supports loading bitmap fonts.
</constant>
<constant name= "FEATURE_FONT_DYNAMIC" value= "128" enum= "Feature" >
TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
</constant>
<constant name= "FEATURE_FONT_MSDF" value= "256" enum= "Feature" >
TextServer supports multichannel signed distance field dynamic font rendering.
</constant>
<constant name= "FEATURE_FONT_SYSTEM" value= "512" enum= "Feature" >
2020-08-12 13:49:10 +02:00
TextServer supports loading system fonts.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_FONT_VARIABLE" value= "1024" enum= "Feature" >
2020-10-22 18:40:18 +02:00
TextServer supports variable fonts.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION" value= "2048" enum= "Feature" >
2022-01-17 09:54:45 +01:00
TextServer supports locale dependent and context sensitive case conversion.
</constant>
2022-02-13 13:41:29 +01:00
<constant name= "FEATURE_USE_SUPPORT_DATA" value= "4096" enum= "Feature" >
2021-10-18 14:07:11 +02:00
TextServer require external data file for some features, see [method load_support_data].
</constant>
<constant name= "FEATURE_UNICODE_IDENTIFIERS" value= "8192" enum= "Feature" >
TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].
2020-08-12 13:49:10 +02:00
</constant>
2021-11-12 09:12:37 +01:00
<constant name= "FEATURE_UNICODE_SECURITY" value= "16384" enum= "Feature" >
TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.
</constant>
2020-12-10 16:30:25 +01:00
<constant name= "CONTOUR_CURVE_TAG_ON" value= "1" enum= "ContourPointTag" >
Contour point is on the curve.
</constant>
<constant name= "CONTOUR_CURVE_TAG_OFF_CONIC" value= "0" enum= "ContourPointTag" >
Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
</constant>
<constant name= "CONTOUR_CURVE_TAG_OFF_CUBIC" value= "2" enum= "ContourPointTag" >
Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
</constant>
2020-12-27 14:30:33 +01:00
<constant name= "SPACING_GLYPH" value= "0" enum= "SpacingType" >
Spacing for each glyph.
</constant>
<constant name= "SPACING_SPACE" value= "1" enum= "SpacingType" >
Spacing for the space character.
</constant>
<constant name= "SPACING_TOP" value= "2" enum= "SpacingType" >
Spacing at the top of the line.
</constant>
<constant name= "SPACING_BOTTOM" value= "3" enum= "SpacingType" >
Spacing at the bottom of the line.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "SPACING_MAX" value= "4" enum= "SpacingType" >
</constant>
<constant name= "FONT_BOLD" value= "1" enum= "FontStyle" is_bitfield= "true" >
2021-10-26 08:40:11 +02:00
Font is bold.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "FONT_ITALIC" value= "2" enum= "FontStyle" is_bitfield= "true" >
2021-10-26 08:40:11 +02:00
Font is italic or oblique.
</constant>
2022-07-11 11:40:31 +02:00
<constant name= "FONT_FIXED_WIDTH" value= "4" enum= "FontStyle" is_bitfield= "true" >
2021-10-26 08:40:11 +02:00
Font have fixed-width characters.
</constant>
2022-04-19 12:27:18 +02:00
<constant name= "STRUCTURED_TEXT_DEFAULT" value= "0" enum= "StructuredTextParser" >
2023-01-18 08:33:35 +01:00
Use default Unicode BiDi algorithm.
2022-04-19 12:27:18 +02:00
</constant>
<constant name= "STRUCTURED_TEXT_URI" value= "1" enum= "StructuredTextParser" >
BiDi override for URI.
</constant>
<constant name= "STRUCTURED_TEXT_FILE" value= "2" enum= "StructuredTextParser" >
BiDi override for file path.
</constant>
<constant name= "STRUCTURED_TEXT_EMAIL" value= "3" enum= "StructuredTextParser" >
BiDi override for email.
</constant>
<constant name= "STRUCTURED_TEXT_LIST" value= "4" enum= "StructuredTextParser" >
2023-10-02 20:11:43 +02:00
BiDi override for lists. Structured text options: list separator [String].
2022-04-19 12:27:18 +02:00
</constant>
2023-01-18 08:33:35 +01:00
<constant name= "STRUCTURED_TEXT_GDSCRIPT" value= "5" enum= "StructuredTextParser" >
BiDi override for GDScript.
2022-04-19 12:27:18 +02:00
</constant>
<constant name= "STRUCTURED_TEXT_CUSTOM" value= "6" enum= "StructuredTextParser" >
User defined structured text BiDi override function.
</constant>
2023-08-14 09:42:49 +02:00
<constant name= "FIXED_SIZE_SCALE_DISABLE" value= "0" enum= "FixedSizeScaleMode" >
Bitmap font is not scaled.
</constant>
<constant name= "FIXED_SIZE_SCALE_INTEGER_ONLY" value= "1" enum= "FixedSizeScaleMode" >
Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
</constant>
<constant name= "FIXED_SIZE_SCALE_ENABLED" value= "2" enum= "FixedSizeScaleMode" >
Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
</constant>
2020-08-12 13:49:10 +02:00
</constants>
</class>