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

FontAsset.TryGetGlyphIndex

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 TryGetGlyphIndex(uint unicode, out uint glyphIndex);

Parameters

Parameter Description
unicode The Unicode code point to look up.
glyphIndex The index of the glyph mapped to the code point, or 0 if the font has none.

Returns

bool Returns true if the font has a glyph for the code point. Otherwise, returns false.

Description

Tries to get the index of the glyph mapped to the given Unicode code point in the font asset's source font.

This is the nominal character-to-glyph mapping from the font's character map. Text shaping can substitute different glyphs at render time, for example for ligatures or complex scripts.