Вопрос

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 true?

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

Это было полезно?

Решение 2

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.

Другие советы

Function FT_Get_Kerning with parameter FT_KERNING_DEFAULT does not always return 0!

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

Use FT_KERNING_UNFITTED instead.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top