Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 336527 - x11-libs/cairo 1.10.0 causes font rendering regression with subpixel smoothing
Summary: x11-libs/cairo 1.10.0 causes font rendering regression with subpixel smoothing
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-09 06:41 UTC by Mark R. Pariente
Modified: 2011-03-08 14:48 UTC (History)
10 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark R. Pariente 2010-09-09 06:41:48 UTC
Upgrade from cairo 1.8.10 to 1.10.0 causes visible font rendering regression. I have an LCD monitor and I'm using the "Subpixel smoothing" setting in GNOME in System->Preferences->Appearance->Fonts. Before the cairo upgrade fonts looked very smooth, after the upgrade fonts look visibly uglier (have slight blueish shadows, I can attach screenshots if needed). Reverting cairo makes fonts look good again.

Reproducible: Always

Steps to Reproduce:




USE flags for both versions:

[ebuild   R   ] x11-libs/cairo-1.8.10  USE="X cleartype glitz opengl svg (-aqua) -debug -directfb -doc -lcdfilter -xcb" 0 kB

[ebuild     U ] x11-libs/cairo-1.10.0 [1.8.10] USE="X opengl svg (-aqua) -debug -directfb -doc (-drm) (-gallium) -openvg% -qt% -static-libs% -xcb (-cleartype%*) (-glitz%*) (-lcdfilter%)" 0 kB

emerge --info:
Portage 2.1.9.2 (default/linux/x86/10.0, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.35-gentoo-r4-i686-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 09 Sep 2010 06:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.67
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -mfpmath=sse -mmmx -msse2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O3 -pipe -mfpmath=sse -mmmx -msse2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/pro-audio /var/lib/layman/vmware /var/lib/layman/mozilla /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa artworkextra avahi berkdb branding bzip2 cairo cdr cleartype cli cracklib crypt cscope cups cxx dbus dri dv dvd dvdr eds emerald encode exif fam ffmpeg flac fortran gdbm glitz gnome gpm gstreamer gtk gtk2 iconv id3tag iphone ipod ipv6 jabber jack jpeg lame ldap mad mmx mmxext modules mono mp3 mp4 mpeg msn mudflap nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session sse sse2 ssl svg sysfs tcpd theora threads tiff truetype unicode v4l v4l2 vorbis win32codecs x264 x86 xcomposite xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rahul Jain 2010-09-09 07:17:06 UTC
I was expecting this behaviour with the removal of the "lcdfilter" and the "cleartype" flags. What I would like to know whether these patches have been merged upstream or are we waiting for a compatible release?
Comment 2 Hans Nieser 2010-09-11 11:20:01 UTC
Also ran into this, the ChangeLog doesn't say why these USE flags were removed, and looking at the 1.9.10 upstream changelog I found:

  Also to the relief of many we have included the downstream patch to honour
  the user's LCD filtering preferences for subpixel rendering of fonts.  The
  interface remains private for the time being, whilst the proposed public
  API is finalized.

So not sure if this means the patch isn't needed anymore and wether it's supposed to just work now and maybe something else is wrong
Comment 3 Hans Nieser 2010-09-11 12:01:20 UTC
I guess it is still needed, there is a supposedly working patch in bug #331743
Comment 4 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-09-14 09:56:25 UTC
Perhaps the situation w.r.t. this can be made clearer via an elog/ewarn message or an eselect news message?
Comment 5 Giacomo Perale 2010-09-18 13:32:55 UTC
This patch in that bug report is useless, it just duplicates in cairo the functionality provided by freetype.

To enable cleartype-like filtering again you need the fontconfig patch you can find in bug 306053 and then you have to run 

eselect fontconfig enable 11-lcdfilter-default.conf
Comment 6 Raffaello D. Di Napoli 2011-02-15 01:06:09 UTC
(In reply to comment #5)
> This patch in that bug report is useless, it just duplicates in cairo the
> functionality provided by freetype.
> 
> To enable cleartype-like filtering again you need the fontconfig patch you can
> find in bug 306053 and then you have to run 
> 
> eselect fontconfig enable 11-lcdfilter-default.conf

What does this mean?
I just emerged cairo 1.10.2-r1 which just went stable, and after noticing my eyes were hurting from trying to read these all too colorful I’s and i’s and any vertical bar-like character, I ended up reverting to cairo 1.8.10 .

So I read here that the patch activated by the cleartype USE flag has been integrated upstream, and it’s to be enabled via fontconfig, so in turn via eselect-fontconfig. Too bad the configuration replacing the patch still isn’t there.

For me, I can easily add the missing files myself. But what about other users, especially newcomers? Do they really have to struggle with imperfect hinting, before understanding what’s wrong and still not be able to apply the solution?

Is there a reason cairo 1.10 went stable removing something that was supposed to be added back by a version/revision of fontconfig which just doesn’t exist yet?
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2011-03-08 12:02:28 UTC
This is not a bug in cairo.

Just use your freetype correctly (this probably should be documented properly, but nothing x11/cairo maintainers should do).
Comment 8 Raffaello D. Di Napoli 2011-03-08 14:48:55 UTC
(In reply to comment #7)
> This is not a bug in cairo.
> 
> Just use your freetype correctly (this probably should be documented properly,
> but nothing x11/cairo maintainers should do).

What does this mean? How do I “use my freetype correctly”?

auto-hinter : Use the unpatented auto-hinter instead of the (recommended)
              TrueType bytecode interpreter
bindist     : Flag to enable or disable options for prebuilt (GRP)  packages (eg.
              due to licensing issues)
fontforge   : Install internal headers required for TrueType debugger in
              media-gfx/fontforge (built with USE=truetype-debugger)
utils       : Install utilities and examples from ft2demos

Which one of these constitute using freetype correctly?
And/or, if “this should be documented properly” but you can’t be the one to do that, you could still write an explanatory line or two here so that I, or anybody else reading/finding this, would understand why a feature now missing from cairo is “nothing x11/cairo maintainers should” take care of.