开发者

FT_Get_Kerning returns 0 vector

开发者 https://www.devze.com 2023-04-05 23:09 出处:网络
I check if my TTF file has kerning information usingFT_HAS_KERNING, and this returns true. I then use:

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

精彩评论

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