summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <fire@users.noreply.github.com>2021-08-27 08:51:37 -0700
committerGitHub <noreply@github.com>2021-08-27 08:51:37 -0700
commit90a35dac489bcbe39de35af661367519b411cb98 (patch)
tree8b6b4535556be521f9fbbadaebdea04e5316582c /doc
parentca4f20529c0b6588464f88fc0b0680a8df0fc77f (diff)
parent4c3f7d1290311456519ca2416590c7e62465b7f2 (diff)
Merge pull request #51908 from bruvzg/msdf_fonts2
Make FontData importable resource. Add multi-channel SDF font rendering.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/CanvasItem.xml14
-rw-r--r--doc/classes/Font.xml40
-rw-r--r--doc/classes/FontData.xml587
-rw-r--r--doc/classes/TextParagraph.xml4
-rw-r--r--doc/classes/TextServer.xml651
-rw-r--r--doc/classes/TreeItem.xml17
6 files changed, 980 insertions, 333 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 2c92ce0185..4641bc52a4 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -106,6 +106,20 @@
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
+ <method name="draw_msdf_texture_rect_region">
+ <return type="void" />
+ <argument index="0" name="texture" type="Texture2D" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="src_rect" type="Rect2" />
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <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.
+ 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>
+ </method>
<method name="draw_multiline">
<return type="void" />
<argument index="0" name="points" type="PackedVector2Array" />
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 06dcaca846..aa70856e32 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -70,6 +70,12 @@
Add font data source to the set.
</description>
</method>
+ <method name="clear_data">
+ <return type="void" />
+ <description>
+ Removes all font data sourcers for the set.
+ </description>
+ </method>
<method name="draw_char" qualifiers="const">
<return type="float" />
<argument index="0" name="canvas_item" type="RID" />
@@ -151,6 +157,13 @@
Returns the number of font data sources.
</description>
</method>
+ <method name="get_data_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ Returns TextServer RID of the font data resources.
+ </description>
+ </method>
<method name="get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="size" type="int" default="-1" />
@@ -180,15 +193,18 @@
</method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]).
</description>
</method>
<method name="get_string_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="size" type="int" default="-1" />
+ <argument index="2" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="width" type="float" default="-1" />
+ <argument index="4" name="flags" type="int" default="3" />
<description>
Returns the size of a bounding box of a string, taking kerning and advance into account.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
@@ -242,10 +258,10 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<argument index="1" name="value" type="int" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
<method name="update_changes">
@@ -256,19 +272,19 @@
</method>
</methods>
<members>
- <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="base_size" type="int" setter="set_base_size" getter="get_base_size" default="16">
+ Default font size.
+ </member>
+ <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the bottom of the line in pixels.
</member>
- <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the top of the line in pixels.
</member>
+ <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}">
+ Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url].
+ </member>
</members>
<constants>
- <constant name="SPACING_TOP" value="0" enum="SpacingType">
- Spacing at the top of the line.
- </constant>
- <constant name="SPACING_BOTTOM" value="1" enum="SpacingType">
- Spacing at the bottom of the line.
- </constant>
</constants>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 7a845a698f..72af7ca485 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -1,122 +1,179 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FontData" inherits="Resource" version="4.0">
<brief_description>
- Font data source, file or memory buffer.
+ Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ Supported font formats:
+ - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm).
+ - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
+ - Monospace image font importer: All supported image formats.
</brief_description>
<description>
- Built-in text servers support font data sources of the following formats:
- - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited.
- - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="bitmap_add_char">
+ <method name="clear_cache">
<return type="void" />
- <argument index="0" name="char" type="int" />
- <argument index="1" name="texture_idx" type="int" />
- <argument index="2" name="rect" type="Rect2" />
- <argument index="3" name="align" type="Vector2" />
- <argument index="4" name="advance" type="float" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all font cache entries.
</description>
</method>
- <method name="bitmap_add_kerning_pair">
+ <method name="clear_glyphs">
<return type="void" />
- <argument index="0" name="A" type="int" />
- <argument index="1" name="B" type="int" />
- <argument index="2" name="kerning" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="bitmap_add_texture">
+ <method name="clear_kerning_map">
<return type="void" />
- <argument index="0" name="texture" type="Texture" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a texture to the bitmap font.
+ Removes all kerning overrides.
</description>
</method>
- <method name="draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="index" type="int" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Removes all font sizes from the cache entry
</description>
</method>
- <method name="draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="outline_size" type="int" />
- <argument index="3" name="pos" type="Vector2" />
- <argument index="4" name="index" type="int" />
- <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_textures">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
+ </description>
+ </method>
+ <method name="find_cache" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="variation_coordinates" type="Dictionary" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn.
- Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support).
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns existing or creates a new font cache entry for the specified variation coordinates.
</description>
</method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="get_base_size" qualifiers="const">
- <return type="float" />
+ <method name="get_cache_count" qualifiers="const">
+ <return type="int" />
<description>
- Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts).
+ Returns number of the font cache entries.
+ </description>
+ </method>
+ <method name="get_cache_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ 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="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns the font descent (number of pixels below the baseline).
+ Returns font descent (number of pixels below the baseline).
</description>
</method>
<method name="get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="get_glyph_index" qualifiers="const">
<return type="int" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="variation_selector" type="int" default="0" />
+ <argument index="1" name="variation_selector" type="int" />
+ <argument index="2" name="arg2" type="int" />
<description>
- Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="get_glyph_kerning" qualifiers="const">
+ <method name="get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index_a" type="int" />
- <argument index="1" name="index_b" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_glyph_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns glyph size.
+ </description>
+ </method>
+ <method name="get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ 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" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="get_language_support_override" qualifiers="const">
@@ -132,6 +189,32 @@
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" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="get_script_support_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -145,11 +228,20 @@
Returns list of script support overrides.
</description>
</method>
+ <method name="get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ </description>
+ </method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="arg2" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="get_supported_chars" qualifiers="const">
@@ -158,32 +250,66 @@
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns list of OpenType features supported by font.
</description>
</method>
- <method name="get_underline_thickness" qualifiers="const">
+ <method name="get_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
+ <method name="get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns number of textures used by font cache entry.
+ </description>
+ </method>
+ <method name="get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the font cache texture image.
+ </description>
+ </method>
+ <method name="get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="get_variation" qualifiers="const">
+ <method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="tag" type="String" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="get_variation_list" qualifiers="const">
+ <method name="get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
<method name="has_char" qualifiers="const">
@@ -193,10 +319,16 @@
Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="has_outline" qualifiers="const">
+ <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 font supports drawing glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
@@ -206,6 +338,12 @@
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" />
@@ -213,32 +351,29 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
- <method name="load_memory">
+ <method name="remove_cache">
<return type="void" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Creates new font from the data in memory.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified font cache entry.
</description>
</method>
- <method name="load_resource">
+ <method name="remove_glyph">
<return type="void" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Creates new font from the file.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="new_bitmap">
+ <method name="remove_kerning">
<return type="void" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
<description>
- Creates new, empty bitmap font.
+ Removes kerning override for the pair of glyphs.
</description>
</method>
<method name="remove_language_support_override">
@@ -255,6 +390,148 @@
Removes script support override.
</description>
</method>
+ <method name="remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="remove_texture">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
+ </description>
+ </method>
+ <method name="render_glyph">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="render_range">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ 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" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ 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" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </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 preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
+ <description>
+ Sets glyph size.
+ </description>
+ </method>
+ <method name="set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ 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" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
+ </description>
+ </method>
<method name="set_language_support_override">
<return type="void" />
<argument index="0" name="language" type="String" />
@@ -263,6 +540,43 @@
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 generated from the dynamic font vector data.
+ </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" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="set_script_support_override">
<return type="void" />
<argument index="0" name="script" type="String" />
@@ -273,52 +587,61 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="arg3" type="int" />
+ <description>
+ Sets extra spacing added between glyphs in pixels.
+ </description>
+ </method>
+ <method name="set_texture_image">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
+ <description>
+ Sets font cache texture image.
+ </description>
+ </method>
+ <method name="set_texture_offsets">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
+ </description>
+ </method>
+ <method name="set_underline_position">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets thickness of the underline in pixels.
</description>
</method>
- <method name="set_variation">
+ <method name="set_variation_coordinates">
<return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinate [code]tag[/code].
+ Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
</methods>
- <members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
- If [code]true[/code], the font is rendered with anti-aliasing.
- </member>
- <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default="&quot;&quot;">
- The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code].
- </member>
- <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false">
- If [code]true[/code], distance field hint is enabled.
- </member>
- <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for each glyph in pixels.
- This can be a negative number to make the distance between glyphs smaller.
- </member>
- <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for the space character in pixels.
- This can be a negative number to make the distance between words smaller.
- </member>
- <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false">
- If [code]true[/code], default autohinter is used for font hinting.
- </member>
- <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0">
- The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options.
- </member>
- </members>
<constants>
- <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
- Spacing for each glyph.
- </constant>
- <constant name="SPACING_SPACE" value="1" enum="SpacingType">
- Spacing for the space character.
- </constant>
</constants>
</class>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index fb94e14c8d..aa35acdbd2 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -220,13 +220,13 @@
<method name="get_spacing_bottom" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom].
+ Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom].
</description>
</method>
<method name="get_spacing_top" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the top of the line. See [member Font.extra_spacing_top].
+ Returns extra spacing at the top of the line. See [member Font.spacing_top].
</description>
</method>
<method name="hit_test" qualifiers="const">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index ac56be4392..b32168ebc5 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -9,42 +9,10 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_font_bitmap">
+ <method name="create_font">
<return type="RID" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
<description>
- Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method.
- </description>
- </method>
- <method name="create_font_memory">
- <return type="RID" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the data in memory. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_resource">
- <return type="RID" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the file. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_system">
- <return type="RID" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the system font. To free the resulting font, use [method free_rid] method.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
</description>
</method>
<method name="create_shaped_text">
@@ -68,52 +36,53 @@
Draws box displaying character hexadecimal code. Used for replacing missing characters.
</description>
</method>
- <method name="font_bitmap_add_char">
+ <method name="font_clear_glyphs">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="texture_idx" type="int" />
- <argument index="3" name="rect" type="Rect2" />
- <argument index="4" name="align" type="Vector2" />
- <argument index="5" name="advance" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
</description>
</method>
- <method name="font_bitmap_add_kerning_pair">
+ <method name="font_clear_kerning_map">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="A" type="int" />
- <argument index="2" name="B" type="int" />
- <argument index="3" name="kerning" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all kerning overrides.
</description>
</method>
- <method name="font_bitmap_add_texture">
+ <method name="font_clear_size_cache">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="texture" type="Texture" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Removes all font sizes from the cache entry
+ </description>
+ </method>
+ <method name="font_clear_textures">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a texture to the bitmap font.
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
</description>
</method>
<method name="font_draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="pos" type="Vector2" />
<argument index="4" name="index" type="int" />
<argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
<method name="font_draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="outline_size" type="int" />
@@ -121,68 +90,46 @@
<argument index="5" name="index" type="int" />
<argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ 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].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
- <method name="font_get_antialiased" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if font anti-aliasing is supported and enabled.
- </description>
- </method>
<method name="font_get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_get_base_size" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns the default size of the font.
- </description>
- </method>
<method name="font_get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_get_distance_field_hint" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if distance field hint is enabled.
- </description>
- </method>
- <method name="font_get_feature_list" qualifiers="const">
- <return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_fixed_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of OpenType features supported by font.
+ Returns bitmap font fixed size.
</description>
</method>
- <method name="font_get_force_autohinter" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_global_oversampling" qualifiers="const">
+ <return type="float" />
<description>
- Returns [code]true[/code], if autohinter is supported and enabled.
+ Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
<method name="font_get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="font_get_glyph_contours" qualifiers="const">
@@ -191,7 +138,7 @@
<argument index="1" name="size" type="int" />
<argument index="2" name="index" type="int" />
<description>
- Returns outline contours of the glyph in a Dictionary.
+ Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
[code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
@@ -199,41 +146,85 @@
</method>
<method name="font_get_glyph_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="variation_selector" type="int" default="0" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="char" type="int" />
+ <argument index="3" name="variation_selector" type="int" />
<description>
Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="font_get_glyph_kerning" qualifiers="const">
+ <method name="font_get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="font_get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index_a" type="int" />
- <argument index="2" name="index_b" type="int" />
- <argument index="3" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="font_get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_glyph_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 the total font height (ascent plus descent) in pixels.
+ Returns size of the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_get_hinting" qualifiers="const">
<return type="int" enum="TextServer.Hinting" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font hinting.
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_get_kerning" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="font_get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="font_get_language_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]language[/code].
@@ -241,20 +232,43 @@
</method>
<method name="font_get_language_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of language support overrides.
</description>
</method>
+ <method name="font_get_msdf_pixel_range" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="font_get_msdf_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font oversampling factor, shared by all fonts in the TextServer.
+ 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="font_get_scale" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
</description>
</method>
<method name="font_get_script_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]script[/code].
@@ -262,98 +276,149 @@
</method>
<method name="font_get_script_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of script support overrides.
</description>
</method>
- <method name="font_get_spacing_glyph" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns extra spacing for each glyph in pixels.
+ Return 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_spacing_space" qualifiers="const">
+ <method name="font_get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Sets extra spacing for each glyph in pixels.
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="font_get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns number of textures used by font cache entry.
</description>
</method>
- <method name="font_get_underline_thickness" qualifiers="const">
+ <method name="font_get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns font cache texture image data.
+ </description>
+ </method>
+ <method name="font_get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_get_variation" qualifiers="const">
+ <method name="font_get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="font_get_variation_list" qualifiers="const">
+ <method name="font_get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
<method name="font_has_char" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if [code]char[/code] is available in the font.
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="font_has_outline" qualifiers="const">
+ <method name="font_is_antialiased" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument 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" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code], if font supports glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="font_is_language_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
- Returns [code]true[/code], if font supports given language (ISO 639 code).
+ 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="font_is_multichannel_signed_distance_field" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <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="font_is_script_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
+ <method name="font_remove_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
+ </description>
+ </method>
+ <method name="font_remove_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Removes kerning override for the pair of glyphs.
+ </description>
+ </method>
<method name="font_remove_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Remove language support override.
@@ -361,92 +426,299 @@
</method>
<method name="font_remove_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Removes script support override.
</description>
</method>
+ <method name="font_remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="font_remove_texture">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
+ </description>
+ </method>
+ <method name="font_render_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="font_render_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
<method name="font_set_antialiased">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="antialiased" type="bool" />
<description>
- Sets font anti-aliasing.
+ 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="font_set_distance_field_hint">
+ <method name="font_set_ascent">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="distance_field" type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="font_set_data">
+ <return type="void" />
+ <argument index="0" name="data" type="RID" />
+ <argument index="1" name="arg1" type="PackedByteArray" />
<description>
- Sets font distance field hint.
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="font_set_descent">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="font_set_fixed_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="fixed_size" type="int" />
+ <description>
+ Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
<method name="font_set_force_autohinter">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="enabeld" type="bool" />
+ <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">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets oversampling factor, shared by all font in the TextServer.
+ Note: This value can be automaticaly changed by display server.
+ </description>
+ </method>
+ <method name="font_set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="font_set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="font_set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="size" type="Vector2" />
<description>
- Enables/disables default autohinter.
+ Sets size of the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_set_hinting">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" />
<description>
- Sets font hinting.
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_set_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
</description>
</method>
<method name="font_set_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_language_supported].
</description>
</method>
+ <method name="font_set_msdf_pixel_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" 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="font_set_msdf_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="font_set_multichannel_signed_distance_field">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf" type="bool" />
+ <description>
+ 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.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
- <argument index="0" name="oversampling" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="oversampling" type="float" />
<description>
- Sets oversampling factor, shared by all font in the TextServer.
+ 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="font_set_scale">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
</description>
</method>
<method name="font_set_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_spacing_glyph">
+ <method name="font_set_spacing">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="value" type="int" />
<description>
- Returns extra spacing for the space character in pixels.
+ Sets extra spacing added between glyphs in pixels.
</description>
</method>
- <method name="font_set_spacing_space">
+ <method name="font_set_texture_image">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
<description>
- Sets extra spacing for the space character in pixels.
+ Sets font cache texture image data.
</description>
</method>
- <method name="font_set_variation">
+ <method name="font_set_texture_offsets">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_set_underline_position">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="font_set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
+ <description>
+ Sets thickness of the underline in pixels.
+ </description>
+ </method>
+ <method name="font_set_variation_coordinates">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <description>
+ Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
+ </description>
+ </method>
+ <method name="font_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="font_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored.
</description>
</method>
<method name="format_number" qualifiers="const">
@@ -478,13 +750,6 @@
Returns the name of the server interface.
</description>
</method>
- <method name="get_system_fonts" qualifiers="const">
- <return type="PackedStringArray" />
- <description>
- Returns list of available system fonts.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- </description>
- </method>
<method name="has">
<return type="bool" />
<argument index="0" name="rid" type="RID" />
@@ -514,7 +779,7 @@
Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect.
</description>
</method>
- <method name="name_to_tag">
+ <method name="name_to_tag" qualifiers="const">
<return type="int" />
<argument index="0" name="name" type="String" />
<description>
@@ -890,7 +1155,7 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
- <method name="tag_to_name">
+ <method name="tag_to_name" qualifiers="const">
<return type="String" />
<argument index="0" name="tag" type="int" />
<description>
@@ -1023,5 +1288,17 @@
<constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
</constant>
+ <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
+ Spacing for each glyph.
+ </constant>
+ <constant name="SPACING_SPACE" value="1" enum="SpacingType">
+ Spacing for the space character.
+ </constant>
+ <constant name="SPACING_TOP" value="2" enum="SpacingType">
+ Spacing at the top of the line.
+ </constant>
+ <constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
+ Spacing at the bottom of the line.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 406c074758..b997d87ac0 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -140,6 +140,14 @@
<return type="Font" />
<argument index="0" name="column" type="int" />
<description>
+ Returns custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="get_custom_font_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <description>
+ Returns custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="get_expand_right" qualifiers="const">
@@ -464,6 +472,15 @@
<argument index="0" name="column" type="int" />
<argument index="1" name="font" type="Font" />
<description>
+ Sets custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="set_custom_font_size">
+ <return type="void" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="font_size" type="int" />
+ <description>
+ Sets custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="set_editable">