Currently, Firefox and Mozilla have rather poor support for laying out and rendering complex international scripts (like Indic scripts). The actual installation of fonts for these scripts is not a problem, but the rendering engine is not capable of displaying these complex scripts. By using Pango, however, it would be possible to render these scripts, something that Fedora Core 3 already does. FC3 users can set the environment variable MOZ_ENABLE_PANGO=1 and launch Firefox or Mozilla to enable Pango font rendering. The patch that FC3 uses to do this is attached. Perhaps a USE flag (like 'pango' or 'mozpango') could be setup in the ebuild to enable this behavior in Gentoo as well, with or without the use of this environment variable. To try implementing this, I've tried modifying the Firefox 1.0-r3 ebuild myself to use the FC3 patch but with little success. I simply added the line 'epatch ${FILESDIR}/mozilla-1.7.3-pango-render.patch' to the end of src_unpack. The resulting build doesn't appear to have proper Pango rendering support (using the MOZ_ENABLE_PANGO environment variable). I believe the problem may have to do with the mozconfig setup, but not having much experience with building Firefox or Mozilla, I'm not exactly sure what's wrong. I'll continue to look at this problem, but I figured it might be wise to share this problem with people who have more experience with Firefox and Mozilla. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 46691 [details, diff] mozilla-1.7.3-pango-render.patch
Comment on attachment 46691 [details, diff] mozilla-1.7.3-pango-render.patch FC3 Mozilla/Firefox Pango Rendering Patch
Fixed the problem I was having. Since configure.in is being patched, autoconf needs to be run. Additionally, --enable-pango needs to be specified as a configure option. Tested the build with these changes and rendering with Pango works if the MOZ_ENABLE_PANGO environment variable is set to 1. I will post an ebuild shorly that uses the mozpango USE flag.
Created attachment 46701 [details] mozpango enabled mozilla-firefox-1.0-r3.ebuild
Confirmed that the patch also works with Mozilla 1.7.5, and am going to attach the ebuild shortly. After doing a bit more digging around, I realized that the FC3 patch came primarily from Bug 215219 (https://bugzilla.mozilla.org/show_bug.cgi?id=215219) on Mozilla's Bugzilla, which originally used the environment variable MOZ_DISABLE_PANGO to explicitly disable rendering with Pango instead of using MOZ_ENABLE_PANGO to explicitly force rendering with Pango. I'm not sure which behavior would be more appropriate, and it would be trivial to switch to the MOZ_DISABLE_PANGO method. Also realized that this bug had been submitted in another form for Mozilla 1.6 as (Gentoo) bug 39685, which was marked WONTFIX because of problems compiling and the expectation that the patch would included in 1.7-final. Given that this didn't happen, and the patch appears to work, would it be possible to maintain this patch for the current releases of Mozilla and Firefox?
Created attachment 46708 [details] mozpango enabled mozilla-1.7.5.ebuild
When I try to launch mozilla-firefox-bin 1.0.3 or 1.0.4 I get this error: ===================================== $ firefox-bin No running windows found Removing /home/michael/.mozilla/firefox/t2vbssc9.default/compreg.dat leftover from older firefox Removing /home/michael/.mozilla/firefox/t2vbssc9.default/XUL.mfasl leftover from older firefox Warning: Couldn't extract MOZ_USER_DIR from /opt/firefox/firefox-bin LoadPlugin: failed to initialize shared library /usr/lib/nsbrowser/plugins/gxineplugin.so [/usr/lib/nsbrowser/plugins/gxineplugin.so: cannot open shared object file: Permission denied] LoadPlugin: failed to initialize shared library /usr/lib/nsbrowser/plugins/libflashplayer.so [/usr/lib/nsbrowser/plugins/libflashplayer.so: cannot open shared object file: Permission denied] LoadPlugin: failed to initialize shared library /usr/lib/nsbrowser/plugins/libNPSVG3.so [/usr/lib/nsbrowser/plugins/libNPSVG3.so: cannot open shared object file: Permission denied] (firefox-bin:3991): Pango-WARNING **: No builtin or dynamically loaded modules were found. Pango will not work correctly. This probably means there was an error in the creation of: '/etc/pango/pango.modules' You may be able to recreate this file by running pango-querymodules. (firefox-bin:3991): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (firefox-bin:3991): Pango-CRITICAL **: _pango_engine_shape_shape: assertion `PANGO_IS_FONT (font)' failed Pango-ERROR **: file shape.c: line 75 (pango_shape): assertion failed: (glyphs->num_glyphs > 0) aborting... /usr/libexec/mozilla-launcher: line 547: 3991 Aborted "$mozbin" "$@" firefox-bin exited with non-zero status (134) Warning: Couldn't extract MOZ_USER_DIR from /opt/firefox/firefox-bin ======================================= I have re-emerged pango, gtk+ and of course firefox-bin to no avail. -- Regards, Mick
Pango also borks gxine: ===================== $ gxine (gxine:26607): Gtk-CRITICAL **: gtk_window_set_default_icon: assertion `GDK_IS_PIX BUF (icon)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widge t)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widge t)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widge t)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widge t)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widge t)' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to loa d image-loading module: /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so: dyn amic modules are not supported by this system (gxine:26607): Gtk-CRITICAL **: gtk_pixmap_new: assertion `val != NULL' failed (gxine:26607): Gtk-CRITICAL **: gtk_table_attach: assertion `GTK_IS_WIDGET (child) ' failed (gxine:26607): Gtk-CRITICAL **: gtk_table_attach: assertion `GTK_IS_WIDGET (child) ' failed (gxine:26607): Gtk-CRITICAL **: gtk_widget_unmap: assertion `GTK_IS_WIDGET (widget )' failed (gxine:26607): Pango-WARNING **: No builtin or dynamically loaded modules were found. Pango will not work correctly. This probably means there was an error in the creation of: '/etc/pango/pango.modules' You may be able to recreate this file by running pango-querymodules. (gxine:26607): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (obj ect)' failed (gxine:26607): Pango-CRITICAL **: _pango_engine_shape_shape: assertion `PANGO_IS_F ONT (font)' failed Pango-ERROR **: file shape.c: line 75 (pango_shape): assertion failed: (glyphs- >nu m_glyphs > 0) aborting... Aborted ======================== I guess this is a pango problem? -- Regards, Mick
We are using pango by default on all firefox/thunderbird/mozilla builds in the tree.