From 344ba0ffaf3f7d39bd5a1304ba6a6070d442a963 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 9 May 2022 12:47:10 +0300 Subject: Refactor Font configuration and import UI, and Font resources. --- doc/classes/Button.xml | 23 -- doc/classes/CanvasItem.xml | 76 ++++- doc/classes/Font.xml | 287 +++++++++-------- doc/classes/FontData.xml | 627 ------------------------------------ doc/classes/FontFile.xml | 595 ++++++++++++++++++++++++++++++++++ doc/classes/FontVariation.xml | 76 +++++ doc/classes/GraphNode.xml | 21 -- doc/classes/ItemList.xml | 24 -- doc/classes/Label.xml | 23 +- doc/classes/Label3D.xml | 25 +- doc/classes/LineEdit.xml | 21 -- doc/classes/LinkButton.xml | 23 -- doc/classes/PopupMenu.xml | 24 -- doc/classes/ProjectSettings.xml | 6 +- doc/classes/RichTextLabel.xml | 8 - doc/classes/TabBar.xml | 24 -- doc/classes/TextEdit.xml | 21 -- doc/classes/TextLine.xml | 9 +- doc/classes/TextMesh.xml | 25 +- doc/classes/TextParagraph.xml | 28 +- doc/classes/TextServer.xml | 38 ++- doc/classes/TextServerExtension.xml | 38 ++- doc/classes/Theme.xml | 11 +- doc/classes/Tree.xml | 24 -- doc/classes/TreeItem.xml | 24 -- 25 files changed, 941 insertions(+), 1160 deletions(-) delete mode 100644 doc/classes/FontData.xml create mode 100644 doc/classes/FontFile.xml create mode 100644 doc/classes/FontVariation.xml (limited to 'doc/classes') diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 1e0b685795..1cd9ca0afb 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -40,29 +40,6 @@ https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/677 - - - - - Removes all OpenType features. - - - - - - - Returns OpenType feature [code]tag[/code]. - - - - - - - - Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - - Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants. diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 98a498d719..acf08414d0 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -48,17 +48,26 @@ - + + + + + + + + Draws a string first character using a custom font. + + + + - - + + - - - Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character. + Draws a string first character outline using a custom font. @@ -127,7 +136,7 @@ - Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontData.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. + Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius. Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation. @@ -157,16 +166,34 @@ - - + + - - - + + + Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + + + + + + + + + + + + + + + + Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + + @@ -250,11 +277,11 @@ - + - - - + + + Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] @@ -279,6 +306,23 @@ See also [method Font.draw_string]. + + + + + + + + + + + + + + + Draws [code]text[/code] outline using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + + diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index dae42ddf34..b19386b398 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -1,93 +1,36 @@ - Font class is set of font data sources used to draw text. + Base class for fonts and font variations. - Font contains a set of glyphs to represent Unicode characters, as well as the ability to draw it with variable width, ascent, descent and kerning. - [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way. - [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. - [b]Note:[/b] If a non of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. - [codeblocks] - [gdscript] - var font = Font.new() - font.add_data(load("res://BarlowCondensed-Bold.ttf")) - $"Label".set("custom_fonts/font", font) - $"Label".set("custom_fonts/font_size", 64) - [/gdscript] - [csharp] - var font = new Font(); - font.AddData(ResourceLoader.Load<FontData>("res://BarlowCondensed-Bold.ttf")); - GetNode("Label").Set("custom_fonts/font", font); - GetNode("Label").Set("custom_font_sizes/font_size", 64); - [/csharp] - [/codeblocks] - To control font substitution priority use [FontData] language and script support. - Use language overrides to use same [Font] stack for multiple languages: - [codeblocks] - [gdscript] - # Use Naskh font for Persian and Nastaʼlīq font for Urdu text. - var font_data_fa = load("res://NotoNaskhArabicUI_Regular.ttf"); - font_data_fa.set_language_support_override("fa", true); - font_data_fa.set_language_support_override("ur", false); - - var font_data_ur = load("res://NotoNastaliqUrdu_Regular.ttf"); - font_data_ur.set_language_support_override("fa", false); - font_data_ur.set_language_support_override("ur", true); - [/gdscript] - [csharp] - // Use Naskh font for Persian and Nastaʼlīq font for Urdu text. - var fontDataFA = ResourceLoader.Load<FontData>("res://NotoNaskhArabicUI_Regular.ttf"); - fontDataFA.SetLanguageSupportOverride("fa", true); - fontDataFA.SetLanguageSupportOverride("ur", false); - - var fontDataUR = ResourceLoader.Load<FontData>("res://NotoNastaliqUrdu_Regular.ttf"); - fontDataUR.SetLanguageSupportOverride("fa", false); - fontDataUR.SetLanguageSupportOverride("ur", true); - [/csharp] - [/codeblocks] - Use script overrides to specify supported scripts for bitmap font or for less common scripts not directly supported by TrueType format: - [codeblocks] - [gdscript] - # Use specified font for Egyptian hieroglyphs. - var font_data = load("res://unifont.ttf"); - font_data.set_script_support_override("Egyp", true); - [/gdscript] - [csharp] - // Use specified font for Egyptian hieroglyphs. - var fontData = ResourceLoader.Load<FontData>("res://unifont.ttf"); - fontData.SetScriptSupportOverride("Egyp", true); - [/csharp] - [/codeblocks] + Font is the abstract base class for font, so it shouldn't be used directly. Other types of fonts inherit from it. - - - - - Add font data source to the set. - - - - + + + + + + + - Removes all font data sourcers for the set. + Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. - + - - - - - + + + - Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. @@ -98,17 +41,36 @@ - - + + - - - + + + Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string]. + + + + + + + + + + + + + + + + Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws text outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + See also [method CanvasItem.draw_multiline_string_outline]. + + @@ -116,19 +78,47 @@ - + - - - + + + Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_string]. + + + + + + + + + + + + + + + Draw [code]text[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + See also [method CanvasItem.draw_string_outline]. + + + + + + + + + + Returns [TextServer] RID of the font cache for specific variation. + + - + Returns the average font ascent (number of pixels above the baseline). [b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line). @@ -137,44 +127,53 @@ - - + Returns the size of a character, optionally taking kerning into account if the next character is provided. [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height. - - - + + + - Returns the font data source at index [code]idx[/code]. If the index does not exist, returns [code]null[/code]. + Returns the average font descent (number of pixels below the baseline). + [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). - + - Returns the number of font data sources. + Returns number of faces in the TrueType / OpenType collection. - - - + + - Returns TextServer RID of the font data resources. + Returns array of fallback [Font]s. - - - + + - Returns the average font descent (number of pixels below the baseline). - [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). + Returns font family name. + + + + + + Returns font style flags, see [enum TextServer.FontStyle]. + + + + + + Returns font style name. - + Returns the total average font height (ascent plus descent) in pixels. [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line). @@ -183,18 +182,28 @@ - - - + + + + + + + Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. See also [method draw_multiline_string]. + + + + Returns a set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. + + - + - Returns [Array] of valid [FontData] [RID]s, which can be passed to the [TextServer] methods. + Returns [Array] of valid [Font] [RID]s, which can be passed to the [TextServer] methods. @@ -207,10 +216,12 @@ - - - + + + + + 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]. @@ -224,9 +235,22 @@ If a given character is included in more than one font data source, it appears only once in the returned string. + + + + Returns list of OpenType features supported by font. + + + + + + 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 average pixel offset of the underline below the baseline. [b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. @@ -234,7 +258,7 @@ - + Returns average thickness of the underline. [b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. @@ -247,45 +271,34 @@ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. - - - + + + - Removes the font data source at index [code]idx[/code]. If the index does not exist, nothing happens. + Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). - - - - + + + - Sets the font data source at index [code]idx[/code]. If the index does not exist, nothing happens. + Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code). - + - - + + - Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets LRU cache capacity for [code]draw_*[/code] methods. - + + - After editing a font (changing data sources, etc.). Call this function to propagate changes to controls that might use it. + Sets array of fallback [Font]s. - - - Extra spacing at the bottom of the line in pixels. - - - Extra spacing at the top of the line in pixels. - - - Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url]. - - diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml deleted file mode 100644 index d32e7b3a94..0000000000 --- a/doc/classes/FontData.xml +++ /dev/null @@ -1,627 +0,0 @@ - - - - Font source data and prerendered glyph cache, imported from dynamic or bitmap font. - Supported font formats: - - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), 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. - - - - - - - - - - Removes all font cache entries. - - - - - - - - Removes all rendered glyphs information from the cache entry. - [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. - - - - - - - - Removes all kerning overrides. - - - - - - - Removes all font sizes from the cache entry - - - - - - - - Removes all textures from font cache entry. - [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually. - - - - - - - Returns existing or creates a new font cache entry for the specified variation coordinates. - - - - - - - - Returns the font ascent (number of pixels above the baseline). - - - - - - Returns number of the font cache entries. - - - - - - - Returns text server font cache entry resource id. - - - - - - - - Returns font descent (number of pixels below the baseline). - - - - - - Returns number of faces in the TrueType / OpenType collection. - - - - - - - - - Returns glyph advance (offset of the next glyph). - [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved. - - - - - - - - - Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. - - - - - - - - Returns list of rendered glyphs in the cache entry. - - - - - - - - - Returns glyph offset from the baseline. - - - - - - - - - Returns glyph size. - - - - - - - - - Returns index of the cache texture containing the glyph. - - - - - - - - - Returns rectangle in the cache texture containing the glyph. - - - - - - - - - Returns kerning for the pair of glyphs. - - - - - - - - Returns list of the kerning overrides. - - - - - - - Returns [code]true[/code] if support override is enabled for the [code]language[/code]. - - - - - - Returns list of language support overrides. - - - - - - - - Returns scaling factor of the color bitmap font. - - - - - - - Returns [code]true[/code] if support override is enabled for the [code]script[/code]. - - - - - - Returns list of script support overrides. - - - - - - - Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. - - - - - - - - - Returns extra spacing added between glyphs in pixels. - - - - - - Returns a string containing all the characters available in the font. - - - - - - Returns list of OpenType features supported by font. - - - - - - 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 number of textures used by font cache entry. - - - - - - - - - Returns a copy of the font cache texture image. - - - - - - - - - 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. - - - - - - - - Returns pixel offset of the underline below the baseline. - - - - - - - - Returns thickness of the underline in pixels. - - - - - - - Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. - - - - - - - Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. - - - - - - - Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). - - - - - - - Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code). - - - - - - - Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code]. - [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. - - - - - - - Loads a TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code]. - [b]Note:[/b] Use [member face_index] to select specific face from the collection file. - [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. - - - - - - - Removes specified font cache entry. - - - - - - - - - Removes specified rendered glyph information from the cache entry. - [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. - - - - - - - - - Removes kerning override for the pair of glyphs. - - - - - - - Remove language support override. - - - - - - - Removes script support override. - - - - - - - - Removes specified font size from the cache entry. - - - - - - - - - Removes specified texture from font cache entry. - [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph]. - - - - - - - - - Renders specified glyph the the font cache texture. - - - - - - - - - - Renders the range of characters to the font cache texture. - - - - - - - - - Sets the font ascent (number of pixels above the baseline). - - - - - - - - - Sets the font descent (number of pixels below the baseline). - - - - - - - - - - Sets glyph advance (offset of the next glyph). - [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved. - - - - - - - - - - Sets glyph offset from the baseline. - - - - - - - - - - Sets glyph size. - - - - - - - - - - Sets index of the cache texture containing the glyph. - - - - - - - - - - Sets rectangle in the cache texture containing the glyph. - - - - - - - - - - Sets kerning for the pair of glyphs. - - - - - - - - Adds override for [method is_language_supported]. - - - - - - - - - Sets scaling factor of the color bitmap font. - - - - - - - - Adds override for [method is_script_supported]. - - - - - - - - - - Sets extra spacing added between glyphs in pixels. - - - - - - - - - - Sets font cache texture image. - - - - - - - - - - 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). - - - - - - - - - Sets pixel offset of the underline below the baseline. - - - - - - - - - Sets thickness of the underline in pixels. - - - - - - - - Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. - - - - - - If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled. - - - Contents of the dynamic font source file. - - - If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. - - - Active face index in the TrueType / OpenType collection file. - - - Font size, used only for the bitmap fonts. - - - Font family name. - - - Font style flags, see [enum TextServer.FontStyle]. - - - If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. - - - If set to [code]true[/code], generate mipmaps for the font textures. - - - Font hinting mode. Used by dynamic fonts only. - - - The width of the range around the shape between the minimum and maximum representable signed distance. - - - Source font size used to generate MSDF textures. - - - 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. - - - Font OpenType feature set override. - - - Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. - - - Font style name. - - - Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. - - - 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. - For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code]. - - - diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml new file mode 100644 index 0000000000..98abc87b84 --- /dev/null +++ b/doc/classes/FontFile.xml @@ -0,0 +1,595 @@ + + + + FontFile source data and prerendered glyph cache, imported from dynamic or bitmap font. + + + [FontFile] contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback [Font]s to use. + Use [FontVariation] to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text. + For more complex text processing, use [FontVariation] in conjunction with [TextLine] or [TextParagraph]. + Supported font formats: + - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), 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. + [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way. + [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. + [b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. + + [codeblocks] + [gdscript] + var f = load("res://BarlowCondensed-Bold.ttf") + $"Label".set("custom_fonts/font", f) + $"Label".set("custom_fonts/font_size", 64) + [/gdscript] + [csharp] + var f = ResourceLoader.Load<FontFile>("res://BarlowCondensed-Bold.ttf"); + GetNode("Label").Set("custom_fonts/font", f); + GetNode("Label").Set("custom_font_sizes/font_size", 64); + [/csharp] + [/codeblocks] + + + + + + + + Removes all font cache entries. + + + + + + + + Removes all rendered glyphs information from the cache entry. + [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. + + + + + + + + Removes all kerning overrides. + + + + + + + Removes all font sizes from the cache entry + + + + + + + + Removes all textures from font cache entry. + [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually. + + + + + + + + Returns the font ascent (number of pixels above the baseline). + + + + + + Returns number of the font cache entries. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + + + + + + + Recturns an active face index in the TrueType / OpenType collection. + + + + + + + + + Returns glyph advance (offset of the next glyph). + [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved. + + + + + + + + + Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. + + + + + + + + Returns list of rendered glyphs in the cache entry. + + + + + + + + + Returns glyph offset from the baseline. + + + + + + + + + Returns glyph size. + + + + + + + + + Returns index of the cache texture containing the glyph. + + + + + + + + + Returns rectangle in the cache texture containing the glyph. + + + + + + + + + Returns kerning for the pair of glyphs. + + + + + + + + Returns list of the kerning overrides. + + + + + + + Returns [code]true[/code] if support override is enabled for the [code]language[/code]. + + + + + + Returns list of language support overrides. + + + + + + + Returns [code]true[/code] if support override is enabled for the [code]script[/code]. + + + + + + Returns list of script support overrides. + + + + + + + Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. + + + + + + + + Returns number of textures used by font cache entry. + + + + + + + + + Returns a copy of the font cache texture image. + + + + + + + + + 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. + + + + + + + Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + + + + + + + Returns variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info. + + + + + + + Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code]. + [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. + + + + + + + Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code]. + [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. + + + + + + + Removes specified font cache entry. + + + + + + + + + Removes specified rendered glyph information from the cache entry. + [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. + + + + + + + + + Removes kerning override for the pair of glyphs. + + + + + + + Remove language support override. + + + + + + + Removes script support override. + + + + + + + + Removes specified font size from the cache entry. + + + + + + + + + Removes specified texture from the cache entry. + [b]Note:[/b] This function will not remove glyphs associated with the texture. Remove them manually using [method remove_glyph]. + + + + + + + + + Renders specified glyph to the font cache texture. + + + + + + + + + + Renders the range of characters to the font cache texture. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + + + + + + + + Sets an active face index in the TrueType / OpenType collection. + + + + + + + + + + Sets glyph advance (offset of the next glyph). + [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved. + + + + + + + + + + Sets glyph offset from the baseline. + + + + + + + + + + Sets glyph size. + + + + + + + + + + Sets index of the cache texture containing the glyph. + + + + + + + + + + Sets rectangle in the cache texture containing the glyph. + + + + + + + + + + Sets kerning for the pair of glyphs. + + + + + + + + Adds override for [method Font.is_language_supported]. + + + + + + + + Adds override for [method Font.is_script_supported]. + + + + + + + + + + Sets font cache texture image. + + + + + + + + + + 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). + + + + + + + + Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + + + + + + + + Sets variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info. + + + + + + If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled. + + + Contents of the dynamic font source file. + + + Array of fallback [Font]s. + + + Font size, used only for the bitmap fonts. + + + Font family name. + + + Font style flags, see [enum TextServer.FontStyle]. + + + If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. + + + If set to [code]true[/code], generate mipmaps for the font textures. + + + Font hinting mode. Used by dynamic fonts only. + + + The width of the range around the shape between the minimum and maximum representable signed distance. + + + Source font size used to generate MSDF textures. + + + 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. + + + Font OpenType feature set override. + + + Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + + + Font style name. + + + Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. + + + diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml new file mode 100644 index 0000000000..a1b96fb137 --- /dev/null +++ b/doc/classes/FontVariation.xml @@ -0,0 +1,76 @@ + + + + Variation of the [Font]. + + + OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing. + + To use simulated bold font variant: + [codeblocks] + [gdscript] + var fv = FontVariation.new() + fv.set_base_font(load("res://BarlowCondensed-Regular.ttf")) + fv.set_variation_embolden(1.2); + $"Label".set("custom_fonts/font", fv) + $"Label".set("custom_fonts/font_size", 64) + [/gdscript] + [csharp] + var fv = new FontVariation(); + fv.SetBaseFont(ResourceLoader.Load<FontFile>("res://BarlowCondensed-Regular.ttf")); + fv.SetVariationEmbolden(1.2); + GetNode("Label").Set("custom_fonts/font", fv); + GetNode("Label").Set("custom_font_sizes/font_size", 64); + [/csharp] + [/codeblocks] + + + + + + + + + + Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + + + + + + Base font used to create a variation. If not set, default [Theme] font is used. + + + Array of fallback [Font]s. If not set [member base_font] fallback are ussed. + + + A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. + + + Extra spacing at the bottom of the line in pixels. + + + Extra spacing between graphical glyphs + + + Extra width of the space glyphs. + + + Extra spacing at the top of the line in pixels. + + + If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + [b]Note:[/b] Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and [TextMesh] from working correctly. + + + Active face index in the TrueType / OpenType collection file. + + + Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url]. + + + 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code]. + + + diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index f261da8413..36dbae1d74 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -17,12 +17,6 @@ Disables all input and output slots of the GraphNode. - - - - Removes all OpenType features. - - @@ -98,13 +92,6 @@ Returns the type of the output connection [code]idx[/code]. - - - - - Returns OpenType feature [code]tag[/code]. - - @@ -154,14 +141,6 @@ Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled. - - - - - - Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index d52234e9ac..15c97b0838 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -38,13 +38,6 @@ Removes all items from the list. - - - - - Removes all OpenType features from the item's text. - - @@ -122,14 +115,6 @@ Returns the metadata value of the specified index. - - - - - - Returns OpenType feature [code]tag[/code] of the item's text. - - @@ -302,15 +287,6 @@ Sets a value (of any type) to be stored with the item associated with the specified index. - - - - - - - Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index b5f045621b..1eac58b9f2 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -11,12 +11,6 @@ https://godotengine.org/asset-library/asset/515 - - - - Removes all OpenType features. - - @@ -32,13 +26,6 @@ If there're no lines returns font size in pixels. - - - - - Returns OpenType feature [code]tag[/code]. - - @@ -51,14 +38,6 @@ Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines. - - - - - - Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - @@ -119,7 +98,7 @@ Default text [Color] of the [Label]. - The tint of [Font]'s outline. + The tint of text outline. [Color] of the text's shadow effect. diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index 47126575f7..2c3c27079a 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -9,12 +9,6 @@ - - - - Removes all OpenType features. - - @@ -28,13 +22,6 @@ Returns the value of the specified flag. - - - - - Returns OpenType feature [code]tag[/code]. - - @@ -43,14 +30,6 @@ If [code]true[/code], the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags. - - - - - - Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - @@ -72,7 +51,7 @@ If [code]true[/code], the label is rendered at the same size regardless of distance. - [Font] used for the [Label3D]'s text. + Font configuration used to display text. Font size of the [Label3D]'s text. @@ -96,7 +75,7 @@ The text drawing offset (in pixels). - The tint of [Font]'s outline. + The tint of text outline. Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 55e012ee0c..84471bafc0 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -37,12 +37,6 @@ Erases the [LineEdit]'s [member text]. - - - - Removes all OpenType features. - - @@ -70,13 +64,6 @@ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. - - - - - Returns OpenType feature [code]tag[/code]. - - @@ -149,14 +136,6 @@ Selects the whole [String]. - - - - - - Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index ba80504caf..7c6ff2d4e1 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -9,29 +9,6 @@ - - - - - Removes all OpenType features. - - - - - - - Returns OpenType feature [code]tag[/code]. - - - - - - - - Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - - Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 73413b379e..5da2196f29 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -182,13 +182,6 @@ Removes all items from the [PopupMenu]. - - - - - Removes all OpenType features form the item's text. - - @@ -244,14 +237,6 @@ Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. - - - - - - Returns OpenType feature [code]tag[/code] of the item's text. - - @@ -452,15 +437,6 @@ Sets the state of a multistate item. See [method add_multistate_item] for details. - - - - - - - Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 553005c4c4..7c378f33fe 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -628,7 +628,7 @@ Path to a custom [Font] resource to use as default for all GUI elements of the project. - If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontData.antialiased]. + If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontFile.antialiased]. If set to [code]true[/code], the default font will have mipmaps generated. This prevents text from looking grainy when a [Control] is scaled down, or when a [Label3D] is viewed from a long distance (if [member Label3D.texture_filter] is set to a mode that displays mipmaps). @@ -636,7 +636,7 @@ [b]Note:[/b] This setting does not affect custom [Font]s used within the project. - Default font hinting mode. See [member FontData.hinting]. + Default font hinting mode. See [member FontFile.hinting]. If set to [code]true[/code], the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for [Control]s that are scaled down (or for [Label3D]s viewed from a long distance). @@ -644,7 +644,7 @@ [b]Note:[/b] This setting does not affect custom [Font]s used within the project. - Default font glyph sub-pixel positioning mode. See [member FontData.subpixel_positioning]. + Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning]. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 1294e5b58a..3c9e9b1bfc 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -276,18 +276,10 @@ Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration. - - - - - Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration. - - - Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration. diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index a8ed0d4286..79d52b70fb 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -17,13 +17,6 @@ Adds a new tab. - - - - - Removes all OpenType features from the tab title. - - @@ -77,14 +70,6 @@ Returns the number of hidden tabs offsetted to the left. - - - - - - Returns OpenType feature [code]tag[/code] of the tab title. - - @@ -175,15 +160,6 @@ Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. - - - - - - - Sets OpenType feature [code]tag[/code] for the tab title. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 62a1be030d..18a4893f03 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -85,12 +85,6 @@ Performs a full reset of [TextEdit], including undo history. - - - - Removes all OpenType features. - - @@ -355,13 +349,6 @@ Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3. - - - - - Returns OpenType feature [code]tag[/code]. - - @@ -859,14 +846,6 @@ Sets the text for [code]gutter[/code] on [code]line[/code]. - - - - - - Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index f154cbbe9a..c3574980b1 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -22,11 +22,10 @@ - - - - - + + + + Adds text span and font to draw it. diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml index 5a1501d2ca..17a0ca32e4 100644 --- a/doc/classes/TextMesh.xml +++ b/doc/classes/TextMesh.xml @@ -10,29 +10,6 @@ - - - - - Removes all OpenType features. - - - - - - - Returns OpenType feature [code]tag[/code]. - - - - - - - - Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. - - - Step (in pixels) used to approximate Bézier curves. @@ -41,7 +18,7 @@ Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only. - [Font] used for the [TextMesh]'s text. + Font configuration used to display text. Font size of the [TextMesh]'s text. diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index aaaacfe3ac..6d615bd404 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -22,11 +22,10 @@ - - - - - + + + + Adds text span and font to draw it. @@ -217,18 +216,6 @@ Returns the size of the bounding box of the paragraph. - - - - Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom]. - - - - - - Returns extra spacing at the top of the line. See [member Font.spacing_top]. - - @@ -256,11 +243,10 @@ - - + + - - + Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index ca1aec19ea..4c8cf3982e 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -355,15 +355,6 @@ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. - - - - - - - Returns extra spacing added between glyphs in pixels. - - @@ -542,7 +533,7 @@ - Removes specified texture from font cache entry. + Removes specified texture from the cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph]. @@ -792,16 +783,6 @@ Adds override for [method font_is_script_supported]. - - - - - - - - Sets extra spacing added between glyphs in pixels. - - @@ -1286,6 +1267,14 @@ Returns size of the text. + + + + + + Returns extra spacing added between glyphs or lines in pixels. + + @@ -1431,6 +1420,15 @@ If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. + + + + + + + Sets extra spacing added between glyphs or lines in pixels. + + diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index b3be858ca1..2f7b31b663 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -345,15 +345,6 @@ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. - - - - - - - Returns extra spacing added between glyphs in pixels. - - @@ -531,7 +522,7 @@ - Removes specified texture from font cache entry. + Removes specified texture from the cache entry. @@ -788,16 +779,6 @@ Adds override for [method font_is_script_supported]. - - - - - - - - Sets extra spacing added between glyphs in pixels. - - @@ -1288,6 +1269,14 @@ Returns size of the text. + + + + + + Returns extra spacing added between glyphs or lines in pixels. + + @@ -1436,6 +1425,15 @@ If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. + + + + + + + Sets extra spacing added between glyphs or lines in pixels. + + diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 5270da9588..7f4e0645c8 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -334,8 +334,8 @@ - Returns [code]true[/code] if the font size property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font size is set up (see [method has_default_font_size]). - Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property. + Returns [code]true[/code] if [member default_font_size] has a valid value. + Returns [code]false[/code] if it doesn't. The value must be greater than [code]0[/code] to be considered valid. @@ -426,8 +426,8 @@ - Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists. - Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property. + Returns [code]true[/code] if the font size property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font size is set up (see [method has_default_font_size]). + Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property. @@ -495,7 +495,8 @@ - Creates or changes the value of the font size property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font_size] to remove the property. + Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists. + Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 8a30364ebe..b06be0cf99 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -42,13 +42,6 @@ Clears the tree. This removes all items. - - - - - Removes all OpenType features from the item's text. - - @@ -114,14 +107,6 @@ Returns column title language code. - - - - - - Returns OpenType feature [code]tag[/code] of the column title. - - @@ -308,15 +293,6 @@ Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. - - - - - - - Sets OpenType feature [code]tag[/code] for the column title. - - diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 0a680b9627..804b8dddd9 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -42,13 +42,6 @@ Resets the color for the given column to default. - - - - - Removes all OpenType features. - - @@ -241,14 +234,6 @@ If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code]. - - - - - - Returns OpenType feature [code]tag[/code] of the item's text. - - @@ -580,15 +565,6 @@ Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data. - - - - - - - Sets OpenType feature [code]tag[/code] for the item's text. - - -- cgit v1.2.3