Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #15626 (assigned defect)

Opened 6 months ago

Last modified 5 months ago

cairo @1.6.4_1+macosx with quartz-font support: does not render non-latin characters

Reported by: takanori@… Owned by: ryandesign@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.6.0
Keywords: Cc:
Port:

Description

quartz-font backend in cairo 1.6.4 might have a bug. It does not render non-latin characters properly.

I guess there might be a flaw in its default font selection mechanism or something.

Ryan, would you please take a look? This is very serious problem since it affects all of gtk2 applications. Thanks.

How to reproduce:

1) Install cairo and pango from scratch.

$ sudo port install cairo pango

$ port installed
The following ports are currently installed:
  cairo @1.6.4_1+macosx (active)
  expat @2.0.1_0 (active)
  fontconfig @2.6.0_0+macosx (active)
  freetype @2.3.6_0 (active)
  gettext @0.17_3 (active)
  glib2 @2.16.3_0+darwin_9 (active)
  gperf @3.0.3_0 (active)
  libiconv @1.12_0 (active)
  libpixman @0.10.0_0 (active)
  libpng @1.2.29_0 (active)
  ncurses @5.6_0 (active)
  ncursesw @5.6_1 (active)
  pango @1.20.3_0 (active)
  pkgconfig @0.23_0 (active)
  render @0.9_1 (active)
  Xft2 @2.1.12_0 (active)
  xorg-util-macros @1.1.5_0 (active)
  xorg-xproto @7.0.11_1 (active)
  xrender @0.9.0_2 (active)
  zlib @1.2.3_1 (active)

After installing pango, run the below command to check whether these ports can render unicode text or not.

$ pango-view --backend=cairo ~/Desktop/utf8.txt

 (Result: picture1.png [NG])

2) Next, simply remove '${prefix}/lib/pkgconfig/cairo-quartz-font.pc'

$ sudo rm /opt/local/lib/pkgconfig/cairo-quartz-font.pc

and then rebuild pango. Due to this operation, pango will be built without cairo-quartz-font support.

$ sudo port uninstall -f pango
$ sudo port install pango

After installing pango, please run pango-view again.

$ pango-view --backend=cairo ~/Desktop/utf8.txt

 (Result: picture2.png [OK])

That's it.

Attachments

picture1.png (143.8 KB) - added by takanori@… 6 months ago.
picture2.png (158.6 KB) - added by takanori@… 6 months ago.
utf8.txt (1.5 KB) - added by takanori@… 6 months ago.

Change History

Changed 6 months ago by takanori@…

Changed 6 months ago by takanori@…

Changed 6 months ago by takanori@…

Changed 5 months ago by ryandesign@…

  • status changed from new to assigned

I can confirm this issue, on Mac OS X 10.4.11 Intel with Xcode 2.5 and MacPorts trunk @38022. (I get a slightly different result than you without cairo-quartz-font.pc -- some characters that are drawn correctly in your image are not in mine. Maybe the fonts that come with Leopard are improved from the ones in Tiger.) I am not sure whether this is pango's bug or cairo's bug, but I will bring it up on their mailing lists.

Changed 5 months ago by ryandesign@…

I asked the pango mailing list first.

The versions I'm using are cairo @1.6.4_1+macosx and pango @1.20.5_0.

Changed 5 months ago by ryandesign@…

Nobody responded to my message on the pango list. I also asked the cairo list on July 6 and nobody answered there either. I asked the pango list again just now.

Note: See TracTickets for help on using tickets.