summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml32
-rw-r--r--doc/classes/Animation.xml7
-rw-r--r--doc/classes/DisplayServer.xml1
-rw-r--r--doc/classes/FileAccess.xml14
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/FontFile.xml9
-rw-r--r--doc/classes/OS.xml30
-rw-r--r--doc/classes/SystemFont.xml15
-rw-r--r--doc/classes/TextServer.xml48
-rw-r--r--doc/classes/TextServerExtension.xml44
10 files changed, 182 insertions, 30 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 33afe38446..977bcb78e9 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2877,40 +2877,38 @@
</constant>
<constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="16384" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="32768" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="65536" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="131072" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="262144" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNAL" value="262144" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
- </constant>
- <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags">
If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate].
</constant>
- <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags">
The property is only shown in the editor if modern renderers are supported (GLES3 is excluded).
</constant>
- <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="8388608" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="16777216" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="33554432" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="67108864" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags">
The property is read-only in the [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ARRAY" value="268435456" enum="PropertyUsageFlags">
The property is an array.
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 58681090b4..d9a1f896f1 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -596,15 +596,12 @@
[b]Note:[/b] The result value is always normalized and may not match the key value.
</constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
- Update between keyframes.
+ Update between keyframes and hold the value.
</constant>
<constant name="UPDATE_DISCRETE" value="1" enum="UpdateMode">
- Update at the keyframes and hold the value.
- </constant>
- <constant name="UPDATE_TRIGGER" value="2" enum="UpdateMode">
Update at the keyframes.
</constant>
- <constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode">
+ <constant name="UPDATE_CAPTURE" value="2" enum="UpdateMode">
Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
</constant>
<constant name="LOOP_NONE" value="0" enum="LoopMode">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 0039301bf6..c59bfbfe4f 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1715,6 +1715,7 @@
<constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
Display handle:
- Linux (X11): [code]X11::Display*[/code] for the display.
+ - Android: [code]EGLDisplay[/code] for the display.
</constant>
<constant name="WINDOW_HANDLE" value="1" enum="HandleType">
Window handle:
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index e52f897164..be0c8fd6ca 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -153,6 +153,20 @@
Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [enum Error].
</description>
</method>
+ <method name="get_file_as_bytes" qualifiers="static">
+ <return type="PackedByteArray" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns the whole [param path] file contents as a [PackedByteArray] without any decoding.
+ </description>
+ </method>
+ <method name="get_file_as_string" qualifiers="static">
+ <return type="String" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns the whole [param path] file contents as a [String]. Text is interpreted as being UTF-8 encoded.
+ </description>
+ </method>
<method name="get_float" qualifiers="const">
<return type="float" />
<description>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 6a42b62bcf..761e75339a 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -161,6 +161,12 @@
Returns font family name.
</description>
</method>
+ <method name="get_font_stretch" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </description>
+ </method>
<method name="get_font_style" qualifiers="const">
<return type="int" enum="TextServer.FontStyle" />
<description>
@@ -173,6 +179,12 @@
Returns font style name.
</description>
</method>
+ <method name="get_font_weight" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </description>
+ </method>
<method name="get_height" qualifiers="const">
<return type="float" />
<param index="0" name="font_size" type="int" default="16" />
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index 271f6a13e0..1019c271dc 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -542,6 +542,9 @@
</method>
</methods>
<members>
+ <member name="allow_system_fallback" type="bool" setter="set_allow_system_fallback" getter="is_allow_system_fallback" default="true">
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </member>
<member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
Font anti-aliasing mode.
</member>
@@ -557,9 +560,15 @@
<member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
Font family name.
</member>
+ <member name="font_stretch" type="int" setter="set_font_stretch" getter="get_font_stretch" default="100">
+ Font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </member>
<member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
Font style flags, see [enum TextServer.FontStyle].
</member>
+ <member name="font_weight" type="int" setter="set_font_weight" getter="get_font_weight" default="400">
+ Weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </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 preferred over font built-in hinting. Used by dynamic fonts only.
</member>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 610f77e3d8..0efc6ab399 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -394,18 +394,38 @@
<method name="get_system_font_path" qualifiers="const">
<return type="String" />
<param index="0" name="font_name" type="String" />
- <param index="1" name="bold" type="bool" default="false" />
- <param index="2" name="italic" type="bool" default="false" />
+ <param index="1" name="weight" type="int" default="400" />
+ <param index="2" name="stretch" type="int" default="100" />
+ <param index="3" name="italic" type="bool" default="false" />
<description>
- Returns path to the system font file with [param font_name] and style. Return empty string if no matching fonts found.
- [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ Returns path to the system font file with [param font_name] and style. Returns empty string if no matching fonts found.
+ The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy".
+ [b]Note:[/b] Returned font might have different style if the requested style is not available.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ </description>
+ </method>
+ <method name="get_system_font_path_for_text" qualifiers="const">
+ <return type="PackedStringArray" />
+ <param index="0" name="font_name" type="String" />
+ <param index="1" name="text" type="String" />
+ <param index="2" name="locale" type="String" default="&quot;&quot;" />
+ <param index="3" name="script" type="String" default="&quot;&quot;" />
+ <param index="4" name="weight" type="int" default="400" />
+ <param index="5" name="stretch" type="int" default="100" />
+ <param index="6" name="italic" type="bool" default="false" />
+ <description>
+ Returns an array of the system substitute font file paths, which are similar to the font with [param font_name] and style for the specified text, locale and script. Returns empty array if no matching fonts found.
+ The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy".
+ [b]Note:[/b] Depending on OS, it's not guaranteed that any of the returned fonts is suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used.
+ [b]Note:[/b] Returned fonts might have different style if the requested style is not available or belong to a different font family.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_system_fonts" qualifiers="const">
<return type="PackedStringArray" />
<description>
Returns list of font family names available.
- [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_thread_caller_id" qualifiers="const">
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
index b47d6ded7d..20bfd0d8ae 100644
--- a/doc/classes/SystemFont.xml
+++ b/doc/classes/SystemFont.xml
@@ -7,23 +7,32 @@
<description>
[SystemFont] loads a font from a system font with the first matching name from [member font_names].
It will attempt to match font style, but it's not guaranteed.
- The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
+ The returned font might be part of a font collection or be a variable font with OpenType "weight", "width" and/or "italic" features set.
You can create [FontVariation] of the system font for fine control over its features.
</description>
<tutorials>
</tutorials>
<members>
+ <member name="allow_system_fallback" type="bool" setter="set_allow_system_fallback" getter="is_allow_system_fallback" default="true">
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </member>
<member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
Font anti-aliasing mode.
</member>
<member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
Array of fallback [Font]s.
</member>
+ <member name="font_italic" type="bool" setter="set_font_italic" getter="get_font_italic" default="false">
+ If set to [code]true[/code], italic or oblique font is preferred.
+ </member>
<member name="font_names" type="PackedStringArray" setter="set_font_names" getter="get_font_names" default="PackedStringArray()">
Array of font family names to search, first matching font found is used.
</member>
- <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
- Font style flags, see [enum TextServer.FontStyle].
+ <member name="font_stretch" type="int" setter="set_font_stretch" getter="get_font_stretch" default="100">
+ Preferred font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </member>
+ <member name="font_weight" type="int" setter="set_font_weight" getter="get_font_weight" default="400">
+ Preferred weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
</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 preferred over font built-in hinting.
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index f4d92ab9b6..b3e55b5cd0 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -362,6 +362,13 @@
Returns 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_stretch" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </description>
+ </method>
<method name="font_get_style" qualifiers="const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
@@ -446,6 +453,13 @@
Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
+ <method name="font_get_weight" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </description>
+ </method>
<method name="font_has_char" qualifiers="const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -454,6 +468,13 @@
Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
+ <method name="font_is_allow_system_fallback" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
+ </description>
+ </method>
<method name="font_is_force_autohinter" qualifiers="const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -556,6 +577,14 @@
Renders the range of characters to the font cache texture.
</description>
</method>
+ <method name="font_set_allow_system_fallback">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="allow_system_fallback" type="bool" />
+ <description>
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </description>
+ </method>
<method name="font_set_antialiasing">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -783,12 +812,22 @@
Adds override for [method font_is_script_supported].
</description>
</method>
+ <method name="font_set_stretch">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.
+ </description>
+ </method>
<method name="font_set_style">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
Sets the font style flags, see [enum FontStyle].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.
</description>
</method>
<method name="font_set_style_name">
@@ -862,6 +901,15 @@
Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
+ <method name="font_set_weight">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ Sets weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.
+ </description>
+ </method>
<method name="font_supported_feature_list" qualifiers="const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 37d2698dd4..4c9817fcd4 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -9,6 +9,11 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_cleanup" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
<method name="_create_font" qualifiers="virtual">
<return type="RID" />
<description>
@@ -306,6 +311,12 @@
<description>
</description>
</method>
+ <method name="_font_get_stretch" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_get_style" qualifiers="virtual const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
@@ -379,6 +390,12 @@
<description>
</description>
</method>
+ <method name="_font_get_weight" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_has_char" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -386,6 +403,12 @@
<description>
</description>
</method>
+ <method name="_font_is_allow_system_fallback" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_is_force_autohinter" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -474,6 +497,13 @@
<description>
</description>
</method>
+ <method name="_font_set_allow_system_fallback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="allow_system_fallback" type="bool" />
+ <description>
+ </description>
+ </method>
<method name="_font_set_antialiasing" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -680,6 +710,13 @@
<description>
</description>
</method>
+ <method name="_font_set_stretch" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="stretch" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_font_set_style" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -749,6 +786,13 @@
<description>
</description>
</method>
+ <method name="_font_set_weight" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_font_supported_feature_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />