Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139776 - freetype-2.1.10-r2: wrong and blurry hinting of fonts (with bindist) OR different font alltogether (without bindist)
Summary: freetype-2.1.10-r2: wrong and blurry hinting of fonts (with bindist) OR diffe...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
: 167632 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-09 07:22 UTC by pjv
Modified: 2007-03-10 16:01 UTC (History)
4 users (show)

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


Attachments
~/.fonts.conf (.fonts.conf,1.52 KB, text/plain)
2006-07-09 07:26 UTC, pjv
Details
/etc/fonts/local.conf (local.conf,1.02 KB, text/plain)
2006-07-09 07:27 UTC, pjv
Details
/etc/fonts/fonts.conf (fonts.conf,11.36 KB, text/plain)
2006-07-09 07:27 UTC, pjv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pjv 2006-07-09 07:22:23 UTC
I recently updated the whole xorg-x11-6.8* to the new modular
xorg-x11-7.0-r1, following the Gentoo xorg migration guide. Freetype was
updated from 2.1.9-r1 to 2.1.10-r2. Apparently this messed up my font
hinting. I hardly changed anything to my config (at least nothing
relevant). I also didn't touch my gnome setting (set to complete rgb
hinting). I used to have for the letter "l" like five stacked black
pixels, but now columns of yellow pixels were added to the sides, making
text look very yellowish and blurry and difficult for my eyes. Changing
rgb to the other three sequences in gnome couldn't make it better.

See for screenshots: http://http://users.skynet.be/pjvh/yellow.png
showing the problem and users.skynet.be/pjvh/yellow2.png with problem
solved (where the problem was solved by downgrading freetype again).

The problem can be fixed temporarily by downgrading to 2.1.9-r1.



I had a discussion on this problem with James Cloos. This is what came out of it:

Apparently in the higher version the bytecode interpreter is disabled for some reason.

James Cloos advised the following (and my answers are included as well):
"
> Also, try this set of four commands and compare each to the fonts you
> got with the two versions of freetype:
> 
> :; for a in false true
>    do for h in false true
>    do echo "Trying hinting=${h}:autohint=${a}"
>    read
>    xfd -fa "DejaVu Serif:pixelsize=16:hinting=${h}:autohint=${a}" &
>    done
>    done
> 
> (If you use tcsh or zsh you'll have to translate or do it manually;
>  hit enter after each prompt to get the next window.)
For freetype-2.1.10-r2: Your plan doesn't seem to work. I get four times
the same, namely the bad font that was my problem (while running
freetype-2.1.10-r2 so the bad font was present in other new windows as
well)
For freetype-2.1.9-r1 there is a difference:
Trying hinting=false:autohint=false
the bad font that was my problem
Trying hinting=true:autohint=false
the perfect font
Trying hinting=false:autohint=true
the bad font that was my problem
Trying hinting=true:autohint=true
the perfect font
> 
> If the interpreter is enabled, you should have stems that are one
> pixel wide with hinting=true and autohint=false.  
For freetype-2.1.9-r1 from here on: Correct
> With autohint=
> true you should see stems that are two pixels wide.
Not when hinting=true too.
> 
> The tuples hinting=true:autohint=true and hinting=false:autohint=true
> should be identical.
Not correct
> 
> Right now hinting=false:autohint=false isn't working for me; it is
> doing the same as hinting=true:autohint=false.  (Which is the default.)
> It should of course show the glyphs w/o and kind of hinting.
Not so here
"


