MAY
14
2001
|
How to configure your Anti-Aliased desktopVarious people have been asking how to configure fonts with the new Xft extension, which enables AA fonts, among other things. Configuring the Xft extension (including antialiasing) Xft is an interface to the freetype rasterizer written by Keith Packard, Structure family: "Arial" A size 12 arial font in latin-1 encoding. The Xft extension will now match any family == "Arial" edit antialias = true; This will enable antialiasing for all fonts of the family Arial. Also, the X server is queried to list all of its fonts; the XLFD contains Here's a list of attributes used in matching fonts (in priority order, foundry font foundry (string, spacing font spacing (integers or proportional bold is the font bold? (boolean) italic is the font italic? (boolean) antialias is the font antialiased? (boolean) family font family (string) size font size (double) style font style (string, like "Bold Italic") slant font slant (roman, italic, oblique) weight font weight ( integers or light, medium rasterizer not yet used (probably "TrueType", outline outlines available? (boolean) Syntax adds a directory to the list of places Xft will look for fonts. There include and includeif cause Xft to load more configuration parameters from the indicated file. match edit ; if a pattern from an application matches the pattern after match, it match qual FIELD-NAME COMPARE CONSTANT where qual is either any (matches one specific font) or match all foundry==¨monotype¨ will match (and edit) all fonts belonging to the foundry monotype. match any family==¨arial¨ will match (and edit) one specific font with the family name arial. FIELD-NAME is one of the properties found above under COMPARE is <, >, or CONSTANT is the value of the field-name in the appropiate type (see You can use multiple matches before you use the edit statement. edit FIELD-NAME ASSIGN EXPR SEMI FIELD-NAME can be any of the above (see Structure) plus addionally: pixelsize font size in rgba color hinting (string ¨rgb¨ or ¨bgr¨ and xlfd file the font file (string) core render use render fonts? (boolean) index scalable is the font scalable (boolean) scale charwidth character width (integer) charheight matrix no idea (not really at least) ASSIGN can be one of =, += or EXPR sets the FIELD-NAME to a value. SEMI is a semicolon. You can use multiple instructions, separated by Examples 1) How do I make fonts available to Xft? List your Type 1 and TrueType font directories with dir. On my dir "/usr/X11R6/lib/X11/fonts/Type1" 2) How do I use a user specific XftConfig file? Put an .xftconfig file in your user directory and add includeif "~/.xftconfig" to your standard XftConfig. This will enable a user specific configuration 3) How do I make aliases for my fonts? I noted that my KDE console asks for ´mono´ fonts when it match any family == "fixed" edit family =+ "mono"; 4) Antialiasing my fonts makes me dizzy! Although there is a big fuz around AA in X, good fonts actually look Use the following in your XftConfig to antialias only fonts of specific sizes: match any size < 15 edit antialias = false; 5) My fixed fonts do not appear or look _very_ wrong in the KDE konsole I noted that somehow a lot of fixed font do not tell Xft that they are match edit spacing = mono; 6) My Symbol, Webdings, etc. fonts do not show up! For some reason some (symbol) fonts are not correctly recognized, and Xft will match edit antialias = false; encoding += "glyphs-fontspecific"; match edit antialias = false; encoding += "glyphs-fontspecific"; A usefull way of figuring out these things is to activate debuging export XFT_DEBUG=1024 This will generate a lot of output, especially if you have many fonts, 7) Why do my KDE programs start now soooo slow? Currently, the Xft mechanism in XFree 4.0.3 has to parse the XftConfig file each time a program is started. 8) I have a LCD screen, can I use subpixel hinting instead of normal antialiasing? Yes you can. Subpixel hinting uses colors instead of grey pixels to do the AA. match edit rgba=bgr; or use rgb if you have a different type of monitor. For vertical AA you can try vbgr and vbgr. 9) My fonts still look bad! If you do not have some good truetype fonts, it is worth to go and look Adobe Courier looks terrible on my system, so I made an alias so that Lucida console 10) Other resources on the web... Here you can find more info about setting up the render and Xft extensions: Feedback is appreciated! |
![]() |
Comments
[Troll] Who cares?
[NU: Click here to skip this thread]
Who cares? Ximian 1.4 is out and it is the Linux desktop standard. All the heavyweights in the Unix world have thrown their weight behind it. KDE no longer stands a chance. Besides, it sucks.
Re: Who cares?
Why do I get the feeling your email address matches your IQ? Go "home" flaming.
Besides: _very_ cool tutorial. I was looking for something comprehensive like this for a very long time!
Re: Who cares?
If you think so little of KDE why do you keep an eye on all of the latest info about it?
Re: Who cares?
Whatever a "Linux" desktop standard is. Rumours have it KDE runs also on other *NIX systems.
But rather having the heavyweights throwing their weights around I prefer those slim guys and girls doing a fantastic job..... ;-}
thanks for this tutorial, that was exactly what I needed
Re: Who cares?
I don't agree that all of the Unix heavyweights are behind Ximian. Correct me if I am wrong, but the last time I wrote apps for gnome, I was writing straight C, since I switched to Qt/KDE I have been able to do everything in C++ and it is SO much cleaner, I will never look back. I have been using AA fonts on my desktop since qt-2.3 came out without any trouble at all, however I still found this HOWTO very helpful, my thanks go to the author.
I care..
Re: Who cares?
I'm a GNOME supporter too, but I find KDE's design much cleaner...
The only thing that really bugs me about KDE is QT licensing :(
I really hope the GNOME team will clean up GNOME and start to implement INTI (for C++)...
I think the KDE team is doing a great job (I love everything that supports Linux) but I really hope that someday we will have a standard desktop!
I hate it when people start flaming, it doesn't do anybody any good, we should all work together :)
Marc S
Re: Who cares?
> The only thing that really bugs me about KDE
> is QT licensing :(
??? I don't understand that - QT Free Edition is GPLed - is GPL not good enough for you? GNOME is GPLed, too... :-)
Greetinx,
Gunter Ohrner
Re: Who cares?
I think he refers to the fact that Qt is GPL whereas GTK and Gnome libs are LGPL
Re: Who cares?
Hi!
Well, the FSF itself recommends the GPL in favour of LGPL and there are quite a few libs in GNOME that are GPLed, too. IIRC there was a discussion once to GPL all major GNOME libs so GNOME apps would be forced to be GPLed, too. I don't know if they did it or if they cancelled it.
Greetinx,
Gunter Ohrner
Re: Who cares?
None of the essential Gnome libraries are GPL. And you probably remember the discussion backwards as there has been discussion that all essential gnome libs should be officially forced to be LGPLd or more liberally licensed. Not surprisingly RMS seems to have vetoed that.
Re: Who cares?
Although, I agree that it would be great if QT was LGPL'd, but if your a GNU fan, even Mr. Stallman has an article suggesting that all (well, most) libraries should also be GPL to further the movement. If you're a GNU fan, a GPL'd QT should make you excited!!!
Re: Who cares?
> Ximian 1.4 is out and it is the Linux desktop standard.
You wish!
I care
Although I am a GNOME supporter and use GNOME instead of KDE, trolls like you make me sick.
The GNOME vs KDE war is over! Go home and get a life!
Re: I care
I agree, it's good for us Linux have so more choices than Windows & MacOS give for a desktop !
I hope there'll never be something like a "standard desktop", that's what M$ and Apple wanted to do since 20 years.
There's still a lot of work to do to have full font-AA everywhere (Gnome, Lesstif, whatever else...).
Re: I care
Ever get the feeling ac and dc are one and the same ?
Re: I care
Yeah, it's funny how ac and dc always reply to each other on both KDE and Gnome news.
Re: I care
That is BECAUSE he is called ac.
"dc" is some kind of parody on the name "ac", get it?
I don't care whenether you believe me or not. It is the truth.
Re: I care
Ever get the feeling ac and dc are 12 years old ?
Re: I care
I think you're the one who's 12 year old here.
I have done nothing wrong and yet you are accusing me!?
Re: Who cares?
How about we just ignore this guy from now on? He's always posting trying to start wars(on both KDE and Gnome news)...you shouldn't even bother replying. Obviously, he's just an idiot with too much time on his hands...too bad that he could better spend his time doing something productive.
Re: [Troll] Who cares?
> Who cares? Ximian 1.4 is out and it is the
> Linux desktop standard. All the heavyweights
> in the Unix world have thrown their weight
> behind it. KDE no longer stands a chance.
That's strange. On my computer it seems like KDE is the Linux desktop standard. And there is no sign of change.
Re: [Troll] Who cares?
To you, the self-confessed troll:
Fact: KDE has it's own web browser, Gnome have to put up the shit Mozilla produces.
Fact: KDE has their own office suite. Gnome users have bits and pieces of shit applications.
Fact: KDE is designed by engineers. Gnome is hacked by kiddies.
Conclusion: who the fsck cares about Gnome anyway?
Re: [Troll] Who cares?
Like I said, the GNOME vs KDE war is over.
If you want to respond on trolls, then flame the troll down.
He has nothing to do with GNOME.
1) Mozilla is not crap. Galeon + Mozilla 0.9 runs incredibly fast on my Pentium 166.
2) So it's not integrated yet. What's your point?
AbiWord and Gnumeric works fine even without some kind of integration center.
3) There are people who are involved with both KDE and GNOME. So by flaming like that you'll also be flaming at some KDE people.
4) I care about GNOME.
So the next time, flame/spam/kill the troll, not GNOME.
Re: [Troll] Who cares?
ac needs a life. It seems odd how quick he is to always be one of the first to respond to any accomplishment that enhances KDE, saying, with no reasons to back it up, that GNOME is better. Impress me ac, tell me why. And, tell me what relevance it has to this discussion, I'm more than interested to hear that as well.
Re: [Troll] Who cares?
I think it is great that someone put together this tutorial to help those that can have this now. It looks to be at least six months until Gnome users are so lucky.
signed,
One Very Happy Ximian Gnome User (who has to wait for AA fonts)
Re: [Troll] Who cares?
Actually, you are quite wrong. KDE is still the desktop standard. KDE is used on more Linux systems than any other D.E. in the world.
KDE also does not depend on stuff from dead companies (Eazel), and is the default desktop of the most popular Linux distro in March (SuSE).
-Tim
Re: How to configure your Anti-Aliased desktop
a lot of troll's here...
what about ximian alias eazel?
dead or dead?
read this article... guys.
wich wm becomes the standard?
end of the road for eazel?
http://linuxtoday.com/news_story.php3?ltsn=2001-05-12-001-20-NW-GN
Re: How to configure your Anti-Aliased desktop
C'mon, just because there are a few so-called "GNOME supporters" (aka Trolls) doesn't mean you can just flame at Gnome & Friends.
There are lots of KDE trolls at Gnotices too.
Re: How to configure your Anti-Aliased desktop
Gosh - I was impressed by the detail of this tutorial. Perhaps I'm being lazy, but first, my fonts all worked under a clean Mandrake 8.0 install. I then copied the win2000 AA fonts into one of the directories and restarted the XFS.
Everything looks great. Sure, the smaller fonts are antialiased - but it actually looks good. And while my monitor is good at the current res (1600x1200 - Hitachi CM771) it's by no means some crystal-clear thing.
Otherwise, I'm *so* glad I don't have to edit font resources and so forth such as I used to have to do with getting fonts working for the gimp... Again, kudos to all involved!
K
Re: How to configure your Anti-Aliased desktop
Nice tutorial. I just wish I could work out why my Xft won't serve TrueType fonts. If I use it, I get only Type1 and bitmap fonts available. If I don't use it, I get all the fonts on my system, but none of them are antialiased.
Is there anything special I have to do to get it recognising TrueType fonts? I'm using XFree86-4.0.3 and Qt-2.3, both compiled from source, and my normal TrueType server (X's freetype engine) works fine, just (obviously) without AA.
Re: How to configure your Anti-Aliased desktop
Install mandrake 8.0. Problem will be solved.
Craig
Problem
Might be caused by your video card drivers, I had the same problem with the older NVidia drivers, but with the latest drivers this is fixed.
Re: How to configure your Anti-Aliased desktop
add to your /usr/X11R6/lib/X11/XftConfig:
dir "/path/to/truetype/fonts"
Re: How to configure your Anti-Aliased desktop
I had the same problem
I added
dir "/usr/X11R6/lib/X11/fonts/TrueType"
to the /usr/X11R6/lib/X11/XftConfig file
and removed the Type1 and TrueType paths out
of XF86Config file (I don't use xfs server)
as explained in another tutorial on this same site
Re: How to configure your Anti-Aliased desktop
Nice tutorial. I just wish I could work out why my Xft won't serve TrueType fonts. If I use it, I get only Type1 and bitmap fonts available. If I don't use it, I get all the fonts on my system, but none of them are antialiased.
Is there anything special I have to do to get it recognising TrueType fonts? I'm using XFree86-4.0.3 and Qt-2.3, both compiled from source, and my normal TrueType server (X's freetype engine) works fine, just (obviously) without AA.
Re: How to configure your Anti-Aliased desktop
Did you add your direcory with TT fonts to XftConfig,
with the 'dir' syntax?
Danny
Re: How to configure your Anti-Aliased desktop
Yes, I did. Didn't make a blind bit of difference - it's like my TrueType fonts just don't exist.
Re: How to configure your Anti-Aliased desktop
Funny that you say bitmap fonts work with Xft, because Xft does not support bitmapped fonts yet.
Did you compile against freetype 2.0.2? And be
sure to put XftConfig in the correct directory.
You can send me some debug info (see the tutorial on how to do that) and I will try to figure it out.
Danny
Re: How to configure your Anti-Aliased desktop
What I meant about the bitmap fonts was that they were there, in that X was serving them. Should've made that clearer really - although KDE seemed to only be able to see my Type 1 fonts, of which I have very few.
I'll have to try again and experiment - I compiled against whichever version of freetype is included with XFree86 4.0.3's source.
Re: How to configure your Anti-Aliased desktop
Wow, thanks a lot !!
I have always wanted to ONLY antialias fonts more than about 15 points in size.
Another thing that bugs me, is the clumsy way that I currently toggle anti-aliasing per application.
So instead of calling QT_XFT=0 every time b4 I run kwrite I did something like this:
cd /opt/kde2/bin
mv kwrite kwrite.bin
echo 'QT_XFT=0 ; kwrite.bin $*' > kwrite.bash
chmod +x kwrite.bash
ln -s kwrite.bash kwrite
Now, kwrite is no longer anti-aliased.
I wonder if there is a section in some config file that allows inclusion/exclusion of applications in/from anti-aliasing.
If there isn't, maybe it could look a bit like this
match
any app == konsole
any app == kwrite
edit
antialias = false;
Or maybe qtaa.allow and a qtaa.deny files or similar would make sense to have.
-------
Re: How to configure your Anti-Aliased desktop
A year have passed and my video card is still not supported by XFree86 4...
Hello XVideo. Hello anti-alias. Hello NewCoolFeatures(void).
May be see eachother in 50 years.
Re: How to configure your Anti-Aliased desktop
Well, with a GeForce or 3Dfx card being cheap, maybe its time to support a Linux supporter.
Pricewatch.com has em dirt cheap!
Re: How to configure your Anti-Aliased desktop
No PCI cards these days are cheap enough for me...
Re: How to configure your Anti-Aliased desktop
I would sell my G200 for $50 :)
AA & the konsole part
I'm using antialiased fonts now since a couple of weeks and they almost work. One thing, though, still bothers me: The system doesn't accept the settings for the "fixed font". Although I can select a TrueType version of courier in kcontrol/look&feel/fonts and it is shown correctly in the example line, the system doesn't use it (in the konsole part of konqueror, kate or gideon).
It uses instead the TT font that comes first in the TT directory when sorted alphabetically. Of course all paths are set correctly in XftConfig and there's no obsolete "kdefonts" file around (like in dep's case). I also think, that my XFree (4.0.3 as of SuSE 7.1) is patched to work with fixed fonts. Has anyone had the same problem and knows how to solve it? (Note: I'm not talking of konsole itself, which works properly with AA. Just the konsole part doesn't!)
Re: AA & the konsole part
What if you try to select a custom font in
konsole itself? Are there any fonts shown?
Danny
Re: AA & the konsole part
No, that doesn't help. As I already said, it's not a konsole problem. Konsole itself =does= work. Just the konsole kparts not, and there's not custom font setting facility in the kpart. Just the one from kcontrol. But that's exactly my problem. The system doesn't accept the kcontrol font settings (and =only= these!).
Re: AA & the konsole part
Ah, I see what you mean and think you have
hit a bug in KDE. Workaround would be to
alias the font that is selected automatically
with a font which is more to your liking.
Danny
Re: AA & the konsole part
No, I had already tried that workaround, desperately. A few minutes ago I had another look at that issue, and now I know why it didn't work: Not the font with the alphabetically lowest font file name was taken, but that with the lowest =internal= name. So the link couldn't work. Now I have copied the Monotyope Courier New and named it "aaaaaaa.ttf" (for cosmetic reasons, see above), then I changed the internal font name from "Courier New" to "AAAAAAA New" and turned off AA for this font in ~/.xftconfig. This is an ugly hack, but it works. I still do not know whom to blame -- KDE? the X-server?
Re: AA & the konsole part
I suspect KDE, but I'm not sure. More people have reported this problem, but not on all setups.
And the workaround you took is the only one I know about (see also the xfree render maillinglist).
Danny
Pages