MAR
16
2001

Tutorials On Using Anti-Aliased Fonts With KDE

LinuxPlanet recently published an article which contains a tutorial on how to set up anti-aliased fonts on your KDE 2 box. This article complements the tutorial posted some time ago by Lars Knoll.

Comments

Hey what is this 2.1-update I see in the "stable" directory at ftp.kde.org ? There are only a few files in there, and they are listed as pre-2.1.1. Are these some late fixes? Did I miss an announcement? :)

-Justin


By Justin at Fri, 2001/03/16 - 6:00am

you didn't miss anything ;)

as you probably know, 2.1.1 will be 2.1 + critical bug fixes, new icons and improved i18n and documentation. so those are the critical bug fixes, new icons and improved doc they have so far. you can get the i18n-updates from cvs.


By Evandro at Fri, 2001/03/16 - 6:00am

... and I spent almost a week dissecting kdelibs, qt and libXft!
Why me?


By Arnd Bergmann at Fri, 2001/03/16 - 6:00am

I peel your fain... er... feel you pain. ;-)

I didn't quite go that far but I failed to comprehend that xfs and xft load seperate font collections. Seems a bit weird and less than efficeint. Then again it's interesting to have font servers running like that. I found XftConfig a long way from my other config file.

However my system NEVER looked so good so it was worth it!!!

BTW anyone get Corel Draw's font server working with this menagerie?


By Eric Laffoon at Fri, 2001/03/16 - 6:00am

Damn, it was not the FontPath. I just thought that if the article is so specific about it, there has to be some meaning behind it.

Anyway, I still can't select non-antialiased fonts in KDE. The most obvious symptoms of this are that in Konsole, you can only choose a font called 'fixed', which can be replaced by anything in XftConfig or is automatically replaced by the alphabetically (!) first font otherwise.
The same happens to the font settings in Control Center when you try to get back to defaults or have a fresh installation.

I have fixes for both symptoms in kdelibs, but the real problem is somewhere deeper.

Does anyone actually have non-AA fonts in kde2.1/Qt2.3/XFree86-4.0.2-branch or does is work in another version?


By Arnd Bergmann at Fri, 2001/03/16 - 6:00am

The problem is with Xft. Xft has a bug related to choosing fixed width fonts. Please look at http://lists.kde.org/?l=kde-devel&m=98399428807752&w=2
which contains a fix for your problem.

Ravi


By Ravi at Fri, 2001/03/16 - 6:00am

If you're on Debian/Unstable, all you should need to do is put set the environment variable QT_XFT=true. The newest KDE and QT have built-in support for anti-aliasing.


By John Donagher at Fri, 2001/03/16 - 6:00am

I'm using Debian, but I'm using only the testing branch, and apparently I have the wrong XFree packages (even though they are 4.0.2 not 3.3.X). Trying to start an xterm with anti-aliased text gives the error "missing extension RENDER on Display 0.0" or some such.

The KDE and QT packages are correct (QT_XFT is set to 1, not that it helps without the render extension).

Is there any way to get XFree packages with the Render extension enabled without going over to unstable entirely? (I tried compiling XFree from source once but it failed. I have the worst luck compiling software! I can never get KDE to compile either!)


By not me at Fri, 2001/03/16 - 6:00am

What video card are you using? maybe that's caused if your video driver doesn't support the render extension (for example, the old nvidia closed-source drivers).


By funkychild at Fri, 2001/03/16 - 6:00am

I'm using a S3 Savage4, and I had heard that the Savage driver didn't yet support the render extension, so I tried the VESA driver(which does). It didn't work either :-(


By not me at Fri, 2001/03/16 - 6:00am

The latest driver for the savage does have the render extention in it .. go to tim's page and pick it up

http://www.probo.com/timr/savage40.html


By cthulu at Sat, 2001/03/17 - 6:00am

I FINALLY got Anti-Aliased TT fonts to work under KDE - VERY nice!

I have only one question - the "fixed" font keeps getting set back to "adabi" (which was at first the default everything was set to) - this font seems to be used in quite a lot of web-pages, and I would like to choose something more appropriate. Any suggestions?


By Matthew Vinton at Fri, 2001/03/16 - 6:00am

This is a bug in XFree86, I believe. You'll either have to update to XFree86 CVS or apply a workaround patch to Qt, which I don't have handy but I think Lars posted one on the kde-devel list.


By KDE User at Fri, 2001/03/16 - 6:00am

XFree86 4.0.3 is very close to release. Hang in there for a few days.


By matt at Fri, 2001/03/16 - 6:00am

