[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Kerning problem with capitals
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] Kerning problem with capitals |
Date: |
Thu, 09 Dec 2004 23:54:51 +0100 (CET) |
> > Just to throw this idea out: what would the effect be if we tried
> > to correct for this by adjusting the kerning table when hinting? I
> > was thinking something like adding the difference between the
> > hinted & unhinted advance of the left glyph. For example:
> >
> > Advance for "R": 1423 font units
> > After hinting @12ppem: 8 pixels = 1365 font units
> > Difference: 58 font units
> > Corrected "Re" kerning: -92 + 58 = -34 font units (= -0.199 pixels)
> >
> > There are probably more intelligent methods, though.
>
> This is an interesting idea. What about the following
> reformulation: [...]
I've investigated this problem further, and I'm now sure that neither
your nor my algorithm can work reliably. The very problem is that
kerning isn't simply a correction of the advance width of the left
character but has something to do with glyph shapes. Assuming that a
font is well hinted for a particular size, the glyph shape has been
properly moved and distorted so that its appearance within the given
advance width yields optimal rendering for a particular ppem value.
With other words, the advance width returned by the bytecode
interpreter is the optimal one for the (distorted) glyph shape -- in
such cases it is plain wrong to `correct' the kerning value.
Anyway, there is a very simple solution to immediately improve the
kerning for small ppem values, and which I've now implemented directly
in the library: Never increase the kerning value by rounding!
Instead, FreeType now handles kerning in a conservative way by always
rounding towards zero if the FT_KERNING_DEFAULT flag is used. Using
your `Red Ken File Vera' string with ftstring, I get very pleasing
results.
Please test.
Werner
- [Devel] Kerning problem with capitals, Robert Clark, 2004/12/03
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/04
- Re: [Devel] Kerning problem with capitals, Robert Clark, 2004/12/06
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/07
- Re: [Devel] Kerning problem with capitals, Robert Clark, 2004/12/07
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/07
- Re: [Devel] Kerning problem with capitals, Robert Clark, 2004/12/08
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/08
- Re: [Devel] Kerning problem with capitals,
Werner LEMBERG <=
- Re: [Devel] Kerning problem with capitals, Robert Clark, 2004/12/10
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/10
- Re: [Devel] Kerning problem with capitals, Robert Clark, 2004/12/10
- Re: [Devel] Kerning problem with capitals, Antoine, 2004/12/09
- Re: [Devel] Kerning problem with capitals, Antoine Leca, 2004/12/10
- Re: [Devel] Kerning problem with capitals, Werner LEMBERG, 2004/12/11