Menu

#37 Kerning table initialized to 0

open
nobody
None
5
2012-09-13
2012-09-13
Anonymous
No

In FTFace.cpp, in both constructors, a kerning cache is constructed after the face is created. At that point, FTFace.charSize is not initialized (it is 0) and FT_Set_Char_Size has not been called.

Since the kerning cache is created by invoking FT_Get_Kerning with 'ft_kerning_unfitted', in FreeType (2.4.8) in ftobjs.c lines 2990, 2991 the kerning value is multiplied with face->size->metrics.x_scale, face->size->metrics.y_scale which are 0 because FT_Set_Char_Size has not been called.

This results in the entire kerning cache being initialized to 0 and no kerning is ever applied to cache hits.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB