summaryrefslogtreecommitdiff
path: root/doc/classes/TextServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TextServer.xml')
-rw-r--r--doc/classes/TextServer.xml74
1 files changed, 52 insertions, 22 deletions
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index ee3c87b8e6..0db16b491d 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -98,6 +98,13 @@
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
+ <method name="font_get_antialiasing" qualifiers="const">
+ <return type="int" enum="TextServer.FontAntialiasing" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font anti-aliasing mode.
+ </description>
+ </method>
<method name="font_get_ascent" qualifiers="const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
@@ -188,7 +195,7 @@
</description>
</method>
<method name="font_get_glyph_list" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
@@ -268,7 +275,7 @@
</description>
</method>
<method name="font_get_kerning_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
@@ -349,7 +356,7 @@
</description>
</method>
<method name="font_get_size_cache_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<description>
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
@@ -447,13 +454,6 @@
Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
- <method name="font_is_antialiased" qualifiers="const">
- <return type="bool" />
- <param 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="const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -556,12 +556,12 @@
Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="font_set_antialiased">
+ <method name="font_set_antialiasing">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
- <param index="1" name="antialiased" type="bool" />
+ <param index="1" name="antialiasing" type="int" enum="TextServer.FontAntialiasing" />
<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.
+ Sets font anti-aliasing mode.
</description>
</method>
<method name="font_set_ascent">
@@ -993,7 +993,7 @@
</description>
</method>
<method name="parse_structured_text" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<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" />
@@ -1035,7 +1035,7 @@
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" default="{}" />
<description>
@@ -1057,7 +1057,7 @@
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="text" type="String" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" default="{}" />
<param index="5" name="language" type="String" default="&quot;&quot;" />
@@ -1162,7 +1162,7 @@
</description>
</method>
<method name="shaped_text_get_ellipsis_glyphs" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns array of the glyphs in the ellipsis.
@@ -1183,7 +1183,7 @@
</description>
</method>
<method name="shaped_text_get_glyphs" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns an array of glyphs in the visual order.
@@ -1463,7 +1463,7 @@
</description>
</method>
<method name="shaped_text_sort_logical">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns text glyphs in the logical order.
@@ -1539,6 +1539,32 @@
</method>
</methods>
<constants>
+ <constant name="FONT_ANTIALIASING_NONE" value="0" enum="FontAntialiasing">
+ Font glyphs are rasterized as 1-bit bitmaps.
+ </constant>
+ <constant name="FONT_ANTIALIASING_GRAY" value="1" enum="FontAntialiasing">
+ Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
+ </constant>
+ <constant name="FONT_ANTIALIASING_LCD" value="2" enum="FontAntialiasing">
+ Font glyphs are rasterized for LCD screens.
+ LCD sub-pixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings.
+ LCD sub-pixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_NONE" value="0" enum="FontLCDSubpixelLayout">
+ Unknown or unsupported sub-pixel layout, LCD sub-pixel anti-aliasing is disabled.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value="1" enum="FontLCDSubpixelLayout">
+ Horizontal RGB sub-pixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value="2" enum="FontLCDSubpixelLayout">
+ Horizontal BGR sub-pixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value="3" enum="FontLCDSubpixelLayout">
+ Vertical RGB sub-pixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout">
+ Vertical BGR sub-pixel layout.
+ </constant>
<constant name="DIRECTION_AUTO" value="0" enum="Direction">
Text direction is determined based on contents and current locale.
</constant>
@@ -1598,6 +1624,10 @@
Break the line between any unconnected graphemes.
</constant>
<constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true">
+ Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.
+ </constant>
+ <constant name="BREAK_TRIM_EDGE_SPACES" value="16" enum="LineBreakFlag" is_bitfield="true">
+ Remove edge spaces from the broken line segments.
</constant>
<constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
@@ -1606,13 +1636,13 @@
Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
</constant>
<constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
</constant>
<constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.
</constant>
<constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the right.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.
</constant>
<constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
No text trimming is performed.