Fix FT_Get_Kerning using char codes instead of glyph indices.

This commit is contained in:
Leonardo Etcheverry
2016-07-20 21:52:56 -03:00
parent d2c2c717e4
commit a11c7278c8
@@ -168,7 +168,11 @@ bool TrueTypeRasterizer::hasGlyph(uint32 glyph) const
float TrueTypeRasterizer::getKerning(uint32 leftglyph, uint32 rightglyph) const
{
FT_Vector kerning = {};
FT_Get_Kerning(face, leftglyph, rightglyph, FT_KERNING_DEFAULT, &kerning);
FT_Get_Kerning(face,
FT_Get_Char_Index(face, leftglyph),
FT_Get_Char_Index(face, rightglyph),
FT_KERNING_DEFAULT,
&kerning);
return float(kerning.x >> 6);
}