Method GetCharacterFromFontAssets
GetCharacterFromFontAssets(uint, TMP_FontAsset, List<TMP_FontAsset>, bool, FontStyles, FontWeight, out bool)
Returns the text element (character) for the given unicode value taking into consideration the requested font style and weight. Function searches the provided list of font assets, the list of font assets assigned as alternative typefaces to them as well as their fallbacks. The font asset out parameter contains a reference to the font asset containing the character. The typeface type indicates whether the returned font asset is the source font asset, an alternative typeface or fallback font asset.
Declaration
public static TMP_Character GetCharacterFromFontAssets(uint unicode, TMP_FontAsset sourceFontAsset, List<TMP_FontAsset> fontAssets, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface)
Parameters
Type | Name | Description |
---|---|---|
uint | unicode | The unicode value of the requested character |
TMP_Font |
sourceFontAsset | The font asset originating the search query |
List<TMP_Font |
fontAssets | The list of font assets to search |
bool | includeFallbacks | Determines if the fallback of each font assets on the list will be searched |
Font |
fontStyle | The font style |
Font |
fontWeight | The font weight |
bool | isAlternativeTypeface | Determines if the OUT font asset is an alternative typeface or fallback font asset |
Returns
Type | Description |
---|---|
TMP_Character |