I am using the bindist flag. As I understand it this should ENABLE the bytecode interpreter. James Cloos however thinks this explains my problem: using the bindist flag DISABLED the bytecode interpreter. So not using that flag would solve my problem. However there is another issue: Without it (freetype-2.1.10-r2) I get a different font alltogether (reminds me of Helvetica) that seems to be properly hinted.
Comment 1 pjv 2006-07-09 07:22:45 UTC
emerge --info
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.15-gentoo-r1030 i686)
=================================================================
System uname: 2.6.15-gentoo-r1030 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System version 1.6.15
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
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-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -Os -pipe -fomit-frame-pointer -fmerge-constants -fno-gcse -fno-peephole2 -funroll-loops -malign-stringops -mfpmath=sse -msse2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/cursors/xfree/default/index.theme,/sbin/halt,/sbin/shutdown,/sbin/reboot,/usr/bin/emerge,/usr/share/xmodmap/xmodmap.us_intl-be-deadkeys,/usr/X11R6/lib/X11/xkb/symbols/pc/us-dutch,/usr/X11R6/lib/X11/xkb/rules/xfree86,/usr/X11R6/lib/X11/xkb/symbols.dir,/usr/X11R6/lib/X11/locale/iso8859-15/Compose,/usr/lib/X11/xkb/symbols/pc/us-dutch,/usr/lib/X11/xkb/rules/xfree86,/usr/lib/X11/xkb/symbols.dir,/usr/lib/X11/locale/iso8859-15/Compose,/usr/X11R6/lib/X11/locale/iso8859-15/Compose.xorg,/usr/lib/X11/locale/iso8859-15/Compose.xorg,/usr/X11R6/lib/X11/xkb/rules/xorg,/usr/lib/X11/xkb/rules/xorg,/usr/share/X11/xkb/symbols/pc/us-dutch,/usr/share/X11/xkb/rules/xfree86,/usr/share/X11/xkb/rules/xorg,/usr/share/X11/xkb/symbols.dir,/usr/share/X11/xkb/symbols/us-dutch /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium-m -Os -pipe -fomit-frame-pointer -fmerge-constants -fno-gcse -fno-peephole2 -funroll-loops -malign-stringops -mfpmath=sse -msse2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch psyco sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo ftp://ftp.gentoo.skynet.be/pub/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo http://ftp.gentoo.skynet.be/pub/gentoo ftp://sunsite.cnlab-switch.ch/mirror/gentoo http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="nl_BE@euro"
LC_ALL="nl_BE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="nl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/musicbrainz /usr/portage/local/layman/break-my-gentoo-main /usr/portage/local/layman/sunrise /usr/portage/local/layman/gentopia /usr/portage/local/layman/science /usr/portage/local/layman/openoffice-geki /usr/portage/local/layman/gnome-experimental /usr/portage/local/layman/ebuild-exchange"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acpi acpi4linux alsa apache2 avi bash-completion berkdb bindist bitmap-fonts bluetooth bonobo browserplugin bzip2 cairo calendar cardbus ccache cddb cdr cdrom cdrparanoia chipcard chroot clanVoice cli codecs cpudetection crypt css cups dbus dga dhcp directfb distribution divx4linux dlloader dnd dri dts dv dvd dvdread edl eds emboss encode esd ethereal evo exif faad faad2 fam fat fbcon fbsplash ffmpeg firefox flac flash font-server foomaticdb freetts freetype ftp gamin gatos gb gdbm gif gimp gimpprint gmail gmailtimestamps gnokii gnome gnome-print gphoto2 gpm gstreamer gtk gtk2 gzip h323 hal howl hpn icq id3 ieee1394 imap imlib ipv6 irc irda isdnlog java javascript jpeg kdgraphics kerberos krb4 lame lcd libg++ libwww lirc live lm_sensors lzo lzw-tiff mad matroska mbox mbrola mdb mime ming mmx mmx2 mmxext mng monkey mono motif mozcalendar mozp3p mozsvg mp3 mpeg mpeg2 mpeg4 mplayer msn mule music musicbrainz mythtv nautilus ncurses net network nls nntp nptl nsplugin ntfs ntlm oav ogg openal opengl oss pam pcmcia pcre pcsc-lite pdf pdflib perl php png pnp portaudio ppds pppd qt3 qt4 quicktime quotes radeon readline real reflection reiserfs rhythmbox rss rtc samba scanner sdl session seti sftp sharedmem smartcard sms snmp soundtouch speex spell spl sse sse-filters sse2 ssl subtitles svg sysfs tcpd tga theora tiff transcode truetype truetype-fonts trusted type1-fonts udev unicode usagi usb userlocales utf8 v4l v4l2 vcd videos vorbis wifi win32codecs wmf x86 xanim xchatdccserver xim xine xinerama xml xmms xorg xosd xpm xscreensaver xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_nl userland_GNU video_cards_radeon video_cards_vga video_cards_ati video_cards_fglrx video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 pjv 2006-07-09 07:26:26 UTC
Created attachment 91283 [details]
~/.fonts.conf
Comment 3 pjv 2006-07-09 07:27:12 UTC
Created attachment 91284 [details]
/etc/fonts/local.conf
Comment 4 pjv 2006-07-09 07:27:32 UTC
Created attachment 91285 [details]
/etc/fonts/fonts.conf
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-07-09 07:34:07 UTC
(In reply to comment #0)
> I am using the bindist flag. As I understand it this should ENABLE the bytecode
> interpreter. 

Wrong.

> James Cloos however thinks this explains my problem: using the
> bindist flag DISABLED the bytecode interpreter. So not using that flag would
> solve my problem. 

Correct. USE=bindist uses the autohinter. Actually, pretty easy to check:

<snip>
use bindist || append-flags -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
</snip>

Don't see any bug here, you've apparently misunderstood the flag.
Comment 6 pjv 2006-07-09 07:46:39 UTC
Possibly there's no bug, but:
- It might be useful to alert other users in the same situation as me.
- Why does everything work with 2.1.9-r1 with bindist enabled?
- Why am I not getting the expected result when I disable bindist with 2.1.10-r2?
Comment 7 foser (RETIRED) gentoo-dev 2006-07-09 08:17:18 UTC
I see no bug here, sorry. And since you've been the first to report this since the introduction of the bindist flag several years ago, I think alerting users is unneeded.
Comment 8 pjv 2006-07-18 11:18:08 UTC
With freetype-2.1.10-r2 without bindist (and idem freetype-2.1.9-r1 without bindist) I get the font as shown on schermafdruk.png. I was mistaken, the font is still Bitstream Vera Sans and not a different font, however the lines are thinner and the font is a little wider. Probably there will be a perfectly clear explanation for this related to patents/bindist... With freetype-2.1.9-r1 with bindist I get the font as shown on schermafdruk-1.png. I'm used to and prefer the latter. If this is not a bug (quite likely, you're probably right, now my bindist enable/disable mixup is clear), then what am I missing here?

