[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trouble with kerning
From: |
Andreas 'LionKing|StarFire' Tscharner |
Subject: |
Trouble with kerning |
Date: |
Thu, 8 Jun 2000 17:48:50 +0200 (CEST) |
Hi all,
I have some trouble with kerning. What I do:
if (FT_HAS_KERNING(ftFace)) {
if ((i+1) < l) {
error = FT_Get_Kerning(ftFace, glyphIndex[i], glyphIndex[i+1], kernDist);
// Some error check...
};
advX += kernDist->x;
};
ftFace is of type FT_Face
i, l both int. i is current char in string, l is strlen
glyphIndex[] are the glyph indices (previously calculated)
kernDist is FT_Vector and already created (kernDist = new FT_Vector...)
The problem: In my test - example, I want to render to word "PAIN".
Between the 'P' and the 'A', kerning should be done. The piece of code
above actually gives a (negative [of course]) value: -3. It looks good,
when the font height is 12, but I always get this -3, even font
height is 60, and then you see nothing about that kerning between these to
characters.
How do I have to do it, that I get always a correct value back?
Thanks in advance.
Regards
Andreas
--
("`-''-/").___..--''"`-._
`o_ o ) `-. ( ).`-.__.`)
(_Y_.)' ._ ) `._ `. ``-..-'
_..`--'_..-_/ /--'_.' .'
(il).-'' (li).' ((!.-'
Andreas Tscharner address@hidden
http://www.vis.ethz.ch/~andy ICQ-No. 14356454
- Trouble with kerning,
Andreas 'LionKing|StarFire' Tscharner <=