[cairo] Bad kerning in fonts or pangocairo?
Peter Weilbacher
mozilla at Weilbacher.org
Fri Dec 14 03:31:30 PST 2007
On Thu, 13 Dec 2007, Michael Urman wrote:
> I'm writing some pdf layout code using cairo and pangocairo, and ran
> into an issue in fonts large enough for my heading size when they use
> letter combinations such as 'Ve' or 'Ta'. I'm not certain whether this
> is a bug in almost all the fonts on my system (so far monospace fonts,
> Georgia, and Comic Sans MS seem to be the only ones free from
> trouble), or a bug in something more like pangocairo. I'm looking for
> guidance on determining this, and finding out if it's been fixed in a
> version later than what I have (cairo 1.4.10 and pangocairo from pygtk
> 2.12.0 on debian testing).
The fonts that you list above as unproblematic are obviously those that
don't have kerning information. I guess you could use the ftstring tool
from FreeType to check if the font has a problem. So far
ftstring -m "Taht Veggie" 24 /usr/share/fonts/corefonts/arial.ttf
ftstring -m "Taht Veggie" 24 /usr/share/fonts/corefonts/times.ttf
shows no problem when cycling through kerning methods (using 'k') and
resizing the font (page up / down) to different sizes.
But I do see the problem when running your test program with
python testkern.py Arial
python testkern.py "Times New Roman"
This is with pango-1.18.3, cairo-1.4.12, and freetype-2.3.5 on Gentoo.
Peter.
More information about the cairo
mailing list