GNOME Bugzilla – Bug 86911
pango assertion fault with open office tt font
Last modified: 2004-12-22 21:47:04 UTC
Trying to display any tt font from OpenOffice in the Gtk+ font selector leads to a assertion fault, and the font selector disappearing. ** ERROR **: file pangoxft-font.c: line 738 (pango_xft_font_get_font): assertion failed: (charmap != face->num_charmaps) aborting... Trace/breakpoint trap What I think as the interesting bits from the bt:
+ Trace 24506
Version: pango 1.0.3-2 X 4.2.0 Xft rendering (with AA enabled) freetype 2.1.1-3 Arioso from the OpenOffice distribution (seems to also be installed with StarOffice 6.0)
*** Bug 86849 has been marked as a duplicate of this bug. ***
Other people seeing this too, with other fonts. cc'ing sun as I'm sure they are interested about problems with their own fonts :)
The sequence of problems here is: xftcache is run with an old version of FreeType FreeType is upgraded to 2.1.0 which can't read the openoffice (junk) fonts. The Xft cache files don't agree with what FreeType knows about the fonts, causing an assertion failure. I have a Pango patch to not die, but other than that it is a NOTGNOME problem. It can be fixed by either upgrading to a newer FreeType (2.1.1 or 2.1.2 should work) or rerunning xftcache. OpenOffice no longer actually ships with these fonts.
I never ran xftcache, I didn't even know it existed before you told me about it. Then I ran it, and the font didn't appear in the font selector anymore (which I guess is the way it deals with broken fonts). Still it would be nice if it didn't display anything, or some error instead of just crapping out, just like gdk-pixbuf doesn't crap out when you feed it incomplete images. I agree that it shouldn't be Pango's problem, but it still is a shame seeing a Gtk+ app die like that. And there I'm going to add my grain of salt, saying that assertions are supposed to guard against programming errors, not user/machine/system input problems. In the end, please commit your work-around :)
I have freetype 2.1.1, and that didn't fix the problem (although xftcache does). 2.1.2 maybe?
Committed the patch I had around: Wed Jul 3 18:39:45 2002 Owen Taylor <otaylor@redhat.com> * pango/pangoft2.c pango/pangoxft-font.c: Be more robust when trying to set the unicode character map on the font. (#86911)
*** Bug 89698 has been marked as a duplicate of this bug. ***
I have freetype 2.1.2, I've deleted all XftCache files in font directories and pango crashes no more.