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 contents of the dynamic font source file.
Returns font descent (number of pixels below the baseline).
Returns font fixed size.
Returns font family name.
Returns font style flags, see [enum TextServer.FontStyle].
Returns font style name.
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 the font hinting mode. Used by dynamic fonts only.
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 the width of the range around the shape between the minimum and maximum representable signed distance.
Returns source font size used to generate MSDF textures.
Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
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 8-bit anitialiased glyph rendering is supported and enabled.
Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
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 glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
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.
If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
Sets the font ascent (number of pixels above the baseline).
Sets font source data, e.g contents of the dynamic font source file.
Sets the font descent (number of pixels below the baseline).
Sets the fixed size for the font.
Sets the font family name.
Sets the font style flags, see [enum TextServer.FontStyle].
Sets the font style name.
If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
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 font hinting mode. Used by dynamic fonts only.
Sets kerning for the pair of glyphs.
Adds override for [method is_language_supported].
Sets the width of the range around the shape between the minimum and maximum representable signed distance.
Sets 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 (MSDF) generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
[b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
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.