Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

FontAsset.HasCharacters

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public bool HasCharacters(string text, out List`1 missingCharacters);

Parameters

Parameter Description
text String containing the characters to check.
missingCharacters List of missing characters.

Description

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


Declaration

public bool HasCharacters(string text, out uint[] missingCharacters, bool searchFallbacks, bool tryAddCharacter);

Parameters

Parameter Description
text String containing the characters to check.
missingCharacters Array containing the unicode values of the missing characters.
searchFallbacks Determines if fallback font assets assigned to this font asset should be searched.

Returns

bool Returns true if all requested characters are available in the font asset and potential fallbacks.

Description

Function to check if the characters in the given string are contained in the font asset with the option to also check its potential local fallbacks.


Declaration

public bool HasCharacters(string text);

Parameters

Parameter Description
text String containing the characters to check

Description

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