Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133464 - app-text/ghostscript-esp-8.15.1_p20060430: fonts appear more ugly in gv (compared to 7.07.1-r8) when antialiasing is on
Summary: app-text/ghostscript-esp-8.15.1_p20060430: fonts appear more ugly in gv (comp...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 03:09 UTC by Andy
Modified: 2006-09-28 16:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The test pdf (test.pdf,2.02 KB, application/pdf)
2006-06-15 18:33 UTC, xalan
Details
Helvetica as rendered by acroread 7. This is completely wrong rendering (snapshot1.png,99.38 KB, image/png)
2006-06-15 18:34 UTC, xalan
Details
Helvetica as rendered by xpdf, which is the correct rendering we expect. What is my mistake? (snapshot2.png,38.67 KB, image/png)
2006-06-15 18:38 UTC, xalan
Details
My updmap.cfg (updmap.cfg,4.36 KB, text/plain)
2006-06-15 18:40 UTC, xalan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2006-05-16 03:09:16 UTC
When viewing files with gv, if app-text/ghostscript-esp-7.07.1-r8 is installed, enabling antialiasing produces much better appearance.
If app-text/ghostscript-esp-8.15.1_p20060430 is installed antialiased version looks almost the same as the non-antialiased one: the characters appear smaller and have gaps; subsection titles and text in bold do not appear as bold.

Steps to reproduce:
1. Emerge ghostscript-esp-8.15.1_p20060430
2. Open a PS-file in gv
3. Enable antialising (Menu State->Antialias): you see the image is almost just as bad
4. Try the same with 7.07.1-r8 and enjoy much better appearance

localhost ~ # emerge --info
Portage 2.0.54-r2 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-gentoo-r3 i686)
=================================================================
System uname: 2.6.16-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5, 2.4.2
dev-python/pycrypto: 2.0-r1
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4  -ggdb "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4  -ggdb "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms splitdebug strict userfetch userpriv userpriv_fakeroot usersandbox"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo"
LC_ALL="en_US.UTF-8"
LINGUAS="en en_US de ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib acl alsa apache2 apm arts artswrappersuid audiofile avi berkdb bitmap-fonts bzip2 cdparanoia cdr cli crypt cups curl divx4linux doc dri dts dvd dvdr dvdread eds emacs emboss encode esd exif expat f77 fam ffmpeg flac foomaticdb fortran gd gdbm gif gimpprint glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml idn imagemagick imap imlib ipv6 isdnlog jack java jpeg jpeg2k junit kde lcms ldap libg++ libwww lirc live mad matroska mhash mikmod mmx mng motif mozcalendar mozdevelop mozilla mozsvg mp3 mpeg mysql mythtv nas ncurses nls objc ogg oggvorbis openal opengl oss pam pcre pdflib perl php png ppds pppd python qt quicktime readline real recode reflection ruby samba scanner sdl session spell spl sqlite sse ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vorbis win32codecs wma wmf xine xml2 xmms xorg xprint xv xvid zeroconf zlib video_cards_radeon linguas_en linguas_en_US linguas_de linguas_ru userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-16 03:13:20 UTC
Feel free to complain upstream or use ghostscript-gnu...
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-01 11:41:47 UTC
does it also happen with ghostscript-afpl?
Seems strange to me ..
Probably due to the fontconfig patch.
Comment 3 Andy 2006-06-02 06:56:48 UTC
OK, I've done some further tests:
- ghostscript-afpl-8.53-r4 produces an output that is worse than ghostscript-esp-7.07.1-r8 but better than ghostscript-esp-8.15.1_p20060430 (the fonts appear smaller, and upper parts are rendered worse (e.g. the upper part of 'T' is somewhat smeared, that of 'a' is flat instead of being somewhat rounded) but you still see the subsection titles in bold and bold characters appear as bold).
- ghostscript-afpl-8.15 is just as bad as ghostscript-esp-8.15.1_p20060430.
- ghostscript-gnu-8.16-r1 is just as bad as ghostscript-esp-8.15.1_p20060430.

So ghostscript-esp-7.07.1-r8 still produces the best antialiased output.
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-02 07:08:14 UTC
well, downgrading is not really an option for me. So I guess we need to find out what exactly is causing the rendering regression and patch that in ..

Any ideas?
Comment 5 Andy 2006-06-02 11:03:11 UTC
Just to be complete, the unstable versions:
- ghostscript-afpl-8.54 behaves as ghostscript-afpl-8.53-r4 (i.e. middle way between good and bad).
- ghostscript-esp-8.15.2_p20060520 behaves as bad as does ghostscript-esp-8.15.1_p20060430.
- ghostscript-gnu-8.16-r3 is as bad as ghostscript-gnu-8.16-r1.

