summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-10 13:32:54 +0100
committerGitHub <noreply@github.com>2022-01-10 13:32:54 +0100
commit7faf02383c52bcf637888b397fe03972b6640710 (patch)
tree179ea402d4ae6daafecae4f3b22a088456f5153b /doc
parentb2f5c5632c91bc88678b6b7a3e1908f8c03ed8ac (diff)
parentc89c515ccf941a62bf2ec501095fad57d72cb1f7 (diff)
Merge pull request #55225 from bruvzg/fix_ligature_cursor_and_ot_features
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/FontData.xml198
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/TextEdit.xml2
-rw-r--r--doc/classes/TextServer.xml15
-rw-r--r--doc/classes/TextServerExtension.xml16
6 files changed, 75 insertions, 160 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index a7b2434def..44845947b1 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -115,7 +115,7 @@
<argument index="4" name="outline" type="float" default="0.0" />
<argument index="5" name="pixel_range" type="float" default="4.0" />
<description>
- Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [method FontData.set_multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
+ Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontData.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
</description>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 0c8386784e..36976f7083 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -79,12 +79,6 @@
Returns text server font cache entry resource id.
</description>
</method>
- <method name="get_data" qualifiers="const">
- <return type="PackedByteArray" />
- <description>
- Returns contents of the dynamic font source file.
- </description>
- </method>
<method name="get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
@@ -93,30 +87,6 @@
Returns font descent (number of pixels below the baseline).
</description>
</method>
- <method name="get_fixed_size" qualifiers="const">
- <return type="int" />
- <description>
- Returns font fixed size.
- </description>
- </method>
- <method name="get_font_name" qualifiers="const">
- <return type="String" />
- <description>
- Returns font family name.
- </description>
- </method>
- <method name="get_font_style" qualifiers="const">
- <return type="int" />
- <description>
- Returns font style flags, see [enum TextServer.FontStyle].
- </description>
- </method>
- <method name="get_font_style_name" qualifiers="const">
- <return type="String" />
- <description>
- Returns font style name.
- </description>
- </method>
<method name="get_glyph_advance" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="cache_index" type="int" />
@@ -180,12 +150,6 @@
Returns rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="get_hinting" qualifiers="const">
- <return type="int" enum="TextServer.Hinting" />
- <description>
- Returns the font hinting mode. Used by dynamic fonts only.
- </description>
- </method>
<method name="get_kerning" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="cache_index" type="int" />
@@ -216,24 +180,6 @@
Returns list of language support overrides.
</description>
</method>
- <method name="get_msdf_pixel_range" qualifiers="const">
- <return type="int" />
- <description>
- Returns the width of the range around the shape between the minimum and maximum representable signed distance.
- </description>
- </method>
- <method name="get_msdf_size" qualifiers="const">
- <return type="int" />
- <description>
- Returns source font size used to generate MSDF textures.
- </description>
- </method>
- <method name="get_oversampling" qualifiers="const">
- <return type="float" />
- <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="get_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="cache_index" type="int" />
@@ -346,18 +292,6 @@
Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="is_antialiased" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
- </description>
- </method>
- <method name="is_force_autohinter" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
- </description>
- </method>
<method name="is_language_supported" qualifiers="const">
<return type="bool" />
<argument index="0" name="language" type="String" />
@@ -365,12 +299,6 @@
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="is_multichannel_signed_distance_field" qualifiers="const">
- <return type="bool" />
- <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="is_script_supported" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -455,13 +383,6 @@
Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="set_antialiased">
- <return type="void" />
- <argument index="0" 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="set_ascent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -471,13 +392,6 @@
Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="set_data">
- <return type="void" />
- <argument index="0" name="data" type="PackedByteArray" />
- <description>
- Sets font source data, e.g contents of the dynamic font source file.
- </description>
- </method>
<method name="set_descent">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -487,41 +401,6 @@
Sets the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="set_fixed_size">
- <return type="void" />
- <argument index="0" name="fixed_size" type="int" />
- <description>
- Sets the fixed size for the font.
- </description>
- </method>
- <method name="set_font_name">
- <return type="void" />
- <argument index="0" name="name" type="String" />
- <description>
- Sets the font family name.
- </description>
- </method>
- <method name="set_font_style">
- <return type="void" />
- <argument index="0" name="style" type="int" />
- <description>
- Sets the font style flags, see [enum TextServer.FontStyle].
- </description>
- </method>
- <method name="set_font_style_name">
- <return type="void" />
- <argument index="0" name="name" type="String" />
- <description>
- Sets the font style name.
- </description>
- </method>
- <method name="set_force_autohinter">
- <return type="void" />
- <argument index="0" name="force_autohinter" type="bool" />
- <description>
- If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
- </description>
- </method>
<method name="set_glyph_advance">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -573,13 +452,6 @@
Sets rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="set_hinting">
- <return type="void" />
- <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" />
- <description>
- Sets font hinting mode. Used by dynamic fonts only.
- </description>
- </method>
<method name="set_kerning">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -598,35 +470,6 @@
Adds override for [method is_language_supported].
</description>
</method>
- <method name="set_msdf_pixel_range">
- <return type="void" />
- <argument index="0" 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="set_msdf_size">
- <return type="void" />
- <argument index="0" name="msdf_size" type="int" />
- <description>
- Sets source font size used to generate MSDF textures.
- </description>
- </method>
- <method name="set_multichannel_signed_distance_field">
- <return type="void" />
- <argument index="0" name="msdf" type="bool" />
- <description>
- If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
- [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
- </description>
- </method>
- <method name="set_oversampling">
- <return type="void" />
- <argument index="0" 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="set_scale">
<return type="void" />
<argument index="0" name="cache_index" type="int" />
@@ -701,4 +544,45 @@
</description>
</method>
</methods>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
+ If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ </member>
+ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
+ Contents of the dynamic font source file.
+ </member>
+ <member name="fixed_size" type="int" setter="set_fixed_size" getter="get_fixed_size" default="0">
+ Font size, used only for the bitmap fonts.
+ </member>
+ <member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
+ Font family name.
+ </member>
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" default="0">
+ Font style flags, see [enum TextServer.FontStyle].
+ </member>
+ <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 preffered over font built-in hinting. Used by dynamic fonts only.
+ </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>
+ <member name="msdf_pixel_range" type="int" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="16">
+ The width of the range around the shape between the minimum and maximum representable signed distance.
+ </member>
+ <member name="msdf_size" type="int" setter="set_msdf_size" getter="get_msdf_size" default="48">
+ Source font size used to generate MSDF textures.
+ </member>
+ <member name="multichannel_signed_distance_field" type="bool" setter="set_multichannel_signed_distance_field" getter="is_multichannel_signed_distance_field" default="false">
+ 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.
+ </member>
+ <member name="opentype_feature_overrides" type="Dictionary" setter="set_opentype_feature_overrides" getter="get_opentype_feature_overrides" default="{}">
+ Font OpenType feature set override.
+ </member>
+ <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0">
+ Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </member>
+ <member name="style_name" type="String" setter="set_font_style_name" getter="get_font_style_name" default="&quot;&quot;">
+ Font style name.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index c3e3088d69..b376ab5cb0 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -174,7 +174,7 @@
<member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false">
If [code]true[/code], the [LineEdit] will always show the caret, even if focus is lost.
</member>
- <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
+ <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="true">
Allow moving caret, selecting and removing the individual composite character components.
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 26ad20e85b..e120f79236 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -942,7 +942,7 @@
<member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65">
Duration (in seconds) of a caret's blinking cycle.
</member>
- <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
+ <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="true">
Allow moving caret, selecting and removing the individual composite character components.
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 443716435a..64989eb98b 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -261,6 +261,13 @@
Returns font family name.
</description>
</method>
+ <method name="font_get_opentype_feature_overrides" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font OpenType feature set override.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -663,6 +670,14 @@
Sets the font family name.
</description>
</method>
+ <method name="font_set_opentype_feature_overrides">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="overrides" type="Dictionary" />
+ <description>
+ Sets font OpenType feature set override.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index fb4ac630ba..aa6c93456b 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -261,6 +261,13 @@
Returns font family name.
</description>
</method>
+ <method name="_font_get_opentype_feature_overrides" qualifiers="virtual const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font OpenType feature set override.
+ </description>
+ </method>
<method name="_font_get_oversampling" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -550,6 +557,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="force_autohinter" type="bool" />
<description>
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
</description>
</method>
<method name="_font_set_global_oversampling" qualifiers="virtual">
@@ -670,6 +678,14 @@
Sets the font family name.
</description>
</method>
+ <method name="_font_set_opentype_feature_overrides" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="overrides" type="Dictionary" />
+ <description>
+ Sets font OpenType feature set override.
+ </description>
+ </method>
<method name="_font_set_oversampling" qualifiers="virtual">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />