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.
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 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), OpenType (.otf), WOFF (.woff) 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 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.
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.
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].