Description of problem: TrueType fonts that were rendered very well in Fedora Core 1 by emacs / xterm now look awful / unuseable - pixelated / low resolution in all sizes and unreadable at small sizes. These same fonts are rendered very well by konsole / browsers / other apps, and by Fedora Core 1. Xft problem ? Version-Release number of selected component (if applicable): xorg-x11-libs-6.7.0-2 ( libXft.so.2.1.2 ) freetype-2.1.7-4 fontconfig-2.2.1-10 emacs-21.3 xterm How reproducible: 100% Steps to Reproduce: 1. Install a TrueType font (eg. using KDE Control Panel) 2. Start xterm with that font xterm -fn {font name} 3. Actual results: Font renders horribly. Expected results: Font should look OK. Additional info:
Created attachment 100768 [details] Font rendered OK on Fedora 1
Created attachment 100769 [details] Same font rendered horribly on Fedora 2
This may not seem like an important bug, but I, as I suspect do many users, spend around 90% of my time using FC2 editing files with emacs, and being able to edit files in nice fonts is very important to me.
This is a duplicate of https://bugzilla.redhat.com/bugzilla/show_bug.cgi? id=124761 however I don't mark it as duplictae since it isn't clear if the bug is in freetype or in xorg
My understanding is that it's freetype (not specific to xorg). Not that it makes much difference: the new/improved freetype is the feature attraction of xorg.
This can be fixed for xterm by using the `-fa' and '-fs' options ( XTerm*faceName and XTerm*faceSize X resources ) to force it to use the Xft library - using these options / resources make the font display perfectly in xterm - I found this by reading http://www.xfree86.org/current/fonts2.html, a good source of information on Xft / fontconfig / X fonts, which says : "most current applications use the core fonts system by default, it is necessary to explicitly configure them to use Xft". I am still working on how to get a similar result for emacs 21.3 . Still don't know what changed this between FC1 and FC2 . - still investigating.
The pictures looked like what I was told was intentional behavior. There was a fix in xterm (Patch #180 - 2003/10/12 - XFree86 4.3.99.15) which dealt with that. Presumably Xft has a changelog someplace which would tell why it was changed...
Actually, I don't think this is anything to do with the Xft library or xterm. If you force xterm to use Xft, with -fa & -fs options or XTerm*faceName & Xterm*faceSize resources, xterm displays them beautifully, the same as other Xft using apps (konsole, Mozilla). Emacs has never used Xft, but in all RedHat versions prior to FC2, the standard X11 font mechanisms displayed them OK - now with FC2 they display them horribly. When xterm uses Xft, it uses XftDrawString8 to display text; emacs always uses XDrawString - I read the source code to find this out. So something happened to the xorg 6.7 / XFree86 4.4 font routines accessed by XDrawString / XLoadFont in FC2 that were OK in XFree86 4.3.0 of FC1; possibly fontconfig ? I haven't had much time to devote to solving this problem yet, but have at least determined that it is not an Xft or xterm problem.
The problem is that freetype has the bytecode interpreter disabled. Previous versions of X shipped with a version with it enabled. Unfortunately for patent reasons we can't enable it.
Aha! To re-enable: 1. Get freetype SRPM (freetype-2.1.7-5.src.rpm) 2. Change the first line of the freetype.spec file (/usr/src/redhat/SPECS/freetype.spec) from : %define without_bytecode_interpreter 1 to %define without_bytecode_interpreter 0 3. rpmbuild -ba freetype.spec 4. Install resulting RPMs. 5. Reboot (shutdown & restart X & xfs). TrueType fonts now display OK in emacs!