[cairo] problem with portability of text extents

John Ellson ellson at research.att.com
Wed Feb 9 20:53:54 PST 2011


This maybe a pango problem that I should take elsewhere (?) but I think
the root cause is in the cairo font backends so I'll ask here first.

The problem I'm having is that the logical_rect returned by
pango_layout_get_extents() includes whitespace above and below the text
when using  PangoCairoFcFont on Fedora, but not when using
PangoCairoATSUIFont on a Mac.

I've attached some small images to illustrate the comparison. (Hope this
is allowed on the list?)

This is causing a significant layout difference in graphviz layouts on
Macs and Fedora, because the graph nodes are sized around the extents of
the labels.

I'm testing with cairo 1.10.2 on both platforms

Would the cairo developers be willing to accept this as a bug, or should
I attempt to make my own backend-specific compensation to meet my needs
in graphviz?

I'll post or send my test code if anyone asks.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110209/a9ce7945/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Darwin.png
Type: image/png
Size: 2872 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110209/a9ce7945/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Linux.png
Type: image/png
Size: 2836 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110209/a9ce7945/attachment-0001.png>


More information about the cairo mailing list