Re: inconsistency of pangocairo on Mac and Linux

2014-01-16 Thread Jun T.

> Just pushed out a patch to default to 96dpi on CoreText.

Thank you for the quick fix.

The difference between linux-abs.png and mac-abs.png may be
normal, i.e., the vertical position of the baseline within a
layout may depend on the backend in use even if the font,
fontsize and text in the layout are identical.

I think this can be handled by using pango_layout_get_baseline()
which I've just discovered in the Manual.

Thank you.
___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list


Re: inconsistency of pangocairo on Mac and Linux

2014-01-15 Thread Behdad Esfahbod
On 14-01-15 09:31 PM, Jun T. wrote:
> Is this a bug of pangocairo on Mac?

Just pushed out a patch to default to 96dpi on CoreText.

-- 
behdad
http://behdad.org/
___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list


Re: inconsistency of pangocairo on Mac and Linux

2014-01-15 Thread Simon Cozens

On 15/01/2014 22:31, Jun T. wrote:

Is this a bug of pangocairo on Mac?


I posted about bugs in the CoreText renderer last month and got no response.

___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list


inconsistency of pangocairo on Mac and Linux

2014-01-15 Thread Jun T.
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



test.tar.gz
Description: GNU Zip compressed data
___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-i18n-list