inconsistency of pangocairo on Mac and Linux



It seems pangocairo has some inconsistency between Mac (CoreText)
and Linux. Please compile test.c in test.tar.gz, and run it as
$ ./a.out out.png
$ ./a.out -a out-abs.png
The four files I got on my Mac and Linux are included in tar.gz.

Mac: OSX 10.8.5  / pango-1.36.0 / cairo-1.12.16
Linux: Fedora 20 / pango-1.36.1 / cairo-1.13.1

In test.c, I draw two lines at y=10 and y=30, and draw a text
with font size = 20 point (without the -a flag) or 20 pixel
(with the -a flag).

The font size in linux.png and linux-abs.png are different,
which indicates that the default DPI is 96.0 and 1 point =
1.333 pixel.

But mac.png and mac-abs.png are indistinguishable, indicating
that the default DPI = 72.0 ??

If we compare linux-abs.png and mac-abs.png, the size of the
text is the same (20 pixel, length from the bottom of 'j' to
the top of 'X'), but it is drawn at different vertical position.
On Linux, the bottom of 'a' is at the 2nd line (y=20), while
on Mac the top of 'X' is at the 1st line (y=10).

These inconsistencies are causing some portability problem
in gnuplot.

Is this a bug of pangocairo on Mac?

Thank you in advance.

Jun

Attachment: test.tar.gz
Description: GNU Zip compressed data



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