Class TMP_FontAsset
Inherited Members
Namespace: TMPro
Assembly: solution.dll
Syntax
[Serializable]
[ExcludeFromPreset]
public class TMP_FontAsset : TMP_Asset
Fields
| Name | Description |
|---|---|
| atlas | |
| boldSpacing | The spacing between characters when using regular style. |
| boldStyle | Defines the dilation of the text when using bold style. |
| italicStyle | Defines the slant of the text when using italic style. |
| normalSpacingOffset | The spacing between characters when using regular style. |
| normalStyle | Defines the dilation of the text when using regular style. |
| tabSize |
Properties
| Name | Description |
|---|---|
| atlasHeight | The height of the atlas texture(s) used by this font asset. |
| atlasPadding | The padding used between glyphs contained in the atlas texture(s) used by this font asset. |
| atlasPopulationMode | |
| atlasRenderMode | |
| atlasTexture | The font atlas used by this font asset. This is always the texture at index [0] of the fontAtlasTextures. |
| atlasTextureCount | Number of atlas textures used by this font asset. |
| atlasTextures | Array of atlas textures that contain the glyphs used by this font asset. |
| atlasWidth | The width of the atlas texture(s) used by this font asset. |
| characterLookupTable | Dictionary used to lookup characters contained in the font asset by their unicode values. |
| characterTable | List containing the characters of the given font asset. |
| creationSettings | The settings used in the Font Asset Creator when this font asset was created or edited. |
| faceInfo | Information about the font's face. |
| fallbackFontAssetTable | List containing the Fallback font assets for this font. |
| fontFeatureTable | Table containing the various font features of this font asset. |
| fontInfo | The general information about the font. This property and FaceInfo_Legacy type are no longer used in version 1.1.0 of the font asset. |
| fontWeightTable | Array containing font assets to be used as alternative typefaces for the various potential font weights of this font asset. |
| glyphLookupTable | Dictionary used to lookup glyphs contained in the font asset by their index. |
| glyphTable | List of glyphs contained in the font asset. |
| isMultiAtlasTexturesEnabled | |
| sourceFontFile | Source font file when atlas population mode is set to dynamic. Null when the atlas population mode is set to static. |
| version | The version of the font asset class. Version 1.1.0 adds support for the new TextCore.FontEngine and Dynamic SDF system. |
Methods
| Name | Description |
|---|---|
| ClearFontAssetData(bool) | Clears font asset data including the glyph and character tables and textures. Function might be changed to Internal and only used in tests. |
| CreateFontAsset(Font) | Create new instance of a font asset using default settings. |
| CreateFontAsset(Font, int, int, GlyphRenderMode, int, int, AtlasPopulationMode, bool) | Create new instance of a font asset. |
| GetCharacters(TMP_FontAsset) | Function to extract all the characters from a font asset. |
| GetCharactersArray(TMP_FontAsset) | Function which returns an array that contains all the characters from a font asset. |
| HasCharacter(char, bool, bool) | Function to check if a character is contained in the font asset with the option to also check through fallback font assets. |
| HasCharacter(int) | Function to check if a certain character exists in the font asset. |
| HasCharacters(string) | Function to check if certain characters exists in the font asset. Function returns false if any characters are missing. |
| HasCharacters(string, out List<char>) | Function to check if certain characters exists in the font asset. Function returns a list of missing characters. |
| HasCharacters(string, out uint[], bool, bool) | |
| ReadFontAssetDefinition() | |
| TryAddCharacters(string, bool) | Try adding the characters from the provided string to the font asset. |
| TryAddCharacters(string, out string, bool) | Try adding the characters from the provided string to the font asset. |
| TryAddCharacters(uint[], bool) | Try adding the characters from the provided string to the font asset. |
| TryAddCharacters(uint[], out uint[], bool) | Try adding the characters from the provided string to the font asset. |