# FontAsset

> Contains deprecated FontAsset APIs that are being phased out as ATG (Advanced Text Generator) becomes the primary text backend. These APIs are no longer required for ATG-based text rendering.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.TextCore.Text](/engine/6000.7/script-reference/unityengine/textcore/text.md)
* **Assembly:** UnityEngine.TextCoreTextEngineModule
* **Inherits from:** TextAsset

```csharp
[HelpURL("UIE-font-asset-landing")]
public class FontAsset : TextAsset
```

## Properties

| Property                                                                                                                                  | Description                                                                                                                                              |
| ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [atlasHeight](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlasheight.md)                                         | The height of the atlas texture(s) used by this font asset.                                                                                              |
| [atlasPadding](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlaspadding.md)                                       | The padding used between glyphs contained in the atlas texture(s) used by this font asset.                                                               |
| [atlasTexture](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlastexture.md)                                       | The font atlas used by this font asset. This is always the texture at index \[0] of the fontAtlasTextures.                                               |
| [atlasTextureCount](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlastexturecount.md)                             | Number of atlas textures used by this font asset.                                                                                                        |
| [atlasTextures](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlastextures.md)                                     | Array of atlas textures that contain the glyphs used by this font asset.                                                                                 |
| [atlasWidth](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/atlaswidth.md)                                           | The width of the atlas texture(s) used by this font asset.                                                                                               |
| [boldStyleSpacing](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/boldstylespacing.md)                               | The spacing between characters when using regular style.                                                                                                 |
| [boldStyleWeight](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/boldstyleweight.md)                                 | Defines the dilation of the text when using bold style.                                                                                                  |
| [faceInfo](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/faceinfo.md)                                               | Information about the font's face.                                                                                                                       |
| [fallbackFontAssetTable](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/fallbackfontassettable.md)                   | List containing the Fallback font assets for this font.                                                                                                  |
| [fontAssetCreationEditorSettings](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/fontassetcreationeditorsettings.md) | The settings used in the Font Asset Creator when this font asset was created or edited.                                                                  |
| [fontWeightTable](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/fontweighttable.md)                                 | Array containing font assets to be used as alternative typefaces for the various potential font weights of this font asset.                              |
| [getFontFeatures](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/getfontfeatures.md)                                 | Determines if OpenType font features should be retrieved from the source font file as new characters and glyphs are added dynamically to the font asset. |
| [isMultiAtlasTexturesEnabled](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/ismultiatlastexturesenabled.md)         | Enables the font asset to create additional atlas textures as needed.                                                                                    |
| [italicStyleSlant](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/italicstyleslant.md)                               | Defines the slant of the text when using italic style.                                                                                                   |
| [regularStyleSpacing](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/regularstylespacing.md)                         | The spacing between characters when using regular style.                                                                                                 |
| [regularStyleWeight](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/regularstyleweight.md)                           | Defines the dilation of the text when using regular style.                                                                                               |
| [sourceFontFile](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/sourcefontfile.md)                                   | Source font file when atlas population mode is set to dynamic. Null when the atlas population mode is set to static.                                     |
| [tabMultiple](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/tabmultiple.md)                                         | The number of spaces that a tab represents.                                                                                                              |

## Methods

| Method                                                                                                                    | Description                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| [ClearFontAssetData](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/clearfontassetdata.md)           | Clears font asset data including the glyph and character tables and textures. Function might be changed to Internal and only used in tests.  |
| [HasCharacter](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/hascharacter.md)                       | Function to check if a character is contained in the font asset with the option to also check potential local fallbacks.                     |
| [HasCharacters](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/hascharacters.md)                     | Function to check if certain characters exists in the font asset. Function returns false if any characters are missing.                      |
| [ReadFontAssetDefinition](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/readfontassetdefinition.md) | Reads the various data tables of the font asset and populates various data structures to allow for faster lookup of related font asset data. |
| [TryAddCharacters](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/tryaddcharacters.md)               | Try adding the characters from the provided string to the font asset.                                                                        |
| [TryGetGlyphIndex](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/trygetglyphindex.md)               | Tries to get the index of the glyph mapped to the given Unicode code point in the font asset's source font.                                  |
| [TryGetGlyphMetrics](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/trygetglyphmetrics.md)           | Tries to get the metrics of the glyph at the given glyph index.                                                                              |

## Static Methods

| Method                                                                                                          | Description                                                                         |
| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [CreateFontAsset](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/createfontasset.md)       | Creates a new font asset instance from the font file at the given file path.        |
| [GetCharacters](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/getcharacters.md)           | Function to extract all the characters from a font asset.                           |
| [GetCharactersArray](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/getcharactersarray.md) | Function which returns an array that contains all the characters from a font asset. |

## Inheritance

**Inherited Members:**

* [ScriptableObject.CreateInstance(string)](/engine/6000.7/script-reference/unityengine/scriptableobject/createinstance.md#createinstance\(string\))
* [ScriptableObject.CreateInstance(Type)](/engine/6000.7/script-reference/unityengine/scriptableobject/createinstance.md#createinstance\(type\))
* [ScriptableObject.CreateInstance\<T>()](/engine/6000.7/script-reference/unityengine/scriptableobject/createinstance.md)
* [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.7/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.7/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.7/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.7/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.7/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.7/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.7/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.7/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.7/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
