2021-08-27 23:19:51 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "TextServerExtension" inherits= "TextServer" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2021-08-27 23:19:51 +02:00
<brief_description >
2023-04-30 16:26:09 +02:00
Base class for custom [TextServer] implementations (plugins).
2021-08-27 23:19:51 +02:00
</brief_description>
<description >
2023-04-30 16:26:09 +02:00
External [TextServer] implementations should inherit from this class.
2021-08-27 23:19:51 +02:00
</description>
<tutorials >
</tutorials>
<methods >
2022-11-21 14:04:01 +01:00
<method name= "_cleanup" qualifiers= "virtual" >
<return type= "void" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
This method is called before text server is unregistered.
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_create_font" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Creates a new, empty font cache entry resource.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-09-28 09:45:09 +02:00
<method name= "_create_font_linked_variation" qualifiers= "virtual" >
<return type= "RID" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
Optional, implement if font supports extra spacing or baseline offset.
Creates a new variation existing font which is reusing the same glyph cache and font data.
2023-09-28 09:45:09 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_create_shaped_text" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "direction" type= "int" enum= "TextServer.Direction" />
<param index= "1" name= "orientation" type= "int" enum= "TextServer.Orientation" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Creates a new buffer for complex text layout, with the given [param direction] and [param orientation].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_draw_hex_code_box" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Draws box displaying character hexadecimal code.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_clear_glyphs" qualifiers= "virtual" >
2021-08-27 23:19:51 +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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes all rendered glyph information from the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_clear_kerning_map" qualifiers= "virtual" >
2021-08-27 23:19:51 +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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Removes all kerning overrides.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_clear_size_cache" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes all font sizes from the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_clear_textures" qualifiers= "virtual" >
2021-08-27 23:19:51 +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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes all textures from font cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_draw_glyph" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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= "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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_draw_glyph_outline" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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= "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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
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-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_antialiasing" qualifiers= "virtual const" >
2022-08-12 13:03:28 +02:00
<return type= "int" enum= "TextServer.FontAntialiasing" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font anti-aliasing mode.
2022-08-12 13:03:28 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_ascent" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the font ascent (number of pixels above the baseline).
2021-08-27 23:19:51 +02:00
</description>
</method>
2024-01-28 11:34:56 +01:00
<method name= "_font_get_baseline_offset" qualifiers= "virtual const" >
<return type= "float" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns extra baseline offset (as a fraction of font height).
2024-01-28 11:34:56 +01:00
</description>
</method>
2023-02-27 15:21:28 +01:00
<method name= "_font_get_char_from_glyph_index" qualifiers= "virtual 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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns character code associated with [param glyph_index], or [code]0[/code] if [param glyph_index] is invalid.
2023-02-27 15:21:28 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_descent" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the font descent (number of pixels below the baseline).
2021-08-27 23:19:51 +02:00
</description>
</method>
2024-03-11 12:42:16 +01:00
<method name= "_font_get_disable_embedded_bitmaps" qualifiers= "virtual const" >
<return type= "bool" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns whether the font's embedded bitmap loading is disabled.
2024-03-11 12:42:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_embolden" qualifiers= "virtual const" >
2022-03-11 08:31:16 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font embolden strength.
2022-03-11 08:31:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_face_count" qualifiers= "virtual const" >
2022-06-07 10:35:59 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns number of faces in the TrueType / OpenType collection.
2022-06-07 10:35:59 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_face_index" qualifiers= "virtual const" >
2022-06-07 10:35:59 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns an active face index in the TrueType / OpenType collection.
2022-06-07 10:35:59 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_fixed_size" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns bitmap font fixed size.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-14 09:42:49 +02:00
<method name= "_font_get_fixed_size_scale_mode" qualifiers= "virtual const" >
<return type= "int" enum= "TextServer.FixedSizeScaleMode" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns bitmap font scaling mode.
2023-08-14 09:42:49 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_generate_mipmaps" qualifiers= "virtual const" >
2022-04-19 12:27:18 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if font texture mipmap generation is enabled.
2022-04-19 12:27:18 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_global_oversampling" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the font oversampling factor, shared by all fonts in the TextServer.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_advance" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns glyph advance (offset of the next glyph).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_contours" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Dictionary" />
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= "index" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns outline contours of the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_index" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the glyph index of a [param char], optionally modified by the [param variation_selector].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_list" qualifiers= "virtual 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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns list of rendered glyphs in the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_offset" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns glyph offset from the baseline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_size" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns size of the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_texture_idx" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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= "Vector2i" />
<param index= "2" name= "glyph" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns index of the cache texture containing the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_texture_rid" qualifiers= "virtual const" >
2022-04-19 12:27:18 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns resource ID of the cache texture containing the glyph.
2022-04-19 12:27:18 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_texture_size" qualifiers= "virtual const" >
2022-04-19 12:27:18 +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" />
2022-04-19 12:27:18 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns size of the cache texture containing the glyph.
2022-04-19 12:27:18 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_glyph_uv_rect" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns rectangle in the cache texture containing the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_hinting" qualifiers= "virtual const" >
2022-02-03 14:03:51 +01:00
<return type= "int" enum= "TextServer.Hinting" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the font hinting mode. Used by dynamic fonts only.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_kerning" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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_pair" type= "Vector2i" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns kerning for the pair of glyphs.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_kerning_list" qualifiers= "virtual 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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns list of the kerning overrides.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_language_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if support override is enabled for the [param language].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_language_support_overrides" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "PackedStringArray" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns list of language support overrides.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_msdf_pixel_range" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the width of the range around the shape between the minimum and maximum representable signed distance.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_msdf_size" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns source font size used to generate MSDF textures.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_name" qualifiers= "virtual const" >
2021-10-26 08:40:11 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font family name.
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_opentype_feature_overrides" qualifiers= "virtual const" >
2021-11-18 22:36:22 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font OpenType feature set override.
2021-11-18 22:36:22 +01:00
</description>
</method>
2023-04-05 11:49:38 +02:00
<method name= "_font_get_ot_name_strings" qualifiers= "virtual const" >
<return type= "Dictionary" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
2023-04-05 11:49:38 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_oversampling" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_scale" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns scaling factor of the color bitmap font.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_script_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if support override is enabled for the [param script].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_script_support_overrides" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "PackedStringArray" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns list of script support overrides.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_size_cache_list" qualifiers= "virtual 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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-24 10:56:50 +02:00
<method name= "_font_get_spacing" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "spacing" type= "int" enum= "TextServer.SpacingType" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the spacing for [param spacing] (see [enum TextServer.SpacingType]) in pixels (not relative to the font size).
2023-08-24 10:56:50 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_get_stretch" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_style" qualifiers= "virtual 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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font style flags, see [enum TextServer.FontStyle].
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_style_name" qualifiers= "virtual const" >
2021-10-26 08:40:11 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font style name.
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_subpixel_positioning" qualifiers= "virtual const" >
2022-01-10 09:13:22 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns font subpixel glyph positioning mode.
2022-01-10 09:13:22 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_supported_chars" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns a string containing all the characters available in the font.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_texture_count" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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= "Vector2i" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns number of textures used by font cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_texture_image" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns font cache texture image data.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_texture_offsets" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
<param index= "2" name= "texture_index" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns array containing glyph packing data.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_transform" qualifiers= "virtual const" >
2022-03-11 08:31:16 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns 2D transform applied to the font outlines.
2022-03-11 08:31:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_underline_position" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns pixel offset of the underline below the baseline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_underline_thickness" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns thickness of the underline in pixels.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_get_variation_coordinates" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns variation coordinates for the specified font cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_get_weight" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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].
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_has_char" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns [code]true[/code] if a Unicode [param char] is available in the font.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_is_allow_system_fallback" qualifiers= "virtual const" >
<return type= "bool" />
<param index= "0" name= "font_rid" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_is_force_autohinter" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_is_language_supported" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_is_multichannel_signed_distance_field" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_is_script_supported" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code], if font supports given script (ISO 15924 code).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_glyph" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes specified rendered glyph information from the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_kerning" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph_pair" type= "Vector2i" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Removes kerning override for the pair of glyphs.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_language_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Remove language support override.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_script_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Removes script support override.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_size_cache" qualifiers= "virtual" >
2021-08-27 23:19:51 +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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes specified font size from the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_remove_texture" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Removes specified texture from the cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_render_glyph" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "index" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Renders specified glyph to the font cache texture.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_render_range" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "start" type= "int" />
<param index= "3" name= "end" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Renders the range of characters to the font cache texture.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_set_allow_system_fallback" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "allow_system_fallback" type= "bool" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code], system fonts can be automatically used as fallbacks.
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_antialiasing" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font anti-aliasing mode.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_ascent" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2024-01-28 11:34:56 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets the font ascent (number of pixels above the baseline).
2024-01-28 11:34:56 +01:00
</description>
</method>
<method name= "_font_set_baseline_offset" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "baseline_offset" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets extra baseline offset (as a fraction of font height).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_data" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "data" type= "PackedByteArray" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font source data, e.g contents of the dynamic font source file.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_data_ptr" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "data_ptr" type= "const uint8_t*" />
<param index= "2" name= "data_size" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets pointer to the font source data, e.g contents of the dynamic font source file.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_descent" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "descent" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets the font descent (number of pixels below the baseline).
2021-08-27 23:19:51 +02:00
</description>
</method>
2024-03-11 12:42:16 +01:00
<method name= "_font_set_disable_embedded_bitmaps" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "disable_embedded_bitmaps" type= "bool" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code], embedded font bitmap loading is disabled.
2024-03-11 12:42:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_embolden" qualifiers= "virtual" >
2022-03-11 08:31:16 +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= "strength" type= "float" />
2022-03-11 08:31:16 +01:00
<description >
2024-02-22 11:10:37 +01: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-09-27 10:23:34 +02:00
<method name= "_font_set_face_index" qualifiers= "virtual" >
2022-06-07 10:35:59 +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= "face_index" type= "int" />
2022-06-07 10:35:59 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets an active face index in the TrueType / OpenType collection.
2022-06-07 10:35:59 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_fixed_size" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "fixed_size" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-14 09:42:49 +02:00
<method name= "_font_set_fixed_size_scale_mode" qualifiers= "virtual" >
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets bitmap font scaling mode. This property is used only if [code]fixed_size[/code] is greater than zero.
2023-08-14 09:42:49 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_force_autohinter" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_generate_mipmaps" qualifiers= "virtual" >
2022-04-19 12:27:18 +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= "generate_mipmaps" type= "bool" />
2022-04-19 12:27:18 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code] font texture mipmap generation is enabled.
2022-04-19 12:27:18 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_global_oversampling" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "oversampling" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets oversampling factor, shared by all font in the TextServer.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_glyph_advance" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
<param index= "3" name= "advance" type= "Vector2" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets glyph advance (offset of the next glyph).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_glyph_offset" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
<param index= "3" name= "offset" type= "Vector2" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets glyph offset from the baseline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_glyph_size" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
<param index= "3" name= "gl_size" type= "Vector2" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets size of the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_glyph_texture_idx" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
<param index= "3" name= "texture_idx" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets index of the cache texture containing the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_glyph_uv_rect" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph" type= "int" />
<param index= "3" name= "uv_rect" type= "Rect2" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets rectangle in the cache texture containing the glyph.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_hinting" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font hinting mode. Used by dynamic fonts only.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_kerning" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "glyph_pair" type= "Vector2i" />
<param index= "3" name= "kerning" type= "Vector2" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets kerning for the pair of glyphs.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_language_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Adds override for [method _font_is_language_supported].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_msdf_pixel_range" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "msdf_pixel_range" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_msdf_size" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "msdf_size" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets source font size used to generate MSDF textures.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_multichannel_signed_distance_field" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "msdf" type= "bool" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_name" qualifiers= "virtual" >
2021-10-26 08:40:11 +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= "name" type= "String" />
2021-10-26 08:40:11 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets the font family name.
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_opentype_feature_overrides" qualifiers= "virtual" >
2021-11-18 22:36:22 +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= "overrides" type= "Dictionary" />
2021-11-18 22:36:22 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font OpenType feature set override.
2021-11-18 22:36:22 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_oversampling" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_scale" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "scale" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets scaling factor of the color bitmap font.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_script_support_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Adds override for [method _font_is_script_supported].
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-24 10:56:50 +02:00
<method name= "_font_set_spacing" qualifiers= "virtual" >
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size).
2023-08-24 10:56:50 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_set_stretch" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "stretch" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_style" qualifiers= "virtual" >
2021-10-26 08:40:11 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets the font style flags, see [enum TextServer.FontStyle].
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_style_name" qualifiers= "virtual" >
2021-10-26 08:40:11 +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= "name_style" type= "String" />
2021-10-26 08:40:11 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets the font style name.
2021-10-26 08:40:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_subpixel_positioning" qualifiers= "virtual" >
2022-01-10 09:13:22 +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= "subpixel_positioning" type= "int" enum= "TextServer.SubpixelPositioning" />
2022-01-10 09:13:22 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets font subpixel glyph positioning mode.
2022-01-10 09:13:22 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_texture_image" qualifiers= "virtual" >
2021-08-27 23:19:51 +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-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets font cache texture image data.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_texture_offsets" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets array containing glyph packing data.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_transform" qualifiers= "virtual" >
2022-03-11 08:31:16 +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= "transform" type= "Transform2D" />
2022-03-11 08:31:16 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
2022-03-11 08:31:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_underline_position" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "underline_position" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets pixel offset of the underline below the baseline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_underline_thickness" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "underline_thickness" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets thickness of the underline in pixels.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_set_variation_coordinates" qualifiers= "virtual" >
2021-08-27 23:19:51 +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= "variation_coordinates" type= "Dictionary" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets variation coordinates for the specified font cache entry.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-11-21 14:04:01 +01:00
<method name= "_font_set_weight" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "font_rid" type= "RID" />
<param index= "1" name= "weight" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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].
2022-11-21 14:04:01 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_supported_feature_list" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the dictionary of the supported OpenType features.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_font_supported_variation_list" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Dictionary" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "font_rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the dictionary of the supported OpenType variation coordinates.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_format_number" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
2024-02-22 11:10:37 +01:00
<param index= "0" name= "number" type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "1" name= "language" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_free_rid" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Frees an object created by this [TextServer].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_get_features" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns text server features, see [enum TextServer.Feature].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_get_hex_code_box_size" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_get_name" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the name of the server interface.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_get_support_data_filename" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_get_support_data_info" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_has" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "rid" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_has_feature" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "feature" type= "int" enum= "TextServer.Feature" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns [code]true[/code] if the server supports a feature.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_is_confusable" qualifiers= "virtual const" >
2021-11-12 09:12:37 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_is_locale_right_to_left" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "locale" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns [code]true[/code] if locale is right-to-left.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_is_valid_identifier" qualifiers= "virtual const" >
2021-10-18 14:07:11 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if [param string] is a valid identifier.
2021-10-18 14:07:11 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_load_support_data" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_name_to_tag" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "name" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Converts readable feature, variation, script, or language name to OpenType tag.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_parse_number" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
2024-02-22 11:10:37 +01:00
<param index= "0" name= "number" type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "1" name= "language" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_parse_structured_text" qualifiers= "virtual 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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Default implementation of the BiDi algorithm override function. See [enum TextServer.StructuredTextParser] for more info.
2022-04-19 12:27:18 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_percent_sign" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "language" type= "String" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns percent sign used in the [param language].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_save_support_data" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_get_span_count" qualifiers= "virtual const" >
2022-01-20 08:30:42 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns number of text spans added using [method _shaped_text_add_string] or [method _shaped_text_add_object].
2022-01-20 08:30:42 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_get_span_meta" qualifiers= "virtual const" >
2022-01-20 08:30:42 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns text span metadata.
2022-01-20 08:30:42 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_set_span_update_font" qualifiers= "virtual" >
2022-01-20 08:30:42 +01:00
<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" />
2022-01-20 08:30:42 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Changes text span font, font size, and OpenType features, without changing the text.
2022-01-20 08:30:42 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_add_object" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
<param index= "4" name= "length" type= "int" />
2022-12-08 21:01:07 +01:00
<param index= "5" name= "baseline" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_add_string" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
<param index= "5" name= "language" type= "String" />
<param index= "6" name= "meta" type= "Variant" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Adds text span and font to draw it to the text buffer.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_clear" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Clears text buffer (removes text and inline objects).
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "_shaped_text_closest_character_pos" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns composite character position closest to the [param pos].
2023-08-15 10:42:40 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_draw" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
<param index= "4" name= "clip_r" type= "float" />
<param index= "5" name= "color" type= "Color" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_draw_outline" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
<param index= "4" name= "clip_r" type= "float" />
<param index= "5" name= "outline_size" type= "int" />
<param index= "6" name= "color" type= "Color" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_fit_to_width" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Adjusts text width to fit to specified width, returns new text width.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_ascent" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_carets" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "position" type= "int" />
<param index= "2" name= "caret" type= "CaretInfo*" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "_shaped_text_get_character_breaks" qualifiers= "virtual const" >
<return type= "PackedInt32Array" />
<param index= "0" name= "shaped" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns array of the composite character boundaries.
2023-08-15 10:42:40 +02:00
</description>
</method>
2023-10-01 12:39:13 +02:00
<method name= "_shaped_text_get_custom_ellipsis" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns ellipsis character used for text clipping.
2023-10-01 12:39:13 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_custom_punctuation" qualifiers= "virtual const" >
2021-03-06 10:52:16 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
2021-03-06 10:52:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_descent" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_direction" qualifiers= "virtual const" >
2022-02-03 14:03:51 +01:00
<return type= "int" enum= "TextServer.Direction" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns direction of the text.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_dominant_direction_in_range" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns dominant direction of in the range of text.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_ellipsis_glyph_count" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns number of glyphs in the ellipsis.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_ellipsis_glyphs" qualifiers= "virtual const" >
2022-02-13 13:41:29 +01:00
<return type= "const Glyph*" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns array of the glyphs in the ellipsis.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_ellipsis_pos" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns position of the ellipsis.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_glyph_count" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns number of glyphs in the buffer.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_glyphs" qualifiers= "virtual const" >
2022-02-13 13:41:29 +01:00
<return type= "const Glyph*" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns an array of glyphs in the visual order.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_grapheme_bounds" qualifiers= "virtual const" >
2021-11-18 16:55:43 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns composite character's bounds as offsets from the start of the line.
2021-11-18 16:55:43 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_inferred_direction" qualifiers= "virtual const" >
2022-02-03 14:03:51 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns direction of the text, inferred by the BiDi algorithm.
2022-01-10 16:24:03 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_line_breaks" qualifiers= "virtual 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" />
2023-06-15 16:06:22 +02:00
<param index= "3" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" is_bitfield= "true" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Breaks text to the lines and returns character ranges for each line.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_line_breaks_adv" qualifiers= "virtual 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" />
<param index= "3" name= "once" type= "bool" />
2023-06-15 16:06:22 +02:00
<param index= "4" name= "break_flags" type= "int" enum= "TextServer.LineBreakFlag" is_bitfield= "true" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Breaks text to the lines and columns. Returns character ranges for each segment.
2021-08-27 23:19:51 +02:00
</description>
</method>
2024-03-11 15:28:58 +01:00
<method name= "_shaped_text_get_object_glyph" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "key" type= "Variant" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the glyph index of the inline object.
2024-03-11 15:28:58 +01:00
</description>
</method>
<method name= "_shaped_text_get_object_range" qualifiers= "virtual const" >
<return type= "Vector2i" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "key" type= "Variant" />
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the character range of the inline object.
2024-03-11 15:28:58 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_object_rect" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns bounding rectangle of the inline object.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_objects" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns array of inline objects.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_orientation" qualifiers= "virtual const" >
2022-02-03 14:03:51 +01:00
<return type= "int" enum= "TextServer.Orientation" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns text orientation.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_parent" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "RID" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the parent buffer from which the substring originates.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_preserve_control" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if text buffer is configured to display control characters.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_preserve_invalid" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_range" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Vector2i" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns substring buffer character range in the parent buffer.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_selection" qualifiers= "virtual 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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns selection rectangles for the specified character range.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_size" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns size of the text.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_spacing" qualifiers= "virtual const" >
2022-05-09 11:47:10 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns extra spacing added between glyphs or lines in pixels.
2022-05-09 11:47:10 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_trim_pos" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns the position of the overrun trim.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_underline_position" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns pixel offset of the underline below the baseline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_underline_thickness" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns thickness of the underline.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_width" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns width (for horizontal layout) or height (for vertical) of the text.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_get_word_breaks" qualifiers= "virtual 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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum TextServer.GraphemeFlag]).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_hit_test_grapheme" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "coord" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_hit_test_position" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "coord" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_is_ready" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns [code]true[/code] if buffer is successfully shaped.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "_shaped_text_next_character_pos" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns composite character end position closest to the [param pos].
2023-08-15 10:42:40 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_next_grapheme_pos" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns grapheme end position closest to the [param pos].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_overrun_trim_to_width" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2023-06-15 16:06:22 +02:00
<param index= "2" name= "trim_flags" type= "int" enum= "TextServer.TextOverrunFlag" is_bitfield= "true" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Trims text if it exceeds the given width.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "_shaped_text_prev_character_pos" qualifiers= "virtual const" >
<return type= "int" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "pos" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns composite character start position closest to the [param pos].
2023-08-15 10:42:40 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_prev_grapheme_pos" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns grapheme start position closest to the [param pos].
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_resize_object" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2022-12-08 21:01:07 +01:00
<param index= "4" name= "baseline" type= "float" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Sets new size and alignment of embedded object.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_bidi_override" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Overrides BiDi for the structured text.
2021-08-27 23:19:51 +02:00
</description>
</method>
2023-10-01 12:39:13 +02:00
<method name= "_shaped_text_set_custom_ellipsis" qualifiers= "virtual" >
<return type= "void" />
<param index= "0" name= "shaped" type= "RID" />
<param index= "1" name= "char" type= "int" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets ellipsis character used for text clipping.
2023-10-01 12:39:13 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_custom_punctuation" qualifiers= "virtual" >
2021-03-06 10:52:16 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
2021-03-06 10:52:16 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_direction" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets desired text direction. If set to [constant TextServer.DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_orientation" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets desired text orientation.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_preserve_control" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code] text buffer will display control characters.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_preserve_invalid" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_set_spacing" qualifiers= "virtual" >
2022-05-09 11:47:10 +02:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Sets extra spacing added between glyphs or lines in pixels.
2022-05-09 11:47:10 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_shape" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_sort_logical" qualifiers= "virtual" >
2022-02-13 13:41:29 +01:00
<return type= "const Glyph*" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns text glyphs in the logical order.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_substr" qualifiers= "virtual const" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Required.[/b]
Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_tab_align" qualifiers= "virtual" >
2021-08-27 23:19:51 +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" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Aligns shaped text to the given tab-stops.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_update_breaks" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Updates break points in the shaped text. This method is called by default implementation of text breaking functions.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_shaped_text_update_justification_ops" qualifiers= "virtual" >
2021-08-27 23:19:51 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "shaped" type= "RID" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Updates justification points in the shaped text. This method is called by default implementation of text justification functions.
2021-08-27 23:19:51 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_spoof_check" qualifiers= "virtual const" >
2021-11-12 09:12:37 +01:00
<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 >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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
</description>
</method>
2023-08-15 10:42:40 +02:00
<method name= "_string_get_character_breaks" qualifiers= "virtual const" >
<return type= "PackedInt32Array" />
<param index= "0" name= "string" type= "String" />
<param index= "1" name= "language" type= "String" />
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns array of the composite character boundaries.
2023-08-15 10:42:40 +02:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_string_get_word_breaks" qualifiers= "virtual const" >
2021-11-04 13:33:37 +01:00
<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" />
2022-08-18 10:20:20 +02:00
<param index= "2" name= "chars_per_line" type= "int" />
2021-11-04 13:33:37 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
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.
2021-11-04 13:33:37 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_string_to_lower" qualifiers= "virtual const" >
2022-01-17 09:54:45 +01:00
<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" />
2022-01-17 09:54:45 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the string converted to lowercase.
2022-01-17 09:54:45 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_string_to_upper" qualifiers= "virtual const" >
2022-01-17 09:54:45 +01:00
<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" />
2022-01-17 09:54:45 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Returns the string converted to uppercase.
2022-02-13 13:41:29 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_strip_diacritics" qualifiers= "virtual const" >
2022-02-13 13:41:29 +01:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "string" type= "String" />
2022-02-13 13:41:29 +01:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Strips diacritics from the string.
2022-01-17 09:54:45 +01:00
</description>
</method>
2022-09-27 10:23:34 +02:00
<method name= "_tag_to_name" qualifiers= "virtual const" >
2021-08-27 23:19:51 +02:00
<return type= "String" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "tag" type= "int" />
2021-08-27 23:19:51 +02:00
<description >
2024-02-22 11:10:37 +01:00
[b]Optional.[/b]
Converts OpenType tag to readable feature, variation, script, or language name.
2021-08-27 23:19:51 +02:00
</description>
</method>
</methods>
</class>