Hue Preserving Color Blending
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TMPro.TMP_FontAsset Class Reference
Inheritance diagram for TMPro.TMP_FontAsset:
TMPro.TMP_Asset

Public Types

enum  FontAssetTypes { None = 0, SDF = 1, Bitmap = 2 }
 

Public Member Functions

void AddFaceInfo (FaceInfo faceInfo)
 
void AddGlyphInfo (TMP_Glyph[] glyphInfo)
 
void AddKerningInfo (KerningTable kerningTable)
 
void ReadFontDefinition ()
 
void SortGlyphs ()
 Function to sort the list of glyphs. More...
 
bool HasCharacter (int character)
 Function to check if a certain character exists in the font asset. More...
 
bool HasCharacter (char character)
 Function to check if a certain character exists in the font asset. More...
 
bool HasCharacter (char character, bool searchFallbacks)
 Function to check if a character is contained in the font asset with the option to also check through fallback font assets. More...
 
bool HasCharacters (string text, out List< char > missingCharacters)
 Function to check if certain characters exists in the font asset. Function returns a list of missing characters. More...
 
bool HasCharacters (string text)
 Function to check if certain characters exists in the font asset. Function returns false if any characters are missing. More...
 

Static Public Member Functions

static string GetCharacters (TMP_FontAsset fontAsset)
 Function to extract all the characters from a font asset. More...
 
static int [] GetCharactersArray (TMP_FontAsset fontAsset)
 Function which returns an array that contains all the characters from a font asset. More...
 

Public Attributes

FontAssetTypes fontAssetType
 
Texture2D atlas
 
List< TMP_FontAssetfallbackFontAssets
 List containing the Fallback font assets for this font. More...
 
FontAssetCreationSettings m_CreationSettings
 
TMP_FontWeights [] fontWeights = new TMP_FontWeights[10]
 
float normalStyle = 0
 
float normalSpacingOffset = 0
 
float boldStyle = 0.75f
 
float boldSpacing = 7f
 
byte italicStyle = 35
 
byte tabSize = 10
 
- Public Attributes inherited from TMPro.TMP_Asset
int hashCode
 HashCode based on the name of the asset. More...
 
Material material
 The material used by this asset. More...
 
int materialHashCode
 HashCode based on the name of the material assigned to this asset. More...
 

Properties

static TMP_FontAsset defaultFontAsset [get]
 Default Font Asset used as last resort when glyphs are missing. More...
 
FaceInfo fontInfo [get]
 The general information about the font. More...
 
Dictionary< int, TMP_GlyphcharacterDictionary [get]
 
Dictionary< int, KerningPairkerningDictionary [get]
 Dictionary containing the kerning data More...
 
KerningTable kerningInfo [get]
 
FontAssetCreationSettings creationSettings [get, set]
 The settings used in the Font Asset Creator when this font asset was created or edited. More...
 

Private Member Functions

void OnEnable ()
 
void OnDisable ()
 
bool HasCharacter_Internal (char character, bool searchFallbacks)
 Function to check if a character is contained in a font asset with the option to also check through fallback font assets. This private implementation does not search the fallback font asset in the TMP Settings file. More...
 

Private Attributes

FaceInfo m_fontInfo
 
List< TMP_Glyphm_glyphInfoList
 
Dictionary< int, TMP_Glyphm_characterDictionary
 
Dictionary< int, KerningPairm_kerningDictionary
 
KerningTable m_kerningInfo
 
KerningPair m_kerningPair
 
int [] m_characterSet
 
byte m_oldTabSize
 

Static Private Attributes

static TMP_FontAsset s_defaultFontAsset
 

Detailed Description

Definition at line 23 of file TMP_FontAsset.cs.

Member Function Documentation

◆ AddFaceInfo()

void TMPro.TMP_FontAsset.AddFaceInfo ( FaceInfo  faceInfo)
inline

Parameters
faceInfo

Definition at line 163 of file TMP_FontAsset.cs.

◆ AddGlyphInfo()

void TMPro.TMP_FontAsset.AddGlyphInfo ( TMP_Glyph []  glyphInfo)
inline

Parameters
glyphInfo

Definition at line 173 of file TMP_FontAsset.cs.

◆ AddKerningInfo()

void TMPro.TMP_FontAsset.AddKerningInfo ( KerningTable  kerningTable)
inline

