GNOME Bugzilla – Bug 323892
No TrueType printing with epiphany
Last modified: 2007-08-01 18:31:02 UTC
Please describe the problem: Truetype rendering is very well implemented in the GNOME desktop environment and epiphany is no exception in this respect. However, despite the nicely rendered on-screen web pages, printing output is pretty poor. In this case, epiphany actually falls back to using plain PS fonts. Steps to reproduce: 1. Launch epiphany - any version up to 1.9.x 2. Display a web page using TrueType fonts. 3. Print the web page. Actual results: Only PS fonts are used for printing. Expected results: Available Truetype fonts which have been used to render the web page on the screen should also be used for printing. Does this happen every time? Yes. Other information: epiphany moved to libgnomeprintui as of version 1.7.3. Unfortunately, this did not improve anything from the user's point of view. Until then, one could at least theoretically use an Xprint enabled mozilla build to use its extended printing capabilities. Well, theoretically, because then there was this nasty page size bug forcing the user to print from mozilla itself.
Other GNOME applications which also rely on the libgnomeprintui backend for printing do print TrueType fonts without any problem.
As far as I can determine, this is a bug in your distribution's mozilla package. FC* builds mozilla with --disable-freetype2, which disables truetype printing.
Right, my current distro is Fedora rawhide featuring "epiphany-1.9.7-1" and "mozilla-1.7.12-6". I have had a look at the "Mozilla" spec file. Indeed, freetype2 is disabled: %define toolkit_options --enable-default-toolkit=gtk2 \ --disable-freetype2 --enable-xft --enable-pango However, even rebuilding the package with the option "--enable-freetype2" does not change anything. After removing all of ".mozilla/", ".gnome*" etc., opening "about:config", "font.FreeType2.printing" is set to "true", "font.FreeType2.enable" is set to false, but setting it to "true" as well also does not change anything either. Is this surprising, given that "epiphany" switched from the "Mozilla" printing backend to "libgnomeprint" as of version 1.7.3? Enabling "freetype2" should influence "Mozilla" printing but that is not used anyway, right? So, why does "epiphany" not print "TrueType" fonts when they are used to render on-screen, and it is using the "GNOME" printing backend which prints "TrueType" perfectly, e.g. in the case of applications like "abiword"?
font.FreeType2.enable isn't checked for printing in an Xft-enabled build. So, when you print a page to a file, using font.FreeType2.printing = false and = true, the output file is exactly the same each time, both with the stock FC mozilla and your --enable-freetype2 build? I assume you've made sure that the build really did use freetype, i.e. the freetype headers were installed, and mozilla's configure did detect them? If I do that on my ubuntu breezy build where epiphany uses firefox 1.0 with freetype enabled, the output files are not the same. Epiphany uses libgnomeprint[ui] only for the fontend code; the web page is rendered as postscript into a temp file by the mozilla backend (so depends on --enable-freetype2), and then printed with libgnomeprint to the selected printer.
In general, I have all the essential development libraries installed. "FreeType2" makes no exception in this respect, "rpm -qa | grep freetype" yields: freetype-devel-2.1.10-5.2.1 freetype-2.1.10-5.2.1 When I rebuild my customized, "FreeType2" enabled "Mozilla" package, I obtain the following snippets of output from the "configure" stage: ------------------------------------------------------------------------------ ./configure --prefix=/usr --libdir=/usr/lib '--enable-optimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --disable-debug --with-default-mozilla-five-home=/usr/lib/mozilla-1.7.12 --disable-strip-libs --disable-tests --enable-xinerama --enable-nspr-autoconf --enable-extensions=default,irc --without-mng --enable-crypto --disable-xprint --with-system-nspr --with-system-nss --with-system-zlib --with-system-png --with-system-jpeg --enable-default-toolkit=gtk2 --enable-freetype2 --enable-xft --enable-pango --mandir=/usr/share/man ------------------------------------------------------------------------------ checking for freetype-config... /usr/bin/freetype-config checking for FreeType - version >= 6.1.0... yes ------------------------------------------------------------------------------ checking MOZ_XFT_CFLAGS... -I/usr/include/freetype2 ------------------------------------------------------------------------------ #define ACCESSIBILITY 1 #define D_INO d_ino #define FUNCPROTO 15 #define HAVE_DIRENT_H 1 #define HAVE_FCHMOD 1 #define HAVE_FLOCKFILE 1 #define HAVE_GETOPT_H 1 #define HAVE_GNU_GET_LIBC_VERSION 1 #define HAVE_GNU_LIBC_VERSION_H 1 #define HAVE_GSSAPI_GSSAPI_GENERIC_H 1 #define HAVE_GSSAPI_GSSAPI_H 1 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1 #define HAVE_I18N_LC_MESSAGES 1 #define HAVE_INT16_T 1 #define HAVE_INT32_T 1 #define HAVE_INT64_T 1 #define HAVE_LANGINFO_CODESET 1 #define HAVE_LCHOWN 1 #define HAVE_LIBDL 1 #define HAVE_LIBM 1 #define HAVE_LIBPANGOFT2_1_0 1 #define HAVE_LOCALTIME_R 1 #define HAVE_MALLOC_H 1 #define HAVE_MEMMOVE 1 #define HAVE_MEMORY_H 1 #define HAVE_NL_TYPES_H 1 #define HAVE_RANDOM 1 #define HAVE_RES_NINIT 1 #define HAVE_RINT 1 #define HAVE_SIGINFO_T 1 #define HAVE_SNPRINTF 1 #define HAVE_STRERROR 1 #define HAVE_STRTOK_R 1 #define HAVE_ST_BLKSIZE 1 #define HAVE_SYS_BITYPES_H 1 #define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_STATFS_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_UINT 1 #define HAVE_UNAME_DOMAINNAME_FIELD 1 #define HAVE_UNISTD_H 1 #define HAVE_VA_COPY 1 #define HAVE_VISIBILITY_ATTRIBUTE 1 #define HAVE_X11_XKBLIB_H 1 #define HAVE_XSHM 1 #define HAVE___CXA_DEMANGLE 1 #define IBMBIDI 1 #define JS_THREADSAFE 1 #define MOZILLA_LOCALE_VERSION "1.7" #define MOZILLA_REGION_VERSION "1.7" #define MOZILLA_SKIN_VERSION "1.5" #define MOZILLA_VERSION "1.7.12" #define MOZ_ACCESSIBILITY_ATK 1 #define MOZ_APP_NAME "mozilla" #define MOZ_DEFAULT_MOZILLA_FIVE_HOME "/usr/lib/mozilla-1.7.12" #define MOZ_DEFAULT_TOOLKIT "gtk2" #define MOZ_DLL_SUFFIX ".so" #define MOZ_ENABLE_COREXFONTS 1 #define MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS 1 #define MOZ_ENABLE_PANGO 1 #define MOZ_ENABLE_XFT 1 #define MOZ_ENABLE_XINERAMA 1 #define MOZ_ENABLE_XREMOTE 1 #define MOZ_EXTRA_X11CONVERTERS 1 #define MOZ_JSLOADER 1 #define MOZ_LOGGING 1 #define MOZ_MATHML 1 #define MOZ_PROFILELOCKING 1 #define MOZ_PROFILESHARING 1 #define MOZ_USER_DIR ".mozilla" #define MOZ_VIEW_SOURCE 1 #define MOZ_WIDGET_GTK2 1 #define MOZ_X11 1 #define MOZ_XPINSTALL 1 #define MOZ_XUL 1 #define NS_PRINTING 1 #define NS_PRINT_PREVIEW 1 #define OJI 1 #define STDC_HEADERS 1 #define UNIX_ASYNC_DNS 1 #define VA_COPY va_copy #define XP_UNIX 1 #define _REENTRANT 1 ----------------------------------------------------------------------------- Does any of the "epiphany" developers use Fedora? He might know better. I do not notice any difference between the print outputs from the 2 builds. I will recheck and post 2 test screenshots. I did however have success in the past with building and installing an "xorg-x11-Xprint" package for Fedora. This used to work for plain "mozilla" and "firefox". In the case of "epiphany", a paper size bug made it impossible to benefit from "xprint" enabled printing, although the print server showed up nicely in the print dialog. For recent "libgnomeprint[ui]" based releases, this is not a valid approach anymore anyway. That's why I am so interested in getting this "FreeType2" interface work.
I am puzzled. I have now also rebuilt the original unaltered Fedora package, and the configure output is strictly the same as the one posted above ... ? Except for the "--disable-freetype2" vs "--enable-freetype2" option, of course!
When I run the "configure" script exactly as above but *without* applying any of the Fedora custom patches, two previously present options are *missing* from the "#define" list: #define HAVE_LIBPANGOFT2_1_0 1 #define MOZ_ENABLE_PANGO 1 This shouldn't make a difference, but who knows?
> I do not notice any difference between the print outputs from the 2 builds. I > will recheck and post 2 test screenshots. I meant to print into a file, and compare the created files raw and/or in evince, not the printer output. For example, printing a page with CJK characters with FreeType2.printing=false gives only boxes in the output, while with =true the CJK characters do show up, for me. The pango defines are added by the custom fedora patches afaik, but that shouldn't interfere with printing.
I got a comment to the corresponding Red Hat bug report https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112879 Comment #5 From Jungshik Shin on 2006-02-21 09:02 EST [reply] "I don't what's going on with Epiphany. Anyway, they're downright wrong. There's absolutely no need to enable freetype2 to print with **truetype** fonts. PLEASE, read what's done at mozilla bug 234182 !!! There WAS a reason for me to burn a lot of candles 'killing' quite a lot of trees and printer ink. The print quality of firefox 1.5.x with the PS engine that *embeds* truetype glyphs (after converting them to PS type 1 outlines) is a lot better (in terms of WYSWYG and other aspects) than the print quality obtained with Xprint that relies on 20-year old XLFD." The comment refers to a mozilla bug report at: https://bugzilla.mozilla.org/show_bug.cgi?id=234182 Hope this helps to clear up the issue ... .
FC compiles epiphany against mozilla 1.7, which does NOT contain the patch from https://bugzilla.mozilla.org/show_bug.cgi?id=234182 so this comment is true but irrelevant :)
I have built "epiphany-2.15.2" against "xulrunner-1.8.0.4" (CVS) and now, "TrueType" printing even works on my Fedora Core (rawhide) system. Moreover, it turns out that on distributions like "Ubuntu", where "epiphany" is built against a recent "firefox" version (1.5.x.x), "TrueType" printing works out of the box. The issue can thus be considered as settled.
Christian: any reason to keep this open?
(In reply to comment #12) > .. any reason to keep this open? This issue no longer affects recent releases of "GNOME" [> 2.14.x]. Even "FC5" now uses the "gecko-1.8" engine after dropping "mozilla" in favor of "seamonkey". Later flavours of "epiphany" are directly built against recent versions of "firefox" also based on "gecko-1.8".