[cairo] Bad kerning in fonts or pangocairo?

Michael Urman murman at gmail.com
Thu Dec 13 20:27:44 PST 2007


Hello folks,

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).

It reproduces on a gtk target, so to see the behavior, run the
attached script with a font name as the first argument, e.g.:
    python testkern.py Sans
    python testkern.py Gentium
Resize the window horizontally to see more, and vertically to change
the scale. On my machine the red text jumps way to the right as the
font size increases, and the problem goes away at very small sizes.
The red text is drawn with pangocairo's show_layout, and the blue text
is with the show_text toy api at a comparable size. For what it's
worth only the logical extents are affected along the left edge;
pangocairo is aware of the empty space before the text.

I can certainly file this in bugzilla if appropriate, but I was
hesitant to do so since I know I'm not running the latest versions of
everything.

Thanks,
-- 
Michael Urman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testkern.py
Type: text/x-python
Size: 1226 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071213/9f40c83f/attachment.py 


More information about the cairo mailing list