-ghostscript-esp-7.07.1-r10 is as good as 7.07.1-r8
Comment 6 xalan 2006-06-15 18:32:28 UTC
(In reply to comment #4)
> well, downgrading is not really an option for me. So I guess we need to find
> out what exactly is causing the rendering regression and patch that in ..
> 
> Any ideas?

Hey Stefan:

  I followed Karl's suggestion in #135354 that did not help. I can confirm the claim that antialias has no effect in gs. I am using the latest stable ghostscript-esp-8.15.2_p20060520. 

That is not the only problem I have with gs. It seems that acroread is not able to properly decipher the fonts spit out by the following chain, latex -> dvipdf. It is rendering different fonts for helvetica. I also tested with times roman and it is rendering different. I will post the screen shots shortly. To further test the issue, I opened the test pdf in acroread in windows XP, there it is rendering the fonts properly. How so?? I thought acroread's punchline was platform-agnostic rendering :) I am generating the pdfs with embedded fonts.

Please see the attachments that follow.
Comment 7 xalan 2006-06-15 18:33:28 UTC
Created attachment 89276 [details]
The test pdf
Comment 8 xalan 2006-06-15 18:34:31 UTC
Created attachment 89277 [details]
Helvetica as rendered by acroread 7. This is completely wrong rendering
Comment 9 xalan 2006-06-15 18:38:54 UTC
Created attachment 89278 [details]
Helvetica as rendered by xpdf, which is the correct rendering we expect. What is my mistake?
Comment 10 xalan 2006-06-15 18:40:46 UTC
Created attachment 89279 [details]
My updmap.cfg
Comment 11 xalan 2006-06-16 22:23:48 UTC
Never mind about the acroread problem. I upgraded acrocread and it is showing the proper fonts. But there is a catch. It shows the improper fonts for about a second or so and then it is able to find the proper font. I hear the sound of disk turning, it seems acroread is using some greedy scheme to map the fonts of the document and then finds the correct font and redraws the screen with proper fonts.

The point of original poster remains, that is in ghostscript 8.x there is little effect of anti-aliasing. It is specifically in the case of documents generated using times font and generated by latex. The documents using computer modern i.e. default latex font, are rendered properly and anti-aliasing shows the effect. The antialiasing effect is less in case of times font. The problem in bug #135354 remains. ghostscript 7-0 is renders all fonts great. May be the new gpled version of ghostscript-8.53 has some solution to the problem.
Comment 12 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-17 01:17:35 UTC
ghostscript-afpl is the same as the newly released gpl version which does not have an ebuild yet.

In gv I have added a patch:
    # Make font render nicely even with gs-8, bug 135354
    sed -i -e "s:-dGraphicsAlphaBits=2:\0 -dAlignToPixels=0:" \
        src/{gv_{class,user,system}.ad,Makefile.{am,in}}

Does the-dAlignToPixels=0 param maybe help for you?
Comment 13 Andy 2006-07-06 15:41:26 UTC
I see no differences between app-text/gv-3.6.1-r3 and app-text/gv-3.6.1-r4 (the one with the patch), neither with app-text/ghostscript-esp-7.07.1-r8 (with its good quality), nor app-text/ghostscript-gpl-8.54 (with the somewhat decreased quality, as described in comment #3 for ghostscript-afpl-8.53-r4).
Comment 14 Stefan Schweizer (RETIRED) gentoo-dev 2006-08-18 18:16:12 UTC
obviously I have no idea here :( Can you please contact upstream about this and tell me in case you have a patch?
Comment 15 Andy 2006-08-27 15:20:55 UTC
Upstream contacted:
http://www.cups.org/espgs/str.php?L1937
Comment 16 Andy 2006-09-28 16:22:25 UTC
After the answer from CUPS guy:
> [STR Closed w/o Resolution]
> 
> This is a known regression with the GPL Ghostscript X11 driver, and I don't
> know if it is fixed in the 8.5x releases or not.
> 
> The fix has to come from upstream, please report this to the Ghostscript
> folks...
I searched the bugs on ghostscript.com (GPL Ghostscript bugzilla linked from http://www.cs.wisc.edu/~ghost/), and found from there on that it is indeed known to them
  ghostscript x11 rendering bad enough to be unusable:
  https://bugzilla.novell.com/show_bug.cgi?id=140100
( Fonts in TeX output look ugly in ghostview:
  https://bugzilla.novell.com/show_bug.cgi?id=132624)
In
  Screen rendering with x11 device unusable:
  http://www.cups.org/str.php?L1363
a CUPS guy suggests to use:
> [...] the PNM device with antialiasing for screen viewing - the X11 device no longer provides any advantage due to how fonts are handled in modern Linux distros...

Some relevant bug reports on ghostscript.com:
  text rendering in 8.14 poorer than in 7.x in small sizes:
  http://bugs.ghostscript.com/show_bug.cgi?id=687376
( bad antialiasing:
  http://bugs.ghostscript.com/show_bug.cgi?id=688867)

This one offers some patches (which I didn't test) in comment #21
  bad artefacts with X11 antialiasing at small font sizes:
  http://bugs.ghostscript.com/show_bug.cgi?id=688496
but perhaps it's easier to wait for a new revision.