GetCharacterInfo(char, out CharacterInfo, int, FontStyle)
Get rendering info for a specific character.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.TextRenderingModule
GetCharacterInfo(char, CharacterInfo, int, FontStyle)
public bool GetCharacterInfo(char ch, out CharacterInfo info, int size, FontStyle style)
Parameters
The character you need rendering information for.
Returns the CharacterInfo struct with the rendering information for the character (if available).
The size of the character (default value of zero will use font default size).
The style of the character.
Returns
Type | Description |
|---|---|
| bool |
Remarks
Note: You should only ever need to use this when you want to implement your own text rendering. If the character ch with the specified size and style is present in the font texture, then this method will return true, and info will contain the texture placement information for that character. If the character is not present, this method returns false. If size is zero, it will use the default size for the font.
Additional Resources: Font.characterInfo. Example at Font.RequestCharactersInTexture.