Opened 17 years ago

Closed 14 years ago

#15052 closed defect (fixed)

pango: Font display problems when compiled against cairo 1.6.4

Reported by: mike@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: rhwood@…, TheTanster (Kok-Yong Tan), nathan@…, brian.ewins@…, macports@…
Port: pango

Description

After the last update and recompilation of pango and cairo I get the following errors when starting a gtk +quartz application like wireshark.

(wireshark:24691): Pango-WARNING : Error loading GDEF table 28333

(wireshark:24691): Pango-WARNING : Error loading GSUB table 28333

(wireshark:24691): Pango-WARNING : Error loading GPOS table 28333

(wireshark:24691): Pango-WARNING : Error loading GDEF table 28333

(wireshark:24691): Pango-WARNING : Error loading GSUB table 28333

(wireshark:24691): Pango-WARNING : Error loading GPOS table 28333

(wireshark:24691): Pango-WARNING : shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='Lucida Grande 13', text='Initializing dissectors ...'

Instead of text I just see square boxes.

If I activate version 1.4.14_0+atsui+no_x11+quartz of cairo and recompile pango against this one the problem disappears. It even works if I then later on reactivate version 1.6.4 of cairo. I am not sure which package is to blame here, it's either cairo or pango.

Attachments (1)

switch2.png (102.1 KB) - added by thmx.2k7@… 14 years ago.
switch2 - boxes instead of text

Download all attachments as: .zip

Change History (25)

comment:1 Changed 17 years ago by rhwood@…

Cc: rhwood@… added
Owner: changed from macports-tickets@… to ryandesign@…
Version: 1.6.0

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Priority: HighNormal
Summary: pango: Font display problems when compiled against cario 1.6.4pango: Font display problems when compiled against cairo 1.6.4

I suppose I'll have to talk with the developers of pango and/or cairo about this.

comment:3 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I have experienced the "Error loading [GDEF|GSUB|GPOS] table 28333" issue myself with graphviz, so now I know it's not specific to graphviz or wireshark but probably in pango or maybe cairo.

I've asked the pango developers if they can figure out what's going on.

comment:4 in reply to:  3 ; Changed 17 years ago by mike@…

Replying to ryandesign@macports.org:

I've asked the pango developers if they can figure out what's going on.

Just to let you know, ALL error messages disappear if I compile against cairo 1.4.14, even If I switch to the new version later on. Is it possible that pango uses a different API if compiled against 1.6.4?

comment:5 in reply to:  4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ktan@… added

Replying to mike@it-loops.com:

Is it possible that pango uses a different API if compiled against 1.6.4?

I have no information on this. You may want to direct your inquiry to the pango mailing list to ask the developers.

comment:6 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Kok-Yong Tan noticed the "Error loading G* table 28333" problem too.

comment:7 Changed 17 years ago by nathan@…

I wanted to confirm that I am seeing the same type of error. In my case installing a fully up-to-date version of MacPorts running on MacOS 10.5.2 with the gimp2 port results in the following errors on startup:

(gimp:46826): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', \
font='Bitstream Vera Sans 10', text='Plug-In Interpreters'

(gimp:46826): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', \
font='Bitstream Vera Sans Bold 10', text='Looking for data files'

(gimp:46826): Pango-WARNING **: Error loading GDEF table 28333

(gimp:46826): Pango-WARNING **: Error loading GSUB table 28333

(gimp:46826): Pango-WARNING **: Error loading GPOS table 28333

