freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] Kerning at small sizes (was Kerning problem with capitals)


From: Robert Clark
Subject: [Devel] Kerning at small sizes (was Kerning problem with capitals)
Date: Sun, 12 Dec 2004 01:11:49 +0000

  I've had the time to try out a couple of strategies for reducing the
kerning at small ppem sizes to compensate for the effects of hinting,
now. These are the algorithms I've tried:

1) Don't kern below x ppem.

  This one's easy - set all kerning to zero if ppem is less than the
magic value x. Unfortunately, this is less than optimal for the "To"
kerning in Vera Sans: at 12ppem, "To" looks best with a -1 pixel kerning
while the actual kerning is -348 font units (= -2.04 pixels). Simply
turning it on or off can't give -1 pixels.

2) Reduce kerning values by some amount depending on x.

  This is close to the rounding down method which effectively reduces
all kerning values by half a pixel. The amount I tried was:

    1 - (x/20)

for x < 20. 20 was just the magic number which seemed to work best.

3) Scale kerning values by some factor depending on x.

  The idea here is to multiply the kerning values by some function of
the ppem value. I used simply:

    x/25

for x < 25.

  To be honest, (2) & (3) gave remarkably similar results, but what few
differences there were seemed to favour (3) and it's simpler, so I think
that's the front-runner. I've spent some time looking at 10 different
kerning pairs for sizes from 10ppem upward to try and find the best
magic number and I think 25 was the best compromise.

  I've attached a patch against 2.1.9 (really this time). I'm using this
at the moment, so I'll see if I spot anything odd with it over the next
few days. If anyone has any other ideas, I'd be interested to try them
as well.

        Robert

Attachment: freetype-2.1.9-kerning-correction.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]