are you sure?
4.0.2 was said to be "very close" during months.

Where did you get this information from, I'd like to know more about 4.0.3 (esp. if there will be a working G400 with 3D hardware accel., using what Gareth Hughes did the past weeks for DRI project).


By oliv at Fri, 2001/03/16 - 6:00am

look here:
http://www.xfree86.org/cvs/changes_4_0_2.html

as you see, Xfree 4.0.3 is really close


By krzyko at Fri, 2001/03/16 - 6:00am

You can get Xfree86 4.0.3 now from their ftp site (or better yet, one of their mirors). It is available as a patch to 4.0.2, but I have yet to find the complete source tarball for it.


By Josh Liechty at Mon, 2001/03/19 - 6:00am

This is a quick fix. It will not solve the problem, but you will have a fonttype that is readable. In your ~.kde directory, go to share/config/ and open the file kdeglobals in kwrite or something. Edit the fontspart of it, have a look and you'll know what I mean.... You should then change the fonttype "default" to courier, or some other available font of your choice. Don't go back to "look and feel/fonts" in Kcontrol. It will reset your manually chosen font. Then you have to edit kdeglobals once more.... Cheers!Geir K


By Geir Kielland at Fri, 2001/03/16 - 6:00am

Hm, not luck here. I compiled Freetype first, then downloaded XFree from cvs, edited host.conf file, compiled XFree (without any errors), then compiled qt-2.3beta1 (I suppose that is also good one) with -xft option, then compiled whole kde 2.1 from tarballs, then added path to my ttf directory in XftConfig file, then deleted fonts directory in /.kde/share and deleted kdefonts file in /.kde/share/config dir, etc.etc. but nothing happens. I don't have antialiased fonts. When I run
xdpyinfo in konsole I don't have RENDER extension there and I get this: XFree86 version: 4.0.99.1. Is it the right version? I downloaded it from XFree cvs (cvs co xc).
I read all tutorials (I also did: export QT_XFT=true in .xinitrc file in my home dir), but nothing helps. I have Matrox Millenium 450 graphic card. Is it card that is problem?


By Barracuda at Fri, 2001/03/16 - 6:00am

[david@dolphin david]$ xdpyinfo
name of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 4002


By David at Fri, 2001/03/16 - 6:00am

Hi,
I got XFree-4.0.2 binary from Rawhide, alongwith freetype2 , qt2.3.0 which is compiled with xft support. When I try running KDE (or any QT app) after setting QT_XFT=true, I get " Xlib: extension "RENDER" missing on display ":0.0" " , which is true, since I dont' see RENDER from output of xdpyinfo.
Question is how to enable RENDER ? I have a Intel 810e chipset.
Can anyone help me to see clearly :) ?

Parag


By Parag at Fri, 2001/03/16 - 6:00am

I also have the same issue. I am using Debian\testing with i810 card..


By Kundan Kumar at Fri, 2001/03/16 - 6:00am

The RENDER extension needs the module 'extmod' to be loaded in XF86Config, and FreeType also needs the 'freetype' module. Btw, QT_XFT should normally be set to 0 or 1.
My X display info:

name of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40099001
XFree86 version: 4.0.99.1
...
number of extensions: 30
BIG-REQUESTS
...
RECORD
RENDER
SECURITY


By Triskelios at Sat, 2001/03/17 - 6:00am

Trisk, can you please explain how to load "extmod" module? When I add the line Load "extmod" in XF86Config-4 then I can't start X, I get error that it is incorrect. And how do you set QT_XFT to 0 or 1 ?
Thanks.


By Barracuda at Sat, 2001/03/17 - 6:00am

Yeeeeees, I've solved the problem. Matrox has released the new driver for Matrox Millenium G200, G400 and G450 for XFree 4.0.2. I just installed the new driver and
antialiased fonts are here. Bravo Matrox :::)))


By Barracuda at Sat, 2001/03/17 - 6:00am

Hey this last step was a bit to fast - i still have the antialiasing problem in my setup - and i havnt found a solloution yet.

ive using a Mandrake 8.0 - KDE with a TNT card.
first of all, my KDE is running fine at this time, but im having a problem compiling a program using Qt (3.0.1) - and it seems to me that im getting the same problem here as you are referring to.

ive downloaded the sources from Trolltechs home page and tried compiling it both with and without support for antialiasing (both occasions it took almost 8 hours to complete, and im not willing to do it all to often.) and i got the same result in both situations)

where am i? what shall i do? - download the XFree kit and recompile it as well?

