mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Fix FT_Get_Kerning using char codes instead of glyph indices.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user