summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-19 13:27:18 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-22 12:08:46 +0300
commitbe611c1c0592d4aaa9c58f227a9c33301acd544b (patch)
treec304cf5c4fe0ebd33a4f361f3c1b10c5b74f1da1 /doc
parentf4b0c7a1ea8d86c1dfd96478ca12ad1360903d9d (diff)
Implement Label3D node.
Add "generate_mipmap" font import option. Add some missing features to the Sprite3D. Move BiDi override code from Control to TextServer. Add functions to access TextServer font cache textures. Add MSDF related flags and shader to the standard material. Change standard material cache to use HashMap instead of Vector.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/BaseMaterial3D.xml14
-rw-r--r--doc/classes/Control.xml22
-rw-r--r--doc/classes/FontData.xml3
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/Label3D.xml173
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/RichTextLabel.xml4
-rw-r--r--doc/classes/SpriteBase3D.xml17
-rw-r--r--doc/classes/TextEdit.xml2
-rw-r--r--doc/classes/TextServer.xml68
-rw-r--r--doc/classes/TextServerExtension.xml41
-rw-r--r--doc/classes/TreeItem.xml4
13 files changed, 322 insertions, 32 deletions
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index ae7b0afaa7..4b6f6eec67 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -63,6 +63,9 @@
<member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
Forces a conversion of the [member albedo_texture] from sRGB space to linear space.
</member>
+ <member name="albedo_tex_msdf" type="bool" setter="set_flag" getter="get_flag" default="false">
+ Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF paramenters.
+ </member>
<member name="albedo_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture to multiply by [member albedo_color]. Used for basic texturing of objects.
</member>
@@ -243,6 +246,12 @@
<member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
</member>
+ <member name="msdf_outline_size" type="float" setter="set_msdf_outline_size" getter="get_msdf_outline_size" default="0.0">
+ The width of the shape outine.
+ </member>
+ <member name="msdf_pixel_range" type="float" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="4.0">
+ The width of the range around the shape between the minimum and maximum representable signed distance.
+ </member>
<member name="no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
</member>
@@ -647,7 +656,10 @@
</constant>
<constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags">
</constant>
- <constant name="FLAG_MAX" value="20" enum="Flags">
+ <constant name="FLAG_ALBEDO_TEXTURE_MSDF" value="20" enum="Flags">
+ Enables multichannel signed distance field rendering shader.
+ </constant>
+ <constant name="FLAG_MAX" value="21" enum="Flags">
Represents the size of the [enum Flags] enum.
</constant>
<constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 78150af9dd..7e1bceb888 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1358,27 +1358,5 @@
<constant name="TEXT_DIRECTION_RTL" value="2" enum="TextDirection">
Right-to-left text writing direction.
</constant>
- <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
- Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description.
- </constant>
- <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
- BiDi override for URI.
- </constant>
- <constant name="STRUCTURED_TEXT_FILE" value="2" enum="StructuredTextParser">
- BiDi override for file path.
- </constant>
- <constant name="STRUCTURED_TEXT_EMAIL" value="3" enum="StructuredTextParser">
- BiDi override for email.
- </constant>
- <constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser">
- BiDi override for lists.
- Structured text options: list separator [code]String[/code].
- </constant>
- <constant name="STRUCTURED_TEXT_NONE" value="5" enum="StructuredTextParser">
- Use default Unicode BiDi algorithm.
- </constant>
- <constant name="STRUCTURED_TEXT_CUSTOM" value="6" enum="StructuredTextParser">
- User defined structured text BiDi override function.
- </constant>
</constants>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 313e3e31fc..a423d7a4e4 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -582,6 +582,9 @@
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</member>
+ <member name="generate_mipmaps" type="bool" setter="set_generate_mipmaps" getter="get_generate_mipmaps" default="false">
+ If set to [code]true[/code], generate mipmaps for the font textures.
+ </member>
<member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
Font hinting mode. Used by dynamic fonts only.
</member>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index b1046dea6b..d5744bbc42 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -85,7 +85,7 @@
[b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" />
- <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
new file mode 100644
index 0000000000..c95b691bf3
--- /dev/null
+++ b/doc/classes/Label3D.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Label3D" inherits="GeometryInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Displays plain text in a 3D world.
+ </brief_description>
+ <description>
+ Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear_opentype_features">
+ <return type="void" />
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
+ <method name="generate_triangle_mesh" qualifiers="const">
+ <return type="TriangleMesh" />
+ <description>
+ Returns a [TriangleMesh] with the label's vertices following its current configuration (such as its [member pixel_size]).
+ </description>
+ </method>
+ <method name="get_draw_flag" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
+ <description>
+ Returns the value of the specified flag.
+ </description>
+ </method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="tag" type="String" />
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
+ <method name="set_draw_flag">
+ <return type="void" />
+ <argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
+ <argument index="1" name="enabled" type="bool" />
+ <description>
+ If [code]true[/code], the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags.
+ </description>
+ </method>
+ <method name="set_opentype_feature">
+ <return type="void" />
+ <argument index="0" name="tag" type="String" />
+ <argument index="1" name="value" type="int" />
+ <description>
+ Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="Label3D.AlphaCutMode" default="0">
+ The alpha cutting mode to use for the sprite. See [enum AlphaCutMode] for possible values.
+ </member>
+ <member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" default="0.5">
+ Threshold at which the alpha scissor will discard values.
+ </member>
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label3D.AutowrapMode" default="0">
+ If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode].
+ </member>
+ <member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
+ The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values.
+ </member>
+ <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
+ If [code]true[/code], text can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
+ </member>
+ <member name="fixed_size" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
+ If [code]true[/code], the label is rendered at the same size regardless of distance.
+ </member>
+ <member name="font" type="Font" setter="set_font" getter="get_font">
+ [Font] used for the [Label3D]'s text.
+ </member>
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
+ Font size of the [Label3D]'s text.
+ </member>
+ <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1">
+ Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [enum HorizontalAlignment] constants.
+ </member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
+ <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0">
+ Vertical space between lines in multiline [Label3D].
+ </member>
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
+ Text [Color] of the [Label3D].
+ </member>
+ <member name="no_depth_test" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
+ If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
+ </member>
+ <member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color(0, 0, 0, 1)">
+ The tint of [Font]'s outline.
+ </member>
+ <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ Text outline size.
+ </member>
+ <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
+ The size of one pixel's width on the label to scale it in 3D.
+ </member>
+ <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
+ If [code]true[/code], the [Light3D] in the [Environment] has effects on the label.
+ </member>
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
+ Set additional options for BiDi override.
+ </member>
+ <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
+ The text to display on screen.
+ </member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="TextServer.Direction" default="0">
+ Base text writing direction.
+ </member>
+ <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
+ Filter flags for the texture. See [enum BaseMaterial3D.TextureFilter] for options.
+ </member>
+ <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
+ If [code]true[/code], all the text displays as UPPERCASE.
+ </member>
+ <member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="VerticalAlignment" default="1">
+ Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [enum VerticalAlignment] constants.
+ </member>
+ <member name="width" type="float" setter="set_width" getter="get_width" default="500.0">
+ Text width (in pixels), used for autowrap and fill alignment.
+ </member>
+ </members>
+ <constants>
+ <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
+ Autowrap is disabled.
+ </constant>
+ <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
+ </constant>
+ <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by soft-breaking between words.
+ </constant>
+ <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
+ Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
+ </constant>
+ <constant name="FLAG_SHADED" value="0" enum="DrawFlags">
+ If set, lights in the environment affect the label.
+ </constant>
+ <constant name="FLAG_DOUBLE_SIDED" value="1" enum="DrawFlags">
+ If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
+ </constant>
+ <constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="DrawFlags">
+ Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
+ </constant>
+ <constant name="FLAG_FIXED_SIZE" value="3" enum="DrawFlags">
+ Label is scaled by depth so that it always appears the same size on screen.
+ </constant>
+ <constant name="FLAG_MAX" value="4" enum="DrawFlags">
+ Represents the size of the [enum DrawFlags] enum.
+ </constant>
+ <constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
+ This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
+ </constant>
+ <constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
+ This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
+ [b]Note:[/b] This mode might have issues with anti-aliased fonts and outlines, try adjusting [member alpha_scissor_threshold] or using MSDF font.
+ [b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
+ </constant>
+ <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode">
+ This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
+ [b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 136147b4b0..55e012ee0c 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -251,7 +251,7 @@
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
If [code]false[/code], using shortcuts will be disabled.
</member>
- <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 3b03d86644..ba80504caf 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -36,7 +36,7 @@
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
- <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 02b67a4a5b..828117a847 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -342,7 +342,7 @@
<argument index="0" name="alignment" type="int" enum="HorizontalAlignment" />
<argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
<argument index="2" name="language" type="String" default="&quot;&quot;" />
- <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" />
+ <argument index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
<description>
Adds a [code][p][/code] tag to the tag stack.
</description>
@@ -488,7 +488,7 @@
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
</member>
- <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 405fff0ce8..9733fa3a26 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -53,6 +53,9 @@
<member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
</member>
+ <member name="fixed_size" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
+ If [code]true[/code], the label is rendered at the same size regardless of distance.
+ </member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false">
If [code]true[/code], texture is flipped horizontally.
</member>
@@ -63,6 +66,9 @@
A color value used to [i]multiply[/i] the texture's colors. Can be used for mood-coloring or to simulate the color of light.
[b]Note:[/b] If a [member GeometryInstance3D.material_override] is defined on the [SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [member modulate] will be ignored. For a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] must be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function.
</member>
+ <member name="no_depth_test" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
+ If [code]true[/code], depth testing is disabled and the object will be drawn in render order.
+ </member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
@@ -72,6 +78,9 @@
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite.
</member>
+ <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
+ Filter flags for the texture. See [enum BaseMaterial3D.TextureFilter] for options.
+ </member>
<member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the sprite invisible.
</member>
@@ -86,7 +95,13 @@
<constant name="FLAG_DOUBLE_SIDED" value="2" enum="DrawFlags">
If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
</constant>
- <constant name="FLAG_MAX" value="3" enum="DrawFlags">
+ <constant name="FLAG_DISABLE_DEPTH_TEST" value="3" enum="DrawFlags">
+ Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
+ </constant>
+ <constant name="FLAG_FIXED_SIZE" value="4" enum="DrawFlags">
+ Label is scaled by depth so that it always appears the same size on screen.
+ </constant>
+ <constant name="FLAG_MAX" value="5" enum="DrawFlags">
Represents the size of the [enum DrawFlags] enum.
</constant>
<constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index a4edaa79c7..58fdd2d058 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1017,7 +1017,7 @@
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
</member>
- <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
<member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 9ef800d7e1..dba4bd24a5 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -80,6 +80,7 @@
<description>
Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
+ [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
<method name="font_draw_glyph_outline" qualifiers="const">
@@ -94,6 +95,7 @@
<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].
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
+ [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_ascent" qualifiers="const">
@@ -126,6 +128,13 @@
Returns bitmap font fixed size.
</description>
</method>
+ <method name="font_get_generate_mipmaps" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if font texture mipmap generation is enabled.
+ </description>
+ </method>
<method name="font_get_global_oversampling" qualifiers="const">
<return type="float" />
<description>
@@ -199,6 +208,26 @@
Returns index of the cache texture containing the glyph.
</description>
</method>
+ <method name="font_get_glyph_texture_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns resource id of the cache texture containing the glyph.
+ [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_glyph_texture_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns size of the cache texture containing the glyph.
+ [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_glyph_uv_rect" qualifiers="const">
<return type="Rect2" />
<argument index="0" name="font_rid" type="RID" />
@@ -580,6 +609,14 @@
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
+ <method name="font_set_generate_mipmaps">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="generate_mipmaps" type="bool" />
+ <description>
+ If set to [code]true[/code] font texture mipmap generation is enabled.
+ </description>
+ </method>
<method name="font_set_global_oversampling">
<return type="void" />
<argument index="0" name="oversampling" type="float" />
@@ -927,6 +964,15 @@
Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
</description>
</method>
+ <method name="parse_structured_text" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
+ <argument index="1" name="args" type="Array" />
+ <argument index="2" name="text" type="String" />
+ <description>
+ Default implementation of the BiDi algorithm override function. See [enum StructuredTextParser] for more info.
+ </description>
+ </method>
<method name="percent_sign" qualifiers="const">
<return type="String" />
<argument index="0" name="language" type="String" default="&quot;&quot;" />
@@ -1630,5 +1676,27 @@
<constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle">
Font have fixed-width characters.
</constant>
+ <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
+ Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description.
+ </constant>
+ <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
+ BiDi override for URI.
+ </constant>
+ <constant name="STRUCTURED_TEXT_FILE" value="2" enum="StructuredTextParser">
+ BiDi override for file path.
+ </constant>
+ <constant name="STRUCTURED_TEXT_EMAIL" value="3" enum="StructuredTextParser">
+ BiDi override for email.
+ </constant>
+ <constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser">
+ BiDi override for lists.
+ Structured text options: list separator [code]String[/code].
+ </constant>
+ <constant name="STRUCTURED_TEXT_NONE" value="5" enum="StructuredTextParser">
+ Use default Unicode BiDi algorithm.
+ </constant>
+ <constant name="STRUCTURED_TEXT_CUSTOM" value="6" enum="StructuredTextParser">
+ User defined structured text BiDi override function.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index e7c5edd266..ef522d08a7 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -121,6 +121,13 @@
Returns bitmap font fixed size.
</description>
</method>
+ <method name="font_get_generate_mipmaps" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if font texture mipmap generation is enabled.
+ </description>
+ </method>
<method name="font_get_global_oversampling" qualifiers="virtual const">
<return type="float" />
<description>
@@ -193,6 +200,24 @@
Returns index of the cache texture containing the glyph.
</description>
</method>
+ <method name="font_get_glyph_texture_rid" qualifiers="virtual const">
+ <return type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns resource id of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_texture_size" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns size of the cache texture containing the glyph.
+ </description>
+ </method>
<method name="font_get_glyph_uv_rect" qualifiers="virtual const">
<return type="Rect2" />
<argument index="0" name="font_rid" type="RID" />
@@ -581,6 +606,14 @@
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
+ <method name="font_set_generate_mipmaps" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="generate_mipmaps" type="bool" />
+ <description>
+ If set to [code]true[/code] font texture mipmap generation is enabled.
+ </description>
+ </method>
<method name="font_set_global_oversampling" qualifiers="virtual">
<return type="void" />
<argument index="0" name="oversampling" type="float" />
@@ -927,6 +960,14 @@
Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
</description>
</method>
+ <method name="parse_structured_text" qualifiers="virtual const">
+ <return type="Array" />
+ <argument index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
+ <argument index="1" name="args" type="Array" />
+ <argument index="2" name="text" type="String" />
+ <description>
+ </description>
+ </method>
<method name="percent_sign" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="language" type="String" />
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 396be2d9f8..d2e29bf3b1 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -284,7 +284,7 @@
</description>
</method>
<method name="get_structured_text_bidi_override" qualifiers="const">
- <return type="int" enum="Control.StructuredTextParser" />
+ <return type="int" enum="TextServer.StructuredTextParser" />
<argument index="0" name="column" type="int" />
<description>
</description>
@@ -620,7 +620,7 @@
<method name="set_structured_text_bidi_override">
<return type="void" />
<argument index="0" name="column" type="int" />
- <argument index="1" name="parser" type="int" enum="Control.StructuredTextParser" />
+ <argument index="1" name="parser" type="int" enum="TextServer.StructuredTextParser" />
<description>
</description>
</method>