Added Font::hasGlyph()

This commit is contained in:
東風谷早苗 (こちやさなえ) 2020-02-26 18:55:09 +08:00 committed by Lukas Dürrenberger
parent f93372f98a
commit 43187455e4
2 changed files with 29 additions and 0 deletions

View file

@ -365,6 +365,13 @@ const Glyph& Font::getGlyph(Uint32 codePoint, unsigned int characterSize, bool b
}
////////////////////////////////////////////////////////////
bool Font::hasGlyph(Uint32 codePoint) const
{
return FT_Get_Char_Index(static_cast<FT_Face>(m_face), codePoint) != 0;
}
////////////////////////////////////////////////////////////
float Font::getKerning(Uint32 first, Uint32 second, unsigned int characterSize) const
{