开发者

FT_Get_Kerning returns 0 vector

I check if my TTF file has kerning information using FT_HAS_KERNING, and this returns true.

I then use:

 FT_Vector delta;
 FT_Get_Kerning( face, prev, next, FT_KERNING_DEFAULT, &delta );

to determine the kerning value, but both delta.x and delta.y have values of 0.

From the docs it seems that this means an error has occurred - how can I debug what the problem is even though FT_HAS_KERNING returns t开发者_JAVA技巧rue?

All I want to do is fix the spacing between characters, as they currently appear strangely spaced.


I ended up downloading the TTX tool to look inside my TTF file and it turns out there was no kerning information in here for the pairs I desired.


With parameter FT_KERNING_DEFAULT it always returns 0. See FT Kerning Mode.

Use FT_KERNING_UNFITTED instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