Before i do, i hope i can get a good advice from someone who have had that problem.

-Tobibobi-


By Tobibobi at Sun, 2002/01/20 - 6:00am

prior to anything is wich driver it works with
i tried a few months ago and recompiled xfree many times in search of my mistake when it was the drivers which were unable to render AA.
no, it's not funny....


By nonono at Fri, 2001/03/16 - 6:00am

For anyone using SuSE 7.1 there is a nice guide here:

www.nadmm.com/show.php?story=articles/aafonts-HOWTO.inc

(Probably useful for people running other distros as well.)


By matt at Fri, 2001/03/16 - 6:00am

Yesss!!!!

Thanks man. This tiny tutorial got me up 'n running in under five minutes!

Thanks again.


By Cihl at Sat, 2001/03/17 - 6:00am

I just wanted to say, that if you are running either on a laptop, or are using a _digital_ LCD screen, then you really should turn sub-pixel rendering on. Add this to your /etc/X11/Xresources (or wherever your dist put it, I'm using Mandrake 8.0beta) and add this somewhere:

Xft:rgba

Anyway, that's it. It makes as big a difference, I think, compared to regular anti-aliasing, as comparing no aa with normal aa.

Erik


By Erik Hill at Fri, 2001/03/16 - 6:00am

I just wanted to say, that if you are running either on a laptop, or are using a _digital_ LCD screen, then you really should turn sub-pixel rendering on. Add this to your /etc/X11/Xresources (or wherever your dist put it, I'm using Mandrake 8.0beta) and add this somewhere:

Xft:rgba

Anyway, that's it. It makes as big a difference, I think, compared to regular anti-aliasing, as comparing no aa with normal aa.

Erik


By Erik Hill at Fri, 2001/03/16 - 6:00am

I'm running Redhat 6.2 with XFree86 4.02 and an RPM of Qt 2.3.0 built with Xft. xdpyinfo lists RENDER extention.

I have the following line in my .Xclients file:

QT_XFT=true

After I start X and display my enviroment variables, I see that this has been changed to:

QT_XFT=0

What gives? I also checked Preferences -> Look & Feel -> Style, and I did not have an option there to enable anti-aliased fonts.

Ideas????

-Karl


By Karl Garison at Fri, 2001/03/16 - 6:00am

This bugged me for awhile. First you will want to be sure anti-aliased fonts are working at ALL... while in KDE, open up a console and type QT_XFT=TRUE, then open "designer", which will run as a pure QT app, and if you get TT fonts, you will be golden.

KDE doesn't work because kicker (I beleive) sets QT_XFT=0 everytime one starts KDE. What you need to do is edit .kde/share/config/kcmdisplayrc, and add the following lines (both lines...)

[KDE]
AntiAliasing=true

This will perform the same action as using the non-existant check mark.

Good luck!


By Matthew Vinton at Fri, 2001/03/16 - 6:00am

Thanks for your help. I assume that it will be obvious if the fonts are drawn anti-aliased then?

-Karl


By Karl Garrison at Fri, 2001/03/16 - 6:00am

I put the lines in .kde/share/config/kcmdisplayrc and it works! Nice. Thanks.


By ady at Tue, 2001/06/05 - 5:00am

I thought I would slap up my experiences doing this with/ RH 7.0 and binary packages...

see
http://www.vinton-sys.org/kde-antialiasing.htm

and tell me what you think...


By Matthew Vinton at Fri, 2001/03/16 - 6:00am

after compiling and installing xfree86 4.0.2 I got only static library libXft.a
how to get shared one? what's wrong?


By man at Sat, 2001/03/17 - 6:00am

Well, I finally got it working after recompiling X from source with FreeType2 support enabled. It's wonderful, but Xft is only serving PostScript fonts. xfontsel can see the TrueType fonts, but nothing else can - Gimp, KDE, nothing. Any ideas anyone? I have TrueType working properly using the normal FontPath method and the freetype module, and I did remember to comment out the FontPath line in XF86Config and I did remember to add the dir line in XftConfig. Is there anything special I need to do to the directory beyond the normal ttmkfdir / mkfontdir?


By matt at Sat, 2001/03/17 - 6:00am

Welp, I deinstalled X and everything depending on it today for a fresh start. So I installed: XFree86 4.0.3, Qt 2.3.0 + xft, and KDE 2.1

And a great mystery happened: If I start a normal QT2 app, like qhacc, or avifile/aviplay, it works great. If I try a kde app, watch:

helix@subedei (~)% export QT_XFT=false
helix@subedei (~)% kcalc
(works great!)
helix@subedei (~)% export QT_XFT=true
helix@subedei (~)% kcalc
KCrash: crashing.... crashRecursionCounter = 2
KCrash: Application Name = kcalc path =

If this happens to you, or KDE starts blank, do a ktrace on the process -- you will see which TTF file it's trying to read and crashing on. I guess KDE tries to load every font?

Unfortunatly, I had 357 truetype fonts, and I don't yet want to go through them one by one to see what's crashing. The microsoft fonts work great however.. ugh. That was a sick statement to make


By Thomas Stromberg at Mon, 2001/03/19 - 6:00am

Thank You!

I had everything working fine, then it suddenly broke for this very reason. After this post I'm exiting mozilla and restarting konqueror.

Thanks again!


By jason p at Mon, 2001/03/19 - 6:00am

After all, I got aa working. But: How can I use bitmap-fonts when aa is enabled? I read all the tutorials, but didn't find a hint.


By Oliver Heins at Mon, 2001/03/19 - 6:00am

As far as I understand it, you just need to edit your XftConfig and add FontPath's for all of your other (Type1, bitmapped, etc) font directories.


By Michael Driscoll at Tue, 2001/03/20 - 6:00am

No, that does not work. It looks to me like Qt currently does not use the bitmapped fonts through libXft, i.e. it does never set XFT_CORE for any Xft funtion.
On the other hand, applications that do set this flag should work even when they are not in the directories defined in XftConfig (they are only for Type1 and TrueType) but come from the font server.
If anybody definiately is using both xft and core fonts in KDE, could you please mail me your configuration?


By Arnd Bergmann at Wed, 2001/03/21 - 6:00am

> If anybody definiately is using both xft and core fonts in KDE, could you please mail me your configuration?

AOL ME (or even better: post it here)

olli


By Oliver Heins at Thu, 2001/03/22 - 6:00am

Please help me! I am the last person on earth that does not have antialiasing working!

I have aa in my xterm
I use debian/testing with lastest kde from kde.tdyc.com.
In the docs I read that all packages have AA compiled in.
No old kcmfont etc. All made from scratch
QT_XFT=1 etc.
The only thing missing is a libXft.so. I have only the static libXft.a.
I have a lot of truetype fonts and 3 font servers xfs xfstt xfs-xtt
XftConfig by Keithp

What am I doing wrong?


By Mario Giammarco at Tue, 2001/03/20 - 6:00am

Same problem here... xterm works, kde has the AA checkbox enabled, QT_XFT is correctly set but no AA in KDE!!
Anybody knows what's happening?


By Leonel Martins at Fri, 2001/03/30 - 6:00am

I've set everything up nicely now - lovely anti-aliased TT fonts abound, apart from one exception - Konsole. It comes out l i k e t h i s. What's the problem?


By rogue at Wed, 2001/03/28 - 6:00am

I have just solved the same problem for my setup - SuSE 7.1, KDE 2.1.1.

I'd used the SUSE script fetchmsttfonts to get my first truetype fonts - it downloaded 4 .exes from the MS site, but could only extract the fonts from 1 - giving my fonts like comic, georgia, trebuchet. I also got the k o n s o l e spacing problem, and it reminded me of seeing the same symptoms when trying to used a proportional font in KDE 1 konsole.

I appropriated the truetype fonts from my Windows installation, restarted KDE and the spacing problem went away .

Maybe expanding your font selection will help you too.


By clickfurtle at Wed, 2001/03/28 - 6:00am

Ok, maybe I'm just missing something here.....

I've downloaded all of the Mandrake 7.2 packages that are listed in the 2.1.1 distributions directory on ftp.kde.org. This includes XFree 4.0.3, qt-2.3.0, and all of kde 2.1.1. I've installed all of these RPMs and thats fine.

But, no matter what I try here, I'll be darned if I can get AA fonts to work properly.

I'm using the latest 0.9.7 NVidia driver, which does support the RENDER extension.

I've tried updating my XF86Config to match the one in the tutorial, updated my XftConfig file accordingly, got the fonts from Keith's site, but still can't get this sucker to work.

Anyone out there either using Mandrake or an NVidia card that's managed to get this to work??


By Graham TerMarsch at Wed, 2001/03/28 - 6:00am

Exactly the same with my mandrake. Up to date drivers from Nvidia, the mandrake binaries etc.

Everything seems to be right, but I suspect the XftConfig file is not really read in.

Is there a way to get a verbose output from Xft or something like that?


By Josh at Thu, 2001/03/29 - 6:00am

Pages