Parameters
kerningTable

Definition at line 212 of file TMP_FontAsset.cs.

◆ GetCharacters()

static string TMPro.TMP_FontAsset.GetCharacters ( TMP_FontAsset  fontAsset)
inlinestatic

Function to extract all the characters from a font asset.

Parameters
fontAsset
Returns

Definition at line 605 of file TMP_FontAsset.cs.

◆ GetCharactersArray()

static int [] TMPro.TMP_FontAsset.GetCharactersArray ( TMP_FontAsset  fontAsset)
inlinestatic

Function which returns an array that contains all the characters from a font asset.

Parameters
fontAsset
Returns

Definition at line 623 of file TMP_FontAsset.cs.

◆ HasCharacter() [1/3]

bool TMPro.TMP_FontAsset.HasCharacter ( int  character)
inline

Function to check if a certain character exists in the font asset.

Parameters
character
Returns

Definition at line 423 of file TMP_FontAsset.cs.

◆ HasCharacter() [2/3]

bool TMPro.TMP_FontAsset.HasCharacter ( char  character)
inline

Function to check if a certain character exists in the font asset.

Parameters
character
Returns

Definition at line 440 of file TMP_FontAsset.cs.

◆ HasCharacter() [3/3]

bool TMPro.TMP_FontAsset.HasCharacter ( char  character,
bool  searchFallbacks 
)
inline

Function to check if a character is contained in the font asset with the option to also check through fallback font assets.

Parameters
character
searchFallbacks
Returns

Definition at line 458 of file TMP_FontAsset.cs.

◆ HasCharacter_Internal()

bool TMPro.TMP_FontAsset.HasCharacter_Internal ( char  character,
bool  searchFallbacks 
)
inlineprivate

Function to check if a character is contained in a font asset with the option to also check through fallback font assets. This private implementation does not search the fallback font asset in the TMP Settings file.

Parameters
character
searchFallbacks
Returns

Definition at line 520 of file TMP_FontAsset.cs.

◆ HasCharacters() [1/2]

bool TMPro.TMP_FontAsset.HasCharacters ( string  text,
out List< char >  missingCharacters 
)
inline

Function to check if certain characters exists in the font asset. Function returns a list of missing characters.

Parameters
character
Returns

Definition at line 557 of file TMP_FontAsset.cs.

◆ HasCharacters() [2/2]

bool TMPro.TMP_FontAsset.HasCharacters ( string  text)
inline

Function to check if certain characters exists in the font asset. Function returns false if any characters are missing.

Parameters
textString containing the characters to check
Returns

Definition at line 585 of file TMP_FontAsset.cs.

◆ ReadFontDefinition()

void TMPro.TMP_FontAsset.ReadFontDefinition ( )
inline

Definition at line 221 of file TMP_FontAsset.cs.

◆ SortGlyphs()

void TMPro.TMP_FontAsset.SortGlyphs ( )
inline

Function to sort the list of glyphs.

Definition at line 409 of file TMP_FontAsset.cs.

Member Data Documentation

◆ fallbackFontAssets

List<TMP_FontAsset> TMPro.TMP_FontAsset.fallbackFontAssets

List containing the Fallback font assets for this font.

Definition at line 103 of file TMP_FontAsset.cs.

Property Documentation

◆ creationSettings

FontAssetCreationSettings TMPro.TMP_FontAsset.creationSettings
getset

The settings used in the Font Asset Creator when this font asset was created or edited.

Definition at line 109 of file TMP_FontAsset.cs.

◆ defaultFontAsset

TMP_FontAsset TMPro.TMP_FontAsset.defaultFontAsset
staticget

Default Font Asset used as last resort when glyphs are missing.

Definition at line 29 of file TMP_FontAsset.cs.

◆ fontInfo

FaceInfo TMPro.TMP_FontAsset.fontInfo
get

The general information about the font.

Definition at line 50 of file TMP_FontAsset.cs.

◆ kerningDictionary

Dictionary<int, KerningPair> TMPro.TMP_FontAsset.kerningDictionary
get

Dictionary containing the kerning data

Definition at line 79 of file TMP_FontAsset.cs.

◆ kerningInfo

KerningTable TMPro.TMP_FontAsset.kerningInfo
get

Definition at line 88 of file TMP_FontAsset.cs.


The documentation for this class was generated from the following file: