diff options
Diffstat (limited to 'doc/classes/TextServer.xml')
-rw-r--r-- | doc/classes/TextServer.xml | 118 |
1 files changed, 100 insertions, 18 deletions
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> |