Thanks again
Comment 9 pjv 2006-07-18 11:20:54 UTC
I forgot: the images can be found at http://users.skynet.be/pjvh/Schermafdruk.png and http://users.skynet.be/pjvh/Schermafdruk-1.png .
Comment 10 pjv 2006-07-24 14:38:31 UTC
The closest I can get to my old font is by lowering my screen's dpi from 116 to 115 or 114. The new font is thus slightly bigger. But it still seems to be a little bit different. If you look at the text "600 MHz" at the right bottom of my screenshots you'll see that the "6" now has a bit more curl at the right top. Has the Bitstream font or its rendering been changed? How was I supposed to learn about this? I checked the changelog and the freetype website but found nothing yet. Thanks
Comment 11 foser (RETIRED) gentoo-dev 2006-07-31 06:10:59 UTC
Once more : this is NOT a bug. The bytecode interpreter is an ongoing work and has a different look over time. I can only say that the rendering of the actual font in schermafrduk-1.png is worse than in schermafdruk.png and as such there has been an obvious improvement in rendering of some characters and consistency between the letters. The only downside I see is a few kerning glitches, but that may be the fonts fault.

Sorry, we cannot possibly help you here.
Comment 12 Simon Stelling (RETIRED) gentoo-dev 2007-02-19 22:10:26 UTC
*** Bug 167632 has been marked as a duplicate of this bug. ***
Comment 13 Herbert Wantesh 2007-03-10 16:00:08 UTC
u can fix it ... build a chroot like descibed here ....

http://www.gentoo.org/proj/en/base/amd64/emul/

build freetype with -bindist and quickpkg it ... and replace the one from the xlibs ebuild .... works nice :) ...

greets
Comment 14 Herbert Wantesh 2007-03-10 16:01:50 UTC
ment this package 
app-emulation/emul-linux-x86-xlibs

/usr/portage/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-10.0.ebuild