summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-01 15:24:52 +0200
committerGitHub <noreply@github.com>2021-10-01 15:24:52 +0200
commit928c002f223b67bd6fd1c55d65e37a6d5c4e3a94 (patch)
tree9b0ea4d9718fe694b2b22d9e09a66b32db8c2cb9 /doc
parent06c1b40b84645b4460dd49d95694a7779d636f92 (diff)
parent0c0b5c84b06e64de6cab301994ac9cd1f845dd35 (diff)
Merge pull request #52192 from bruvzg/text_server_gdext
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/Font.xml4
-rw-r--r--doc/classes/OS.xml2
-rw-r--r--doc/classes/RenderingServer.xml12
-rw-r--r--doc/classes/TextParagraph.xml2
-rw-r--r--doc/classes/TextServer.xml118
-rw-r--r--doc/classes/TextServerExtension.xml1262
-rw-r--r--doc/classes/TextServerManager.xml52
8 files changed, 1412 insertions, 42 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 501f89fa0d..738594ea5d 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -150,7 +150,7 @@
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="8" name="outline_size" type="int" default="0" />
<argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="51" />
+ <argument index="10" name="flags" type="int" default="99" />
<description>
Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
</description>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index e8ff0f60ec..39881e9eb7 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -103,7 +103,7 @@
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="8" name="outline_size" type="int" default="0" />
<argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="51" />
+ <argument index="10" name="flags" type="int" default="99" />
<description>
Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_multiline_string].
@@ -185,7 +185,7 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="width" type="float" default="-1" />
<argument index="2" name="size" type="int" default="-1" />
- <argument index="3" name="flags" type="int" default="48" />
+ <argument index="3" name="flags" type="int" default="96" />
<description>
Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account.
See also [method draw_multiline_string].
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 9d0d185c42..656fa61af7 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -246,7 +246,7 @@
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
- Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
+ Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"macOS"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
</description>
</method>
<method name="get_process_id" qualifiers="const">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index b5be04fb01..d40ad80d68 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -185,6 +185,18 @@
<description>
</description>
</method>
+ <method name="canvas_item_add_msdf_texture_rect_region">
+ <return type="void" />
+ <argument index="0" name="item" type="RID" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="texture" type="RID" />
+ <argument index="3" name="src_rect" type="Rect2" />
+ <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="5" name="outline_size" type="int" default="0" />
+ <argument index="6" name="px_range" type="float" default="1.0" />
+ <description>
+ </description>
+ </method>
<method name="canvas_item_add_multimesh">
<return type="void" />
<argument index="0" name="item" type="RID" />
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index aa35acdbd2..e06dfee698 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -281,7 +281,7 @@
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="51">
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" default="99">
Line breaking and alignment rules. For more info see [TextServer].
</member>
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 7fe9278f2c..18ace85465 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextServer" inherits="Object" version="4.0">
+<class name="TextServer" inherits="RefCounted" version="4.0">
<brief_description>
Interface for the fonts and complex text layouts.
</brief_description>
@@ -487,8 +487,8 @@
</method>
<method name="font_set_data">
<return type="void" />
- <argument index="0" name="data" type="RID" />
- <argument index="1" name="arg1" type="PackedByteArray" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="data" type="PackedByteArray" />
<description>
Sets font source data, e.g contents of the dynamic font source file.
</description>
@@ -714,12 +714,14 @@
<return type="Dictionary" />
<argument index="0" name="font_rid" type="RID" />
<description>
+ Returns the dictionary of the supported OpenType features.
</description>
</method>
<method name="font_supported_variation_list" qualifiers="const">
<return type="Dictionary" />
<argument index="0" name="font_rid" type="RID" />
<description>
+ Returns the dictionary of the supported OpenType variation coordinates.
</description>
</method>
<method name="format_number" qualifiers="const">
@@ -737,6 +739,12 @@
Frees an object created by this [TextServer].
</description>
</method>
+ <method name="get_features" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns text server features, see [enum Feature].
+ </description>
+ </method>
<method name="get_hex_code_box_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="size" type="int" />
@@ -751,6 +759,18 @@
Returns the name of the server interface.
</description>
</method>
+ <method name="get_support_data_filename" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
+ </description>
+ </method>
+ <method name="get_support_data_info" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
+ </description>
+ </method>
<method name="has">
<return type="bool" />
<argument index="0" name="rid" type="RID" />
@@ -758,14 +778,14 @@
Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
</description>
</method>
- <method name="has_feature">
+ <method name="has_feature" qualifiers="const">
<return type="bool" />
<argument index="0" name="feature" type="int" enum="TextServer.Feature" />
<description>
Returns [code]true[/code] if the server supports a feature.
</description>
</method>
- <method name="is_locale_right_to_left">
+ <method name="is_locale_right_to_left" qualifiers="const">
<return type="bool" />
<argument index="0" name="locale" type="String" />
<description>
@@ -802,6 +822,14 @@
Returns percent sign used in the [code]language[/code].
</description>
</method>
+ <method name="save_support_data" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="filename" type="String" />
+ <description>
+ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
+ Note: This function is used by during project export, to include TextServer database.
+ </description>
+ </method>
<method name="shaped_text_add_object">
<return type="bool" />
<argument index="0" name="shaped" type="RID" />
@@ -898,7 +926,7 @@
Returns direction of the text.
</description>
</method>
- <method name="shaped_text_get_dominant_direciton_in_range" qualifiers="const">
+ <method name="shaped_text_get_dominant_direction_in_range" qualifiers="const">
<return type="int" enum="TextServer.Direction" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="start" type="int" />
@@ -907,30 +935,58 @@
Returns dominant direction of in the range of text.
</description>
</method>
+ <method name="shaped_text_get_ellipsis_glyph_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns number of glyphs in the ellipsis.
+ </description>
+ </method>
+ <method name="shaped_text_get_ellipsis_glyphs" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns array of the glyphs in the ellipsis.
+ </description>
+ </method>
+ <method name="shaped_text_get_ellipsis_pos" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns position of the ellipsis.
+ </description>
+ </method>
+ <method name="shaped_text_get_glyph_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns number of glyphs in the buffer.
+ </description>
+ </method>
<method name="shaped_text_get_glyphs" qualifiers="const">
<return type="Array" />
<argument index="0" name="shaped" type="RID" />
<description>
- Returns text glyphs.
+ Returns text glyphs in the visual order.
</description>
</method>
<method name="shaped_text_get_line_breaks" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="float" />
<argument index="2" name="start" type="int" default="0" />
- <argument index="3" name="break_flags" type="int" default="48" />
+ <argument index="3" name="break_flags" type="int" default="96" />
<description>
Breaks text to the lines and returns character ranges for each line.
</description>
</method>
<method name="shaped_text_get_line_breaks_adv" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="width" type="PackedFloat32Array" />
<argument index="2" name="start" type="int" default="0" />
<argument index="3" name="once" type="bool" default="true" />
- <argument index="4" name="break_flags" type="int" default="48" />
+ <argument index="4" name="break_flags" type="int" default="96" />
<description>
Breaks text to the lines and columns. Returns character ranges for each segment.
</description>
@@ -987,7 +1043,7 @@
</description>
</method>
<method name="shaped_text_get_selection" qualifiers="const">
- <return type="Array" />
+ <return type="PackedVector2Array" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="start" type="int" />
<argument index="2" name="end" type="int" />
@@ -1002,6 +1058,13 @@
Returns size of the text.
</description>
</method>
+ <method name="shaped_text_get_trim_pos" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns position of the trim.
+ </description>
+ </method>
<method name="shaped_text_get_underline_position" qualifiers="const">
<return type="float" />
<argument index="0" name="shaped" type="RID" />
@@ -1024,8 +1087,9 @@
</description>
</method>
<method name="shaped_text_get_word_breaks" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="grapheme_flags" type="int" />
<description>
Breaks text into words and returns array of character ranges.
</description>
@@ -1053,7 +1117,7 @@
Returns [code]true[/code] if buffer is successfully shaped.
</description>
</method>
- <method name="shaped_text_next_grapheme_pos">
+ <method name="shaped_text_next_grapheme_pos" qualifiers="const">
<return type="int" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="pos" type="int" />
@@ -1070,7 +1134,7 @@
Trims text if it exceeds the given width.
</description>
</method>
- <method name="shaped_text_prev_grapheme_pos">
+ <method name="shaped_text_prev_grapheme_pos" qualifiers="const">
<return type="int" />
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="pos" type="int" />
@@ -1139,6 +1203,13 @@
Note: It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
</description>
</method>
+ <method name="shaped_text_sort_logical">
+ <return type="Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns text glyphs in the logical order.
+ </description>
+ </method>
<method name="shaped_text_substr" qualifiers="const">
<return type="RID" />
<argument index="0" name="shaped" type="RID" />
@@ -1196,18 +1267,24 @@
<constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag">
Only apply justification to the part of the text after the last tab.
</constant>
+ <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag">
+ Apply justification to the trimmed line with ellipsis.
+ </constant>
<constant name="BREAK_NONE" value="0" enum="LineBreakFlag">
Do not break the line.
</constant>
- <constant name="BREAK_MANDATORY" value="16" enum="LineBreakFlag">
+ <constant name="BREAK_MANDATORY" value="32" enum="LineBreakFlag">
Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
</constant>
- <constant name="BREAK_WORD_BOUND" value="32" enum="LineBreakFlag">
+ <constant name="BREAK_WORD_BOUND" value="64" enum="LineBreakFlag">
Break the line between the words.
</constant>
- <constant name="BREAK_GRAPHEME_BOUND" value="64" enum="LineBreakFlag">
+ <constant name="BREAK_GRAPHEME_BOUND" value="128" enum="LineBreakFlag">
Break the line between any unconnected graphemes.
</constant>
+ <constant name="BREAK_WORD_BOUND_ADAPTIVE" value="320" enum="LineBreakFlag">
+ Break the line between the words, or any unconnected graphemes if line is too short to fit the whole word.
+ </constant>
<constant name="OVERRUN_NO_TRIMMING" value="0" enum="TextOverrunFlag">
No trimming is performed.
</constant>
@@ -1223,6 +1300,11 @@
<constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag">
Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
</constant>
+ <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag">
+ </constant>
+ <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag">
+ Grapheme is supprted by the font, and can be drawn.
+ </constant>
<constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
Grapheme is part of right-to-left or bottom-to-top run.
</constant>
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
new file mode 100644
index 0000000000..29571463d2
--- /dev/null
+++ b/doc/classes/TextServerExtension.xml
@@ -0,0 +1,1262 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextServerExtension" inherits="TextServer" version="4.0">
+ <brief_description>
+ Base class for TextServer custom implementations (plugins).
+ </brief_description>
+ <description>
+ External TextServer implementations should inherit from this class.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_create_font" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ Creates new, empty font cache entry resource. To free the resulting resourec, use [method _free] method.
+ </description>
+ </method>
+ <method name="_create_shaped_text" qualifiers="virtual">
+ <return type="RID" />
+ <argument index="0" name="direction" type="int" enum="TextServer.Direction" />
+ <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" />
+ <description>
+ Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method _free] method.
+ Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ Note: Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="_draw_hex_code_box" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="canvas" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="pos" type="Vector2" />
+ <argument index="3" name="index" type="int" />
+ <argument index="4" name="color" type="Color" />
+ <description>
+ Draws box displaying character hexadecimal code. Used for replacing missing characters.
+ </description>
+ </method>
+ <method name="_font_clear_glyphs" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method _font_remove_texture] to remove them manually.
+ </description>
+ </method>
+ <method name="_font_clear_kerning_map" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Removes all kerning overrides.
+ </description>
+ </method>
+ <method name="_font_clear_size_cache" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Removes all font sizes from the cache entry
+ </description>
+ </method>
+ <method name="_font_clear_textures" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method _font_remove_glyph] to remove them manually.
+ </description>
+ </method>
+ <method name="_font_draw_glyph" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="canvas" type="RID" />
+ <argument index="2" name="size" type="int" />
+ <argument index="3" name="pos" type="Vector2" />
+ <argument index="4" name="index" type="int" />
+ <argument index="5" name="color" type="Color" />
+ <description>
+ Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
+ Note: Glyph index is specific to the font, use glyphs indices returned by [method _shaped_text_get_glyphs] or [method _font_get_glyph_index].
+ </description>
+ </method>
+ <method name="_font_draw_glyph_outline" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="canvas" type="RID" />
+ <argument index="2" name="size" type="int" />
+ <argument index="3" name="outline_size" type="int" />
+ <argument index="4" name="pos" type="Vector2" />
+ <argument index="5" name="index" type="int" />
+ <argument index="6" name="color" type="Color" />
+ <description>
+ Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
+ Note: Glyph index is specific to the font, use glyphs indices returned by [method _shaped_text_get_glyphs] or [method _font_get_glyph_index].
+ </description>
+ </method>
+ <method name="_font_get_ascent" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="_font_get_descent" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="_font_get_fixed_size" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns bitmap font fixed size.
+ </description>
+ </method>
+ <method name="_font_get_global_oversampling" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ Returns the font oversampling factor, shared by all fonts in the TextServer.
+ </description>
+ </method>
+ <method name="_font_get_glyph_advance" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="_font_get_glyph_contours" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
+ [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum TextServer.ContourPointTag] values.
+ [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
+ [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
+ </description>
+ </method>
+ <method name="_font_get_glyph_index" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="char" type="int" />
+ <argument index="3" name="variation_selector" type="int" />
+ <description>
+ Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ </description>
+ </method>
+ <method name="_font_get_glyph_list" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="_font_get_glyph_offset" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="_font_get_glyph_size" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns size of the glyph.
+ </description>
+ </method>
+ <method name="_font_get_glyph_texture_idx" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="_font_get_glyph_uv_rect" qualifiers="virtual const">
+ <return type="Rect2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="_font_get_hinting" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_get_kerning" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="_font_get_kerning_list" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
+ </description>
+ </method>
+ <method name="_font_get_language_support_override" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]language[/code].
+ </description>
+ </method>
+ <method name="_font_get_language_support_overrides" qualifiers="virtual">
+ <return type="PackedStringArray" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns list of language support overrides.
+ </description>
+ </method>
+ <method name="_font_get_msdf_pixel_range" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="_font_get_msdf_size" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="_font_get_oversampling" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_get_scale" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
+ </description>
+ </method>
+ <method name="_font_get_script_support_override" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="script" type="String" />
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]script[/code].
+ </description>
+ </method>
+ <method name="_font_get_script_support_overrides" qualifiers="virtual">
+ <return type="PackedStringArray" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns list of script support overrides.
+ </description>
+ </method>
+ <method name="_font_get_size_cache_list" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ </description>
+ </method>
+ <method name="_font_get_spacing" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <description>
+ Returns extra spacing added between glyphs in pixels.
+ </description>
+ </method>
+ <method name="_font_get_supported_chars" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns a string containing all the characters available in the font.
+ </description>
+ </method>
+ <method name="_font_get_texture_count" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns number of textures used by font cache entry.
+ </description>
+ </method>
+ <method name="_font_get_texture_image" qualifiers="virtual const">
+ <return type="Image" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns font cache texture image data.
+ </description>
+ </method>
+ <method name="_font_get_texture_offsets" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="_font_get_underline_position" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="_font_get_underline_thickness" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns thickness of the underline in pixels.
+ </description>
+ </method>
+ <method name="_font_get_variation_coordinates" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns variation coordinates for the specified font cache entry. See [method _font_supported_variation_list] for more info.
+ </description>
+ </method>
+ <method name="_font_has_char" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="char" type="int" />
+ <description>
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ </description>
+ </method>
+ <method name="_font_is_antialiased" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ </description>
+ </method>
+ <method name="_font_is_force_autohinter" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_is_language_supported" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
+ </description>
+ </method>
+ <method name="_font_is_multichannel_signed_distance_field" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </description>
+ </method>
+ <method name="_font_is_script_supported" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="script" type="String" />
+ <description>
+ Returns [code]true[/code], if font supports given script (ISO 15924 code).
+ </description>
+ </method>
+ <method name="_font_remove_glyph" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method _font_remove_texture] to remove them manually.
+ </description>
+ </method>
+ <method name="_font_remove_kerning" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Removes kerning override for the pair of glyphs.
+ </description>
+ </method>
+ <method name="_font_remove_language_support_override" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Remove language support override.
+ </description>
+ </method>
+ <method name="_font_remove_script_support_override" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="script" type="String" />
+ <description>
+ Removes script support override.
+ </description>
+ </method>
+ <method name="_font_remove_size_cache" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="_font_remove_texture" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method _font_remove_glyph].
+ </description>
+ </method>
+ <method name="_font_render_glyph" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="_font_render_range" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
+ <method name="_font_set_antialiased" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="antialiased" type="bool" />
+ <description>
+ If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_set_ascent" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="_font_set_data" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="data" type="PackedByteArray" />
+ <description>
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="_font_set_data_ptr" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="data_ptr" type="const uint8_t*" />
+ <argument index="2" name="data_size" type="int" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="_font_set_descent" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
+ </description>
+ </method>
+ <method name="_font_set_fixed_size" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="fixed_size" type="int" />
+ <description>
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="_font_set_force_autohinter" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="force_autohinter" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_font_set_global_oversampling" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets oversampling factor, shared by all font in the TextServer.
+ Note: This value can be automaticaly changed by display server.
+ </description>
+ </method>
+ <method name="_font_set_glyph_advance" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="_font_set_glyph_offset" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="_font_set_glyph_size" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
+ <description>
+ Sets size of the glyph.
+ </description>
+ </method>
+ <method name="_font_set_glyph_texture_idx" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="_font_set_glyph_uv_rect" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="_font_set_hinting" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <description>
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_set_kerning" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="_font_set_language_support_override" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="language" type="String" />
+ <argument index="2" name="supported" type="bool" />
+ <description>
+ Adds override for [method _font_is_language_supported].
+ </description>
+ </method>
+ <method name="_font_set_msdf_pixel_range" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_pixel_range" type="int" />
+ <description>
+ Sets the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="_font_set_msdf_size" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="_font_set_multichannel_signed_distance_field" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf" type="bool" />
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="_font_set_oversampling" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="oversampling" type="float" />
+ <description>
+ Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="_font_set_scale" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
+ </description>
+ </method>
+ <method name="_font_set_script_support_override" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="script" type="String" />
+ <argument index="2" name="supported" type="bool" />
+ <description>
+ Adds override for [method _font_is_script_supported].
+ </description>
+ </method>
+ <method name="_font_set_spacing" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="value" type="int" />
+ <description>
+ Sets extra spacing added between glyphs in pixels.
+ </description>
+ </method>
+ <method name="_font_set_texture_image" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
+ <description>
+ Sets font cache texture image data.
+ </description>
+ </method>
+ <method name="_font_set_texture_offsets" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="_font_set_underline_position" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="_font_set_underline_thickness" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
+ <description>
+ Sets thickness of the underline in pixels.
+ </description>
+ </method>
+ <method name="_font_set_variation_coordinates" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <description>
+ Sets variation coordinates for the specified font cache entry. See [method _font_supported_variation_list] for more info.
+ </description>
+ </method>
+ <method name="_font_supported_feature_list" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns the dictionary of the supported OpenType features.
+ </description>
+ </method>
+ <method name="_font_supported_variation_list" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns the dictionary of the supported OpenType variation coordinates.
+ </description>
+ </method>
+ <method name="_format_number" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code].
+ </description>
+ </method>
+ <method name="_free" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Frees an object created by this [TextServer].
+ </description>
+ </method>
+ <method name="_get_features" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Returns text server features, see [enum TextServer.Feature].
+ </description>
+ </method>
+ <method name="_get_hex_code_box_size" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="size" type="int" />
+ <argument index="1" name="index" type="int" />
+ <description>
+ Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
+ </description>
+ </method>
+ <method name="_get_name" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ Returns the name of the server interface.
+ </description>
+ </method>
+ <method name="_get_support_data_filename" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
+ </description>
+ </method>
+ <method name="_get_support_data_info" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
+ </description>
+ </method>
+ <method name="_has" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
+ </description>
+ </method>
+ <method name="_has_feature" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="feature" type="int" enum="TextServer.Feature" />
+ <description>
+ Returns [code]true[/code] if the server supports a feature.
+ </description>
+ </method>
+ <method name="_is_locale_right_to_left" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="locale" type="String" />
+ <description>
+ Returns [code]true[/code] if locale is right-to-left.
+ </description>
+ </method>
+ <method name="_load_support_data" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="filename" type="String" />
+ <description>
+ Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
+ Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect.
+ </description>
+ </method>
+ <method name="_name_to_tag" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ Converts readable feature, variation, script or language name to OpenType tag.
+ </description>
+ </method>
+ <method name="_parse_number" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="string" type="String" />
+ <argument index="1" name="language" type="String" />
+ <description>
+ Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
+ </description>
+ </method>
+ <method name="_percent_sign" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="language" type="String" />
+ <description>
+ Returns percent sign used in the [code]language[/code].
+ </description>
+ </method>
+ <method name="_save_support_data" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="filename" type="String" />
+ <description>
+ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
+ Note: This function is used by during project export, to include TextServer database.
+ </description>
+ </method>
+ <method name="_shaped_text_add_object" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="key" type="Variant" />
+ <argument index="2" name="size" type="Vector2" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <argument index="4" name="length" type="int" />
+ <description>
+ Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ </description>
+ </method>
+ <method name="_shaped_text_add_string" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="text" type="String" />
+ <argument index="2" name="fonts" type="Array" />
+ <argument index="3" name="size" type="int" />
+ <argument index="4" name="opentype_features" type="Dictionary" />
+ <argument index="5" name="language" type="String" />
+ <description>
+ Adds text span and font to draw it to the text buffer.
+ </description>
+ </method>
+ <method name="_shaped_text_clear" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Clears text buffer (removes text and inline objects).
+ </description>
+ </method>
+ <method name="_shaped_text_draw" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="canvas" type="RID" />
+ <argument index="2" name="pos" type="Vector2" />
+ <argument index="3" name="clip_l" type="float" />
+ <argument index="4" name="clip_r" type="float" />
+ <argument index="5" name="color" type="Color" />
+ <description>
+ Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
+ </description>
+ </method>
+ <method name="_shaped_text_draw_outline" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="canvas" type="RID" />
+ <argument index="2" name="pos" type="Vector2" />
+ <argument index="3" name="clip_l" type="float" />
+ <argument index="4" name="clip_r" type="float" />
+ <argument index="5" name="outline_size" type="int" />
+ <argument index="6" name="color" type="Color" />
+ <description>
+ Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
+ </description>
+ </method>
+ <method name="_shaped_text_fit_to_width" qualifiers="virtual">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="width" type="float" />
+ <argument index="2" name="jst_flags" type="int" />
+ <description>
+ Adjusts text with to fit to specified width, returns new text width
+ </description>
+ </method>
+ <method name="_shaped_text_get_ascent" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
+ Note: overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
+ </description>
+ </method>
+ <method name="_shaped_text_get_carets" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="position" type="int" />
+ <argument index="2" name="caret" type="CaretInfo*" />
+ <description>
+ Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
+ </description>
+ </method>
+ <method name="_shaped_text_get_descent" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
+ Note: overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
+ </description>
+ </method>
+ <method name="_shaped_text_get_direction" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns direction of the text.
+ </description>
+ </method>
+ <method name="_shaped_text_get_dominant_direction_in_range" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="start" type="int" />
+ <argument index="2" name="end" type="int" />
+ <description>
+ Returns dominant direction of in the range of text.
+ </description>
+ </method>
+ <method name="_shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns number of glyphs in the ellipsis.
+ </description>
+ </method>
+ <method name="_shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="r_glyphs" type="void*" />
+ <description>
+ Returns array of the glyphs in the ellipsis.
+ </description>
+ </method>
+ <method name="_shaped_text_get_ellipsis_pos" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns position of the ellipsis.
+ </description>
+ </method>
+ <method name="_shaped_text_get_glyph_count" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns text glyphs count.
+ </description>
+ </method>
+ <method name="_shaped_text_get_glyphs" qualifiers="virtual const">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="r_glyphs" type="void*" />
+ <description>
+ Copies text glyphs in the visual order, into preallocated array of the size returned by [method _shaped_text_get_glyph_count].
+ </description>
+ </method>
+ <method name="_shaped_text_get_line_breaks" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="width" type="float" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="break_flags" type="int" />
+ <description>
+ Breaks text to the lines and returns character ranges for each line.
+ </description>
+ </method>
+ <method name="_shaped_text_get_line_breaks_adv" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="width" type="PackedFloat32Array" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="once" type="bool" />
+ <argument index="4" name="break_flags" type="int" />
+ <description>
+ Breaks text to the lines and columns. Returns character ranges for each segment.
+ </description>
+ </method>
+ <method name="_shaped_text_get_object_rect" qualifiers="virtual const">
+ <return type="Rect2" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="key" type="Variant" />
+ <description>
+ Returns bounding rectangle of the inline object.
+ </description>
+ </method>
+ <method name="_shaped_text_get_objects" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns array of inline objects.
+ </description>
+ </method>
+ <method name="_shaped_text_get_orientation" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns text orientation.
+ </description>
+ </method>
+ <method name="_shaped_text_get_parent" qualifiers="virtual const">
+ <return type="RID" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Sets text orientation.
+ </description>
+ </method>
+ <method name="_shaped_text_get_preserve_control" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns [code]true[/code] if text buffer is configured to display control characters.
+ </description>
+ </method>
+ <method name="_shaped_text_get_preserve_invalid" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
+ Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
+ </description>
+ </method>
+ <method name="_shaped_text_get_range" qualifiers="virtual const">
+ <return type="Vector2i" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns substring buffer character range in the parent buffer.
+ </description>
+ </method>
+ <method name="_shaped_text_get_selection" qualifiers="virtual const">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="start" type="int" />
+ <argument index="2" name="end" type="int" />
+ <description>
+ Returns selection rectangles for the specified character range.
+ </description>
+ </method>
+ <method name="_shaped_text_get_size" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns size of the text.
+ </description>
+ </method>
+ <method name="_shaped_text_get_trim_pos" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns ellipsis and trim positions.
+ </description>
+ </method>
+ <method name="_shaped_text_get_underline_position" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="_shaped_text_get_underline_thickness" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns thickness of the underline.
+ </description>
+ </method>
+ <method name="_shaped_text_get_width" qualifiers="virtual const">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns width (for horizontal layout) or height (for vertical) of the text.
+ </description>
+ </method>
+ <method name="_shaped_text_get_word_breaks" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="grapheme_flags" type="int" />
+ <description>
+ Breaks text into words and returns array of character ranges.
+ </description>
+ </method>
+ <method name="_shaped_text_hit_test_grapheme" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="coord" type="float" />
+ <description>
+ Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
+ </description>
+ </method>
+ <method name="_shaped_text_hit_test_position" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="coord" type="float" />
+ <description>
+ Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
+ </description>
+ </method>
+ <method name="_shaped_text_is_ready" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Returns [code]true[/code] if buffer is successfully shaped.
+ </description>
+ </method>
+ <method name="_shaped_text_next_grapheme_pos" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character end position closest to the [code]pos[/code].
+ </description>
+ </method>
+ <method name="_shaped_text_overrun_trim_to_width" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="width" type="float" />
+ <argument index="2" name="trim_flags" type="int" />
+ <description>
+ Trims text if it exceeds the given width.
+ </description>
+ </method>
+ <method name="_shaped_text_prev_grapheme_pos" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character start position closest to the [code]pos[/code].
+ </description>
+ </method>
+ <method name="_shaped_text_resize_object" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="key" type="Variant" />
+ <argument index="2" name="size" type="Vector2" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <description>
+ Sets new size and alignment of embedded object.
+ </description>
+ </method>
+ <method name="_shaped_text_set_bidi_override" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="override" type="Array" />
+ <description>
+ Overrides BiDi for the structured text.
+ Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
+ </description>
+ </method>
+ <method name="_shaped_text_set_direction" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="direction" type="int" enum="TextServer.Direction" />
+ <description>
+ Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
+ Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="_shaped_text_set_orientation" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" />
+ <description>
+ Sets desired text orientation.
+ Note: Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="_shaped_text_set_preserve_control" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="enabled" type="bool" />
+ <description>
+ If set to [code]true[/code] text buffer will display control characters.
+ </description>
+ </method>
+ <method name="_shaped_text_set_preserve_invalid" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="enabled" type="bool" />
+ <description>
+ If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
+ </description>
+ </method>
+ <method name="_shaped_text_shape" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
+ Note: It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
+ </description>
+ </method>
+ <method name="_shaped_text_sort_logical" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="r_glyphs" type="void*" />
+ <description>
+ Copies text glyphs in the logical order, into preallocated array of the size returned by [method _shaped_text_get_glyph_count].
+ </description>
+ </method>
+ <method name="_shaped_text_substr" qualifiers="virtual const">
+ <return type="RID" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="start" type="int" />
+ <argument index="2" name="length" type="int" />
+ <description>
+ Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects).
+ </description>
+ </method>
+ <method name="_shaped_text_tab_align" qualifiers="virtual">
+ <return type="float" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="tab_stops" type="PackedFloat32Array" />
+ <description>
+ Aligns shaped text to the given tab-stops.
+ </description>
+ </method>
+ <method name="_shaped_text_update_breaks" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Updates line and word breaks.
+ </description>
+ </method>
+ <method name="_shaped_text_update_justification_ops" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="shaped" type="RID" />
+ <description>
+ Updates justification opportunities (spaces, kashidas, etc.).
+ </description>
+ </method>
+ <method name="_tag_to_name" qualifiers="virtual const">
+ <return type="String" />
+ <argument index="0" name="tag" type="int" />
+ <description>
+ Converts OpenType tag to readable feature, variation, script or language name.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
index 0e7b6d15d3..aa2177c3b1 100644
--- a/doc/classes/TextServerManager.xml
+++ b/doc/classes/TextServerManager.xml
@@ -10,6 +10,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="add_interface">
+ <return type="void" />
+ <argument index="0" name="interface" type="TextServer" />
+ <description>
+ Registers an [TextServer] interface.
+ </description>
+ </method>
<method name="find_interface" qualifiers="const">
<return type="TextServer" />
<argument index="0" name="name" type="String" />
@@ -19,7 +26,7 @@
</method>
<method name="get_interface" qualifiers="const">
<return type="TextServer" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="idx" type="int" />
<description>
Returns the interface registered at a given index.
</description>
@@ -30,20 +37,6 @@
Returns the number of interfaces currently registered.
</description>
</method>
- <method name="get_interface_features" qualifiers="const">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <description>
- Returns text server supported features (binary OR).
- </description>
- </method>
- <method name="get_interface_name" qualifiers="const">
- <return type="String" />
- <argument index="0" name="index" type="int" />
- <description>
- Returns the interface name registered at a given index.
- </description>
- </method>
<method name="get_interfaces" qualifiers="const">
<return type="Array" />
<description>
@@ -53,15 +46,36 @@
<method name="get_primary_interface" qualifiers="const">
<return type="TextServer" />
<description>
- Returns the primary [TextServer] interface.
+ Returns the primary [TextServer] interface currently in use.
+ </description>
+ </method>
+ <method name="remove_interface">
+ <return type="void" />
+ <argument index="0" name="interface" type="TextServer" />
+ <description>
+ Removes interface. All fonts and shaped text caches should be freed before removing interface.
</description>
</method>
<method name="set_primary_interface">
- <return type="bool" />
- <argument index="0" name="index" type="int" />
+ <return type="void" />
+ <argument index="0" name="index" type="TextServer" />
<description>
- Sets (and initializes it if required) interface registered at a given index as the primary. Invalidates all references to the fonts and text buffers.
+ Sets the primary [TextServer] interface.
</description>
</method>
</methods>
+ <signals>
+ <signal name="interface_added">
+ <argument index="0" name="interface_name" type="StringName" />
+ <description>
+ Emitted when a new interface has been added.
+ </description>
+ </signal>
+ <signal name="interface_removed">
+ <argument index="0" name="interface_name" type="StringName" />
+ <description>
+ Emitted when an interface is removed.
+ </description>
+ </signal>
+ </signals>
</class>