Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213914 - x11-libs/qt-4.3.4: Font anti-aliasing broken for QT4
Summary: x11-libs/qt-4.3.4: Font anti-aliasing broken for QT4
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-19 11:59 UTC by Andreas Schäfer
Modified: 2008-10-01 14:07 UTC (History)
2 users (show)

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


Attachments
test program (test.cpp,236 bytes, text/plain)
2008-03-19 12:00 UTC, Andreas Schäfer
Details
actual results (test.qt4.png,2.81 KB, image/png)
2008-03-19 12:00 UTC, Andreas Schäfer
Details
expected results (test.qt3.png,4.17 KB, image/png)
2008-03-19 12:00 UTC, Andreas Schäfer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schäfer 2008-03-19 11:59:30 UTC
I've recently noticed that fonts in QT apps compiled with QT4 look chunky compared to those from QT3 apps. Looks like font anti-aliasing doesn't work for them.

Reproducible: Always

Steps to Reproduce:
1.I've written a simple test program "test.cpp": http://gentryx.de/~gentryx/test.cpp

2.Compile it once with QT3 and once with QT4:
g++ -I/usr/qt/3/include/ -L/usr/qt/3/lib64 test.cpp -lqt -o test.qt3
g++ -I/usr/include/qt4/ -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -L/usr/lib64/qt4 test.cpp -lQtGui -lQtCore -o test.qt4
3.Run the programs and compare the label on the button. QT4 isn't aliased, as I've specified it with fontconfig.

Actual Results:  
The result is an unsmoothed font for QT4: http://gentryx.de/~gentryx/test.qt4.png

Expected Results:  
I'd much rather have the smoothed look QT3 gives me: http://gentryx.de/~gentryx/test.qt3.png

wintermute ~ # emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.24-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r3 x86_64 AMD Athlon(tm) X2 Dual Core Processor BE-2350
Timestamp of tree: Tue, 18 Mar 2008 12:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon64 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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="/usr/portage/local/layman/sajinet /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aalib accessibility acl acpi alsa amd64 arts artswrappersuid bash-completion berkdb cairo ccache cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emacs emboss encode esd ethereal evo exif fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv imap iptc ipv6 isdnlog jpeg kde kerberos ldap libcaca lirc mad midi mikmod mmx mp3 mpeg mudflap musicbrainz nas ncurses nforce2 nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png pppd preview-latex python qt3 qt3support qt4 quicktime raw readline reflection samba sasl sdl session slang smtp spell spl sqlite sse sse2 ssl svg tcpd threads tiff truetype unicode usb vorbis xcomposite xml xorg xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="hauppauge" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

wintermute ~ # eselect fontconfig list
Available fontconfig .conf files ( * is enabled ):
  [1]   10-autohint.conf *
  [2]   10-no-sub-pixel.conf
  [3]   10-sub-pixel-bgr.conf
  [4]   10-sub-pixel-rgb.conf
  [5]   10-sub-pixel-vbgr.conf
  [6]   10-sub-pixel-vrgb.conf
  [7]   10-unhinted.conf
  [8]   20-fix-globaladvance.conf *
  [9]   20-unhint-small-vera.conf *
  [10]  25-unhint-nonlatin.conf
  [11]  30-metric-aliases.conf *
  [12]  30-urw-aliases.conf *
  [13]  40-nonlatin.conf *
  [14]  45-latin.conf *
  [15]  49-sansserif.conf *
  [16]  50-user.conf *
  [17]  51-local.conf *
  [18]  60-latin.conf *
  [19]  65-fonts-persian.conf *
  [20]  65-nonlatin.conf *
  [21]  69-unifont.conf *
  [22]  70-no-bitmaps.conf
  [23]  70-yes-bitmaps.conf
  [24]  80-delicious.conf *
  [25]  90-synthetic.conf *
gentryx@wintermute ~ $ cat .fonts.conf
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>none</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>
Comment 1 Andreas Schäfer 2008-03-19 12:00:06 UTC
Created attachment 146569 [details]
test program
Comment 2 Andreas Schäfer 2008-03-19 12:00:29 UTC
Created attachment 146570 [details]
actual results
Comment 3 Andreas Schäfer 2008-03-19 12:00:47 UTC
Created attachment 146572 [details]
expected results
Comment 4 jlh 2008-05-18 20:18:31 UTC
While developing a Qt 4 application I noticed the same: All of my GUI had non-antialiased fonts.  But now I just realized that if I configure a different default font in qtconfig, it works just fine.  It also works if Qt Widgets explicitely use a different font.  I've set it to Arial and I now get antialiased fonts.

Most fonts work fine, but "Sans-Serif", which was set before (and probably is a default) and a few other fonts do not antialias.

Using Qt 4.3.3 here.
Comment 5 Roman Krylov 2008-10-01 07:51:35 UTC
Since upgrading to qt-4.4 I see all fonts are antialiased in qt apps.
So fonts.conf(local.conf) really does not work for qt.
Perhaps in kde environment it'll be ok, but I use gnome and wanted to use new qgtkstyle engine wrapper.
Comment 6 Roman Krylov 2008-10-01 13:55:29 UTC
Sorry for confusion.
It was my problem: I only had size filter in local.conf and had to add pixelsize filter as well.
Now fonts look same way as in GTK apps.
Comment 7 Ben de Groot (RETIRED) gentoo-dev 2008-10-01 14:07:40 UTC
Looks to me this is a matter of configuring your default fonts correctly, not a bug in Qt.