2021-08-28 05:19:51 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 21:18:53 +08:00
<class name= "TextServerExtension" inherits= "TextServer" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2021-08-28 05:19:51 +08:00
<brief_description >
Base class for TextServer custom implementations (plugins).
</brief_description>
<description >
External TextServer implementations should inherit from this class.
</description>
<tutorials >
</tutorials>
<methods >
2022-02-13 20:41:29 +08:00
<method name= "create_font" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "create_shaped_text" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "RID" />
<argument index= "0" name= "direction" type= "int" enum= "TextServer.Direction" />
<argument index= "1" name= "orientation" type= "int" enum= "TextServer.Orientation" />
<description >
2022-02-13 20:41:29 +08:00
Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "draw_hex_code_box" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "canvas" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "pos" type= "Vector2" />
<argument index= "3" name= "index" type= "int" />
<argument index= "4" name= "color" type= "Color" />
<description >
Draws box displaying character hexadecimal code. Used for replacing missing characters.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_clear_glyphs" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<description >
2021-10-05 20:24:34 +08:00
Removes all rendered glyphs information from the cache entry.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_clear_kerning_map" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Removes all kerning overrides.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_clear_size_cache" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Removes all font sizes from the cache entry.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_clear_textures" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<description >
2021-10-05 20:24:34 +08:00
Removes all textures from font cache entry.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_draw_glyph" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "canvas" type= "RID" />
<argument index= "2" name= "size" type= "int" />
<argument index= "3" name= "pos" type= "Vector2" />
<argument index= "4" name= "index" type= "int" />
<argument index= "5" name= "color" type= "Color" />
<description >
Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_draw_glyph_outline" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "canvas" type= "RID" />
<argument index= "2" name= "size" type= "int" />
<argument index= "3" name= "outline_size" type= "int" />
<argument index= "4" name= "pos" type= "Vector2" />
<argument index= "5" name= "index" type= "int" />
<argument index= "6" name= "color" type= "Color" />
<description >
Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_ascent" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_descent" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns the font descent (number of pixels below the baseline).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_embolden" qualifiers= "virtual const" >
2022-03-11 15:31:16 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font embolden strength.
</description>
</method>
2022-06-07 16:35:59 +08:00
<method name= "font_get_face_count" qualifiers= "virtual const" >
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
<method name= "font_get_face_index" qualifiers= "virtual const" >
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns an active face index in the TrueType / OpenType collection.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_fixed_size" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns bitmap font fixed size.
</description>
</method>
2022-04-19 18:27:18 +08:00
<method name= "font_get_generate_mipmaps" qualifiers= "virtual const" >
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_global_oversampling" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<description >
Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_advance" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "glyph" type= "int" />
<description >
2021-10-05 20:24:34 +08:00
Returns glyph advance (offset of the next glyph).
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_contours" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Dictionary" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "index" type= "int" />
<description >
Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
[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 TextServer.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>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_index" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "char" type= "int" />
<argument index= "3" name= "variation_selector" type= "int" />
<description >
Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_list" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Array" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<description >
Returns list of rendered glyphs in the cache entry.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_offset" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns glyph offset from the baseline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_size" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns size of the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_texture_idx" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns index of the cache texture containing the glyph.
</description>
</method>
2022-04-19 18:27:18 +08:00
<method name= "font_get_glyph_texture_rid" qualifiers= "virtual const" >
<return type= "RID" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns resource id of the cache texture containing the glyph.
</description>
</method>
<method name= "font_get_glyph_texture_size" qualifiers= "virtual const" >
<return type= "Vector2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns size of the cache texture containing the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_glyph_uv_rect" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Rect2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
Returns rectangle in the cache texture containing the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_hinting" qualifiers= "virtual const" >
2022-02-03 21:03:51 +08:00
<return type= "int" enum= "TextServer.Hinting" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns the font hinting mode. Used by dynamic fonts only.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_kerning" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "glyph_pair" type= "Vector2i" />
<description >
Returns kerning for the pair of glyphs.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_kerning_list" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Array" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns list of the kerning overrides.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_language_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "language" type= "String" />
<description >
Returns [code]true[/code] if support override is enabled for the [code]language[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_language_support_overrides" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "PackedStringArray" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns list of language support overrides.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_msdf_pixel_range" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns the width of the range around the shape between the minimum and maximum representable signed distance.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_msdf_size" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns source font size used to generate MSDF textures.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_name" qualifiers= "virtual const" >
2021-10-26 14:40:11 +08:00
<return type= "String" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font family name.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_opentype_feature_overrides" qualifiers= "virtual const" >
2021-11-19 05:36:22 +08:00
<return type= "Dictionary" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font OpenType feature set override.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_oversampling" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_scale" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns scaling factor of the color bitmap font.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_script_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "script" type= "String" />
<description >
Returns [code]true[/code] if support override is enabled for the [code]script[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_script_support_overrides" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "PackedStringArray" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns list of script support overrides.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_size_cache_list" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Array" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_style" qualifiers= "virtual const" >
2022-07-11 17:40:31 +08:00
<return type= "int" enum= "TextServer.FontStyle" />
2021-10-26 14:40:11 +08:00
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font style flags, see [enum TextServer.FontStyle].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_style_name" qualifiers= "virtual const" >
2021-10-26 14:40:11 +08:00
<return type= "String" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font style name.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_subpixel_positioning" qualifiers= "virtual const" >
2022-01-10 16:13:22 +08:00
<return type= "int" enum= "TextServer.SubpixelPositioning" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns font sub-pixel glyph positioning mode.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_supported_chars" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns a string containing all the characters available in the font.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_texture_count" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<description >
Returns number of textures used by font cache entry.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_texture_image" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Image" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "texture_index" type= "int" />
<description >
Returns font cache texture image data.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_texture_offsets" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "PackedInt32Array" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "texture_index" type= "int" />
<description >
Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_transform" qualifiers= "virtual const" >
2022-03-11 15:31:16 +08:00
<return type= "Transform2D" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
2022-03-31 20:06:10 +08:00
Returns 2D transform applied to the font outlines.
2022-03-11 15:31:16 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_underline_position" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns pixel offset of the underline below the baseline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_underline_thickness" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<description >
Returns thickness of the underline in pixels.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_get_variation_coordinates" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Dictionary" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_has_char" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "char" type= "int" />
<description >
2022-02-13 20:41:29 +08:00
Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_is_antialiased" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_is_force_autohinter" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<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 14:03:58 +08:00
Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_is_language_supported" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "language" type= "String" />
<description >
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_is_multichannel_signed_distance_field" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<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.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_is_script_supported" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "script" type= "String" />
<description >
Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_glyph" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<description >
2021-10-05 20:24:34 +08:00
Removes specified rendered glyph information from the cache entry.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_kerning" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "glyph_pair" type= "Vector2i" />
<description >
Removes kerning override for the pair of glyphs.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_language_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "language" type= "String" />
<description >
Remove language support override.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_script_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "script" type= "String" />
<description >
Removes script support override.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_size_cache" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<description >
Removes specified font size from the cache entry.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_remove_texture" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "texture_index" type= "int" />
<description >
2022-05-09 17:47:10 +08:00
Removes specified texture from the cache entry.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_render_glyph" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "index" type= "int" />
<description >
2022-02-13 20:41:29 +08:00
Renders specified glyph to the font cache texture.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_render_range" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "start" type= "int" />
<argument index= "3" name= "end" type= "int" />
<description >
Renders the range of characters to the font cache texture.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_antialiased" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "antialiased" type= "bool" />
<description >
If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_ascent" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "ascent" type= "float" />
<description >
Sets the font ascent (number of pixels above the baseline).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_data" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "data" type= "PackedByteArray" />
<description >
Sets font source data, e.g contents of the dynamic font source file.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_data_ptr" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "data_ptr" type= "const uint8_t*" />
<argument index= "2" name= "data_size" type= "int" />
<description >
2022-02-13 20:41:29 +08:00
Sets font source data, e.g contents of the dynamic font source file. [code]data_ptr[/code] memory buffer must remain accessible during font lifetime.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_descent" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "descent" type= "float" />
<description >
2022-02-13 20:41:29 +08:00
Sets the font descent (number of pixels below the baseline).
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_embolden" qualifiers= "virtual" >
2022-03-11 15:31:16 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "strength" type= "float" />
<description >
Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
2022-06-07 16:35:59 +08:00
<method name= "font_set_face_index" qualifiers= "virtual" >
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "face_index" type= "int" />
<description >
Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_fixed_size" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "fixed_size" type= "int" />
<description >
2022-02-13 20:41:29 +08:00
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_force_autohinter" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "force_autohinter" type= "bool" />
<description >
2022-02-10 19:00:11 +08:00
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-04-19 18:27:18 +08:00
<method name= "font_set_generate_mipmaps" qualifiers= "virtual" >
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "generate_mipmaps" type= "bool" />
<description >
If set to [code]true[/code] font texture mipmap generation is enabled.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_global_oversampling" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "oversampling" type= "float" />
<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 14:03:58 +08:00
[b]Note:[/b] This value can be automatically changed by display server.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_glyph_advance" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "glyph" type= "int" />
<argument index= "3" name= "advance" type= "Vector2" />
<description >
2021-10-05 20:24:34 +08:00
Sets glyph advance (offset of the next glyph).
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_glyph_offset" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<argument index= "3" name= "offset" type= "Vector2" />
<description >
Sets glyph offset from the baseline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_glyph_size" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<argument index= "3" name= "gl_size" type= "Vector2" />
<description >
Sets size of the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_glyph_texture_idx" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<argument index= "3" name= "texture_idx" type= "int" />
<description >
Sets index of the cache texture containing the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_glyph_uv_rect" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "glyph" type= "int" />
<argument index= "3" name= "uv_rect" type= "Rect2" />
<description >
Sets rectangle in the cache texture containing the glyph.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_hinting" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "hinting" type= "int" enum= "TextServer.Hinting" />
<description >
Sets font hinting mode. Used by dynamic fonts only.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_kerning" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "glyph_pair" type= "Vector2i" />
<argument index= "3" name= "kerning" type= "Vector2" />
<description >
Sets kerning for the pair of glyphs.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_language_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "language" type= "String" />
<argument index= "2" name= "supported" type= "bool" />
<description >
2022-02-13 20:41:29 +08:00
Adds override for [method font_is_language_supported].
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_msdf_pixel_range" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "msdf_pixel_range" type= "int" />
<description >
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_msdf_size" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "msdf_size" type= "int" />
<description >
Sets source font size used to generate MSDF textures.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_multichannel_signed_distance_field" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "msdf" type= "bool" />
<description >
2022-02-13 20:41:29 +08: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.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_name" qualifiers= "virtual" >
2021-10-26 14:40:11 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "name" type= "String" />
<description >
Sets the font family name.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_opentype_feature_overrides" qualifiers= "virtual" >
2021-11-19 05:36:22 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "overrides" type= "Dictionary" />
<description >
Sets font OpenType feature set override.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_oversampling" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "oversampling" type= "float" />
<description >
Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_scale" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "scale" type= "float" />
<description >
Sets scaling factor of the color bitmap font.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_script_support_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "script" type= "String" />
<argument index= "2" name= "supported" type= "bool" />
<description >
2022-02-13 20:41:29 +08:00
Adds override for [method font_is_script_supported].
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_style" qualifiers= "virtual" >
2021-10-26 14:40:11 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
2022-07-11 17:40:31 +08:00
<argument index= "1" name= "style" type= "int" enum= "TextServer.FontStyle" />
2021-10-26 14:40:11 +08:00
<description >
Sets the font style flags, see [enum TextServer.FontStyle].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_style_name" qualifiers= "virtual" >
2021-10-26 14:40:11 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "name_style" type= "String" />
<description >
Sets the font style name.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_subpixel_positioning" qualifiers= "virtual" >
2022-01-10 16:13:22 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "subpixel_positioning" type= "int" enum= "TextServer.SubpixelPositioning" />
<description >
Sets font sub-pixel glyph positioning mode.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_texture_image" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "texture_index" type= "int" />
<argument index= "3" name= "image" type= "Image" />
<description >
Sets font cache texture image data.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_texture_offsets" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "Vector2i" />
<argument index= "2" name= "texture_index" type= "int" />
<argument index= "3" name= "offset" type= "PackedInt32Array" />
<description >
Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_transform" qualifiers= "virtual" >
2022-03-11 15:31:16 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "transform" type= "Transform2D" />
<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>
2022-02-13 20:41:29 +08:00
<method name= "font_set_underline_position" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "underline_position" type= "float" />
<description >
Sets pixel offset of the underline below the baseline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_underline_thickness" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "size" type= "int" />
<argument index= "2" name= "underline_thickness" type= "float" />
<description >
Sets thickness of the underline in pixels.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_set_variation_coordinates" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "font_rid" type= "RID" />
<argument index= "1" name= "variation_coordinates" type= "Dictionary" />
<description >
2022-02-13 20:41:29 +08:00
Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_supported_feature_list" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Dictionary" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns the dictionary of the supported OpenType features.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "font_supported_variation_list" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Dictionary" />
<argument index= "0" name= "font_rid" type= "RID" />
<description >
Returns the dictionary of the supported OpenType variation coordinates.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "format_number" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<argument index= "0" name= "string" type= "String" />
<argument index= "1" name= "language" type= "String" />
<description >
Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "free_rid" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "rid" type= "RID" />
<description >
Frees an object created by this [TextServer].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "get_features" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<description >
Returns text server features, see [enum TextServer.Feature].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "get_hex_code_box_size" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "size" type= "int" />
<argument index= "1" name= "index" type= "int" />
<description >
Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "get_name" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<description >
Returns the name of the server interface.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "get_support_data_filename" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<description >
Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "get_support_data_info" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<description >
Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "has" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "rid" type= "RID" />
<description >
Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "has_feature" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "feature" type= "int" enum= "TextServer.Feature" />
<description >
Returns [code]true[/code] if the server supports a feature.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "is_locale_right_to_left" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "locale" type= "String" />
<description >
Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "load_support_data" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "filename" type= "String" />
<description >
Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "name_to_tag" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "name" type= "String" />
<description >
Converts readable feature, variation, script or language name to OpenType tag.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "parse_number" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<argument index= "0" name= "string" type= "String" />
<argument index= "1" name= "language" type= "String" />
<description >
Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
</description>
</method>
2022-04-19 18:27:18 +08:00
<method name= "parse_structured_text" qualifiers= "virtual const" >
<return type= "Array" />
<argument index= "0" name= "parser_type" type= "int" enum= "TextServer.StructuredTextParser" />
<argument index= "1" name= "args" type= "Array" />
<argument index= "2" name= "text" type= "String" />
<description >
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "percent_sign" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<argument index= "0" name= "language" type= "String" />
<description >
Returns percent sign used in the [code]language[/code].
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "save_support_data" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "filename" type= "String" />
<description >
Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
2021-10-05 20:24:34 +08:00
[b]Note:[/b] This function is used by during project export, to include TextServer database.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_get_span_count" qualifiers= "virtual const" >
2022-01-20 15:30:42 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
2022-01-20 15:30:42 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_get_span_meta" qualifiers= "virtual const" >
2022-01-20 15:30:42 +08:00
<return type= "Variant" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "index" type= "int" />
<description >
Returns text span metadata.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_set_span_update_font" qualifiers= "virtual" >
2022-01-20 15:30:42 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "index" type= "int" />
<argument index= "2" name= "fonts" type= "Array" />
<argument index= "3" name= "size" type= "int" />
<argument index= "4" name= "opentype_features" type= "Dictionary" />
<description >
Changes text span font, font size and OpenType features, without changing the text.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_add_object" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "key" type= "Variant" />
<argument index= "2" name= "size" type= "Vector2" />
2021-11-25 10:58:47 +08:00
<argument index= "3" name= "inline_align" type= "int" enum= "InlineAlignment" />
2021-08-28 05:19:51 +08:00
<argument index= "4" name= "length" type= "int" />
<description >
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_add_string" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "text" type= "String" />
<argument index= "2" name= "fonts" type= "Array" />
<argument index= "3" name= "size" type= "int" />
<argument index= "4" name= "opentype_features" type= "Dictionary" />
<argument index= "5" name= "language" type= "String" />
2022-01-20 15:30:42 +08:00
<argument index= "6" name= "meta" type= "Variant" />
2021-08-28 05:19:51 +08:00
<description >
Adds text span and font to draw it to the text buffer.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_clear" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Clears text buffer (removes text and inline objects).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_draw" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "canvas" type= "RID" />
<argument index= "2" name= "pos" type= "Vector2" />
<argument index= "3" name= "clip_l" type= "float" />
<argument index= "4" name= "clip_r" type= "float" />
<argument index= "5" name= "color" type= "Color" />
<description >
Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_draw_outline" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "canvas" type= "RID" />
<argument index= "2" name= "pos" type= "Vector2" />
<argument index= "3" name= "clip_l" type= "float" />
<argument index= "4" name= "clip_r" type= "float" />
<argument index= "5" name= "outline_size" type= "int" />
<argument index= "6" name= "color" type= "Color" />
<description >
Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_fit_to_width" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "width" type= "float" />
2022-07-11 17:40:31 +08:00
<argument index= "2" name= "jst_flags" type= "int" enum= "TextServer.JustificationFlag" />
2021-08-28 05:19:51 +08:00
<description >
2022-02-13 20:41:29 +08:00
Adjusts text with to fit to specified width, returns new text width.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_ascent" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_carets" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "position" type= "int" />
<argument index= "2" name= "caret" type= "CaretInfo*" />
<description >
Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_custom_punctuation" qualifiers= "virtual const" >
2021-03-06 17:52:16 +08:00
<return type= "String" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_descent" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_direction" qualifiers= "virtual const" >
2022-02-03 21:03:51 +08:00
<return type= "int" enum= "TextServer.Direction" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns direction of the text.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_dominant_direction_in_range" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "start" type= "int" />
<argument index= "2" name= "end" type= "int" />
<description >
Returns dominant direction of in the range of text.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_ellipsis_glyph_count" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns number of glyphs in the ellipsis.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_ellipsis_glyphs" qualifiers= "virtual const" >
<return type= "const Glyph*" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns array of the glyphs in the ellipsis.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_ellipsis_pos" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns position of the ellipsis.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_glyph_count" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns number of glyphs in the buffer.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_glyphs" qualifiers= "virtual const" >
<return type= "const Glyph*" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns an array of glyphs in the visual order.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_grapheme_bounds" qualifiers= "virtual const" >
2021-11-18 23:55:43 +08:00
<return type= "Vector2" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "pos" type= "int" />
<description >
Returns composite character's bounds as offsets from the start of the line.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-11-18 23:55:43 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_inferred_direction" qualifiers= "virtual const" >
2022-02-03 21:03:51 +08:00
<return type= "int" enum= "TextServer.Direction" />
2022-01-10 23:24:03 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns direction of the text, inferred by the BiDi algorithm.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_line_breaks" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "PackedInt32Array" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "width" type= "float" />
<argument index= "2" name= "start" type= "int" />
2022-07-11 17:40:31 +08:00
<argument index= "3" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" />
2021-08-28 05:19:51 +08:00
<description >
Breaks text to the lines and returns character ranges for each line.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_line_breaks_adv" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "PackedInt32Array" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "width" type= "PackedFloat32Array" />
<argument index= "2" name= "start" type= "int" />
<argument index= "3" name= "once" type= "bool" />
2022-07-11 17:40:31 +08:00
<argument index= "4" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" />
2021-08-28 05:19:51 +08:00
<description >
Breaks text to the lines and columns. Returns character ranges for each segment.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_object_rect" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Rect2" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "key" type= "Variant" />
<description >
Returns bounding rectangle of the inline object.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_objects" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Array" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns array of inline objects.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_orientation" qualifiers= "virtual const" >
2022-02-03 21:03:51 +08:00
<return type= "int" enum= "TextServer.Orientation" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
eturns text orientation.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_parent" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "RID" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns the parent buffer from which the substring originates.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_preserve_control" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns [code]true[/code] if text buffer is configured to display control characters.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_preserve_invalid" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
2021-10-05 20:24:34 +08:00
[b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_range" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2i" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns substring buffer character range in the parent buffer.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_selection" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "PackedVector2Array" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "start" type= "int" />
<argument index= "2" name= "end" type= "int" />
<description >
Returns selection rectangles for the specified character range.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_size" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "Vector2" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns size of the text.
</description>
</method>
2022-05-09 17:47:10 +08:00
<method name= "shaped_text_get_spacing" qualifiers= "virtual const" >
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<description >
Returns extra spacing added between glyphs or lines in pixels.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_trim_pos" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns the position of the overrun trim.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_underline_position" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns pixel offset of the underline below the baseline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_underline_thickness" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns thickness of the underline.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_width" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns width (for horizontal layout) or height (for vertical) of the text.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_get_word_breaks" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "PackedInt32Array" />
<argument index= "0" name= "shaped" type= "RID" />
2022-07-11 17:40:31 +08:00
<argument index= "1" name= "grapheme_flags" type= "int" enum= "TextServer.GraphemeFlag" />
2021-08-28 05:19:51 +08:00
<description >
Breaks text into words and returns array of character ranges.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_hit_test_grapheme" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "coord" type= "float" />
<description >
Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_hit_test_position" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "coord" type= "float" />
<description >
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_is_ready" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Returns [code]true[/code] if buffer is successfully shaped.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_next_grapheme_pos" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "pos" type= "int" />
<description >
Returns composite character end position closest to the [code]pos[/code].
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_overrun_trim_to_width" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "width" type= "float" />
2022-07-11 17:40:31 +08:00
<argument index= "2" name= "trim_flags" type= "int" enum= "TextServer.TextOverrunFlag" />
2021-08-28 05:19:51 +08:00
<description >
Trims text if it exceeds the given width.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_prev_grapheme_pos" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "int" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "pos" type= "int" />
<description >
Returns composite character start position closest to the [code]pos[/code].
2022-02-13 20:41:29 +08:00
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_resize_object" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "key" type= "Variant" />
<argument index= "2" name= "size" type= "Vector2" />
2021-11-25 10:58:47 +08:00
<argument index= "3" name= "inline_align" type= "int" enum= "InlineAlignment" />
2021-08-28 05:19:51 +08:00
<description >
Sets new size and alignment of embedded object.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_bidi_override" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "override" type= "Array" />
<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>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_custom_punctuation" qualifiers= "virtual" >
2021-03-06 17:52:16 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "punct" type= "String" />
<description >
Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_direction" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "direction" type= "int" enum= "TextServer.Direction" />
<description >
Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_orientation" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "orientation" type= "int" enum= "TextServer.Orientation" />
<description >
Sets desired text orientation.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_preserve_control" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "enabled" type= "bool" />
<description >
If set to [code]true[/code] text buffer will display control characters.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_set_preserve_invalid" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "enabled" type= "bool" />
<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 17:47:10 +08:00
<method name= "shaped_text_set_spacing" qualifiers= "virtual" >
<return type= "void" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<argument index= "2" name= "value" type= "int" />
<description >
Sets extra spacing added between glyphs or lines in pixels.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_shape" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_sort_logical" qualifiers= "virtual" >
<return type= "const Glyph*" />
2021-08-28 05:19:51 +08:00
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Returns text glyphs in the logical order.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_substr" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "RID" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "start" type= "int" />
<argument index= "2" name= "length" type= "int" />
<description >
Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects).
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_tab_align" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "float" />
<argument index= "0" name= "shaped" type= "RID" />
<argument index= "1" name= "tab_stops" type= "PackedFloat32Array" />
<description >
Aligns shaped text to the given tab-stops.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_update_breaks" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Updates line breaking positions in the text buffer.
[b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
2021-08-28 05:19:51 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "shaped_text_update_justification_ops" qualifiers= "virtual" >
2021-08-28 05:19:51 +08:00
<return type= "bool" />
<argument index= "0" name= "shaped" type= "RID" />
<description >
2022-02-13 20:41:29 +08:00
Updates line justification positions (word breaks and elongations) in the text buffer.
[b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
2021-08-28 05:19:51 +08:00
</description>
</method>
2021-11-04 20:33:37 +08:00
<method name= "string_get_word_breaks" qualifiers= "virtual const" >
<return type= "PackedInt32Array" />
<argument index= "0" name= "string" type= "String" />
<argument index= "1" name= "language" type= "String" />
<description >
Returns array of the word break character offsets.
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "string_to_lower" qualifiers= "virtual const" >
2022-01-17 16:54:45 +08:00
<return type= "String" />
<argument index= "0" name= "string" type= "String" />
<argument index= "1" name= "language" type= "String" />
<description >
2022-02-13 20:41:29 +08:00
Returns the string converted to lowercase.
2022-01-17 16:54:45 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "string_to_upper" qualifiers= "virtual const" >
2022-01-17 16:54:45 +08:00
<return type= "String" />
<argument index= "0" name= "string" type= "String" />
<argument index= "1" name= "language" type= "String" />
<description >
2022-02-13 20:41:29 +08:00
Returns the string converted to uppercase.
</description>
</method>
<method name= "strip_diacritics" qualifiers= "virtual const" >
<return type= "String" />
<argument index= "0" name= "string" type= "String" />
<description >
Strips diacritics from the string.
[b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
2022-01-17 16:54:45 +08:00
</description>
</method>
2022-02-13 20:41:29 +08:00
<method name= "tag_to_name" qualifiers= "virtual const" >
2021-08-28 05:19:51 +08:00
<return type= "String" />
<argument index= "0" name= "tag" type= "int" />
<description >
Converts OpenType tag to readable feature, variation, script or language name.
</description>
</method>
</methods>
</class>