Commit 9a1fd558e1f734fa0a28d68a5006876483306cd0

henry 2001-08-26T22:53:23

Fixed a bug in the kerning code. Dims are in 1/64 pixels.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 861d465..24d6dea 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -111,7 +111,11 @@ FT_Vector& FTFace::KernAdvance( unsigned int index1, unsigned int index2 )
 	
 	if( FT_HAS_KERNING((*ftFace)) && index1 && index2)
 	{
-		err = FT_Get_Kerning( *ftFace, index1, index2, ft_kerning_unfitted, &kernAdvance);	
+		err = FT_Get_Kerning( *ftFace, index1, index2, ft_kerning_unfitted, &kernAdvance);
+		if( !err)
+		{	
+			kernAdvance.x /= 64; kernAdvance.y /= 64;
+		}
 	}
 	
 	return kernAdvance;