All text is then rendered as squares. (Note that I've broken the first two lines so as not to create wrapping problems.) However, downgrading to cairo@1.4.12_0+atsui+no_x11+quartz and rebuilding its immediate dependents (pango, poppler, and gtk2 in my case) results in the correct rendering of text, though I still get the "Error loading G* table 28333" problem. Nor do fonts disappear again after upgrading to cairo@1.6.4_0+no_x11.

This would seem to suggest that the "Error loading G* table 28333" and actual "no text" problems may not be related. At the very least, it seems to add weight to the idea that the problem lives in pango, and not cairo.

comment:8 Changed 17 years ago by nathan@…

Cc: nathan@… added

Cc Me!

comment:9 Changed 16 years ago by mike@…

Just a heads up.

The problem is still there with the new pango version (1.21.1_0+no_x11).

comment:10 in reply to:  9 Changed 16 years ago by macports@…

I have the "boxes instead of text" problem with gnumeric, gimp and inkscape, when installed using cairo 1.6.4 and +no_x11+quartz+pdf.

I tried downgrading to cairo 1.4.14 to fix this problem. The old Portfile may be found in subversion. I installed this at /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/cairo/Portfile and executed "sudo port install cairo +quartz+pdf+no_x11." Cairo built fine, but the applications no longer worked, because gnumeric, gimp and inkscape require the newer version of cairo:

$ gnumeric
dyld: Library not loaded: /opt/local/lib/libcairo.2.dylib
  Referenced from: /opt/local/lib/libgoffice-0.6.6.dylib
  Reason: Incompatible library version: libgoffice-0.6.6.dylib requires version 20.0.0 or later, but libcairo.2.dylib provides version 14.0.0
Trace/BPT trap

comment:11 Changed 16 years ago by macports@…

I just reported this upstream.

comment:12 Changed 16 years ago by brian.ewins@…

Cc: brian.ewins@… added

Cc Me!

comment:13 Changed 16 years ago by macports@…

I received some feedback from upstream. We need to build cairo and pango to use the Quartz font backend instead of the freetype backend. Here is how I fixed this on my machine, which runs Mac OS X 10.4 and MacPorts 1.6:

  1. Force this installation of cairo-quartz-font.pc. This file is created by cairo's configure script and should be placed in /opt/local/lib/pkgconfig/. The cairo port should be modified to install this file automatically for the no_x11 variant.


  1. Edit the cairo Portfile. For variant no_x11: DELETE: --enable-freetype. ADD: --disable-freetype, --enable-quartz, --enable-quartz-font, --enable-quartz-image and --enable-png


  1. Execute "sudo port install cairo +no_x11 pango +no_x11 gnumeric"


Note that gnumeric's cell labels still have garbled fonts. I suspect that this is due to goffice linking against /opt/local/lib/libpangoft2-1.0.0.dylib.

comment:14 Changed 16 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:15 in reply to:  13 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to macports@flyn.org:

I received some feedback from upstream. We need to build cairo and pango to use the Quartz font backend instead of the freetype backend.

Why "instead of"? The fontconfig and ATSUI backends used to be mutually exclusive, but since cairo 1.4.x (I think) it's been possible to install them simultaneously, and since 1.6.x where the ATSUI backend is now called the Quartz font backend, they're even both enabled simultaneously by default.

Here is how I fixed this on my machine, which runs Mac OS X 10.4 and MacPorts 1.6:

  1. Force this installation of cairo-quartz-font.pc. This file is created by cairo's configure script and should be placed in /opt/local/lib/pkgconfig/. The cairo port should be modified to install this file automatically for the no_x11 variant.

This is #15209.

  1. Edit the cairo Portfile. For variant no_x11: DELETE: --enable-freetype. ADD: --disable-freetype, --enable-quartz, --enable-quartz-font, --enable-quartz-image and --enable-png

The global configure.args for this port already contain everything you list, except that they contain --enable-freetype, not --disable-freetype, because I want the freetype backend enabled, just like I want the Quartz backend enabled.

comment:16 Changed 16 years ago by macports@…

Okay, good. I think we've got this bug figured out then.

I would like to see a cairo variant build the Quartz font backend without the freetype backend. Once the Quartz GTK2 stack is stable, freetype should be unnecessary (two font engines is quite redundant) unless one wants to use X11 applications for their network-centricity. I think using "quartz" (build quartz & avoid freetype) and "no_x11" (avoid X11) like the GTK2 port will avoid confusion. GTK2's Portfile even says "cairo must be installed with the quartz variant enabled."

comment:17 in reply to:  16 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to macports@flyn.org:

I would like to see a cairo variant build the Quartz font backend without the freetype backend. Once the Quartz GTK2 stack is stable, freetype should be unnecessary (two font engines is quite redundant) unless one wants to use X11 applications for their network-centricity. I think using "quartz" (build quartz & avoid freetype) and "no_x11" (avoid X11) like the GTK2 port will avoid confusion.

A variant called "quartz" will make people think they need to use that variant to get Quartz functionality, which isn't true; Quartz functionality is always enabled on Mac OS X, since cairo 1.6.x.

In MacPorts we usually like to build ports with maximal functionality. In this case, that would be a cairo port that supports as many backends as possible. That's what I do now. I could probably add a variant to disable fontconfig support, if there's a strong desire for that. Such a request should be made in a separate ticket. Note that all software that uses cairo must be written to support all backends. You can't just compile cairo with Quartz support and expect all cairo-using applications to know how to use Quartz. Each app must be written for this. Not all apps are. So there will likely be some cairo-using apps that need fontconfig. Even if today you only need GTK2 with only Quartz support, tomorrow you may want to install an unrelated app which happens to require cairo with fontconfig. So why not install a cairo with all possible backends in the first place? Which is what we offer now. (Except for glitz support. Which is in a variant. I don't know anything about glitz.)

GTK2's Portfile even says "cairo must be installed with the quartz variant enabled."

That must be from the cairo 1.4.x days, when quartz support was still experimental, disabled by default, and therefore in a variant. In cairo 1.6.x, the Quartz backend was marked stable, and enabled by default, therefore I removed the variant and integrated it into the core port.

comment:18 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

I believe I fixed #15209. Please follow instructions there and let me know if that fixes this issue as well.

comment:19 in reply to:  18 Changed 16 years ago by mike@…

Replying to ryandesign@macports.org:

I believe I fixed #15209. Please follow instructions there and let me know if that fixes this issue as well.

I can confirm, that the patch in #15209 fixes the problem I reported earlier.

comment:20 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

comment:21 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Changed 14 years ago by thmx.2k7@…

Attachment: switch2.png added

switch2 - boxes instead of text

comment:22 Changed 14 years ago by thmx.2k7@…

Resolution: fixed
Status: closedreopened

Re-open because the problem still remains with cairo @1.8.10+quartz+no_x11

When I open a GTK application, I see boxes instead of text.

(cf: see the switch2.png attachement above)

comment:23 Changed 14 years ago by thmx.2k7@…

Sorry, I found #20924 who resolve the problem except that I've installed pango-devel instead of the new Portfile

comment:24 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Port: pango added
Resolution: fixed
Status: reopenedclosed

Then I'll leave this ticket as fixed, since the problem from two years ago was, as far as I know, fixed.

Note: See TracTickets for help on using tickets.