Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Font.GetCharacterInfo

GetCharacterInfo(ch: char, info: characterInfo, size: int = 0, style: FontStyle = FontStyle.Normal): bool;
bool GetCharacterInfo(char ch, characterInfo info, int size = 0, FontStyle style = FontStyle.Normal);
def GetCharacterInfo(ch as char, info as characterInfo, size as int = 0, style as FontStyle = FontStyle.Normal) as bool

Description

Get rendering info for a specific character.

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.

See Also: characterInfo.