Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XFree anti-aliased font tips
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Wed Jun 12, 2002 6:32 pm    Post subject: XFree anti-aliased font tips Reply with quote

EDIT: 16/12/2002. Two things - firstly, since the ebuild of XFree86 4.2.1 turned up, people have been noticing that Keith Packard has made some changes in the font management system, most noticeably the introducing of fontconfig. Although, this thread still makes very interesting reading, much of it is out-of-date. Please do not follow the examples given on configuring the XftConfig file. I have had time to look into the matter, and will be issuing a revised version of this guide soon, which will take into account the usful things others have pointed out too.

Secondly, some good news. David Chester (of the famed Xft slight patch) has succeeded in moving his excellent font engine patches into the heart of freetype itself. This looks to herald a significant development in the rendering of fonts in X. Just to show you how much, have a look at the two following links, one shows OpenOffice with and without his patch:
http://www.cs.mcgill.ca/~dchest/xfthack/oo-before.png
http://www.cs.mcgill.ca/~dchest/xfthack/oo-slight.png
Even better, this patch has been integrated into the new freetype-2.1.3 which is still masked. I am still testing this new engine, and will submit the new guide for all things font related soon. I'd be most pleased if others who don't mind living on the cutting edge could try it out too. You may need to re-build XFree afterwards to take full advantage of it ..!


This subject seems to cause a lot of confusion, so I'm passing on what I know as I have been getting very good results with font rendering on my system. From reading some of the posts in this forum, one could be forgiven for thinking that it's a lot harder than it actually is. I will not be going too deeply into the following topics (as there are many resources and postings on this forum already about such topics):

* Generating scale files for font directories
* Obtaining and installing Truetype font collections
* How to get best results from apps that don't play ball with Xft properly (yet)

What I am concentrating on here is how to configure Xft to anti-alias your chosen font sets, and optimising them for very nice display on your screen.

Firstly, a glossary:

Freetype: a font processing/rendering engine capable of rendering Adobe Type1 (postscript) and TrueType fonts. For X to display truetype fonts, Load "freetype" should be present in your XF86Config file.
XF86Config: XFree86 configuration file, font paths should be specified here (normally contained under /usr/X11R6/lib/X11/fonts) for X to be able to make your fonts available
Xft: Keith Packard's contribution to the XFree86 4.x series. Takes advantage of his "direct render extension" (also present in the 4.x series) for displaying fonts. It is built from Freetype2 code which is distributed with X (so it if you have emerged freetype it makes no difference to X font rendering). It is capable of rendering anti-aliased fonts, but configuration is required. The library is called libXft.so.
Xftconfig: the configuration file for the Xft library (libXft).
XFS: The X Font Server. A stand-alone font rendering system which X uses via a TCP socket. PLEASE NOTE: This isn't really needed now we have Xft (at least not unless you want your X Server to use a font server on a different machine), and is not used by default. Xft should be faster and more efficient.
XAA: X Acceleration Architecture. Attempts to take advantage of video hardware capabilities for accelerating the rendering of graphics (beyond simple blitting operations). Xft tries to take advantage of this where possible.
Bytecode interpreter/patent issue: Apple holds patents on Truetype rendering technologies. Use of a bytecode interpreter improves rendering of fonts at small sizes so they look as the designer intended. Because of the murky patent issue, the interpreter is normally disabled. In Gentoo however, it is enabled in freetype - both for X and for separately emerged freetype :-)

Prequisites:

* Preferably run XFree86-4.2-r11 or higher (r11 and higher comes with freetype-2.0.9 which is an improvement upon the earlier builds)
* Make sure you have some TrueType/Type 1 fonts. XFree build should automatically give you a reasonable selection under /usr/X11R6/lib/X11/fonts/Type1 and /usr/X11R6/lib/X11/fonts/truetype respectively.
* Make sure you have Load "freetype" and Load "Type1" directives specified in your /etc/X11/XF86Config file, somewhere in the Section "Module" part.
* Make sure your fontpaths are specified in XF86Config otherwise X will not see them. They go in the Section "Files" part. Example:
Code:
Section "Files"
# Other stuff ...
    FontPath   "/usr/X11R6/lib/X11/fonts/truetype"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1"
# Other stuff ...
EndSection

* Make sure font scaling files have been generated for the collections in those subdirectories. They should be, unless you have manually obtained fonts and put them in a given subdirectory.
* Make sure X is running with the direct render extension enabled. It will by default, if it isn't then it could be a limitation of your X Server (i.e. the video card driver).

In practice, very few modifications will have to be made to a default XFree86 installation on a Gentoo system. Having gotten that out of the way, it's quite simple:

* /etc/X11/Xftconfig will need to have the fontpaths specified, otherwise Xft will not anti-alias them properly, or at all.
* Specify pixel/font size ranges for X to anti-alias so that X doesn't gratuitously anti-alias fonts all the time. This is why some people complain that fonts look fuzzy on Linux, it doesn't have to be this way.

In my case, the only thing I did was to edit my Xftconfig file and add these trivial modifications:
Code:
# Render all fonts in these paths anti-aliased
# Note that Xftconfig uses dir, not FontPath
dir "/usr/X11R6/lib/X11/fonts/Type1"                                           
dir "/usr/X11R6/lib/X11/fonts/truetype"   

# There's no need for fonts to be anti-aliased at "normal' sizes,
# they cause eyestrain and don't really enhance the fonts. Tell Xft
# not to anti-alias fonts between 8pt and 14pt sizes
match
   any size > 8
   any size < 14
edit
   antialias = false;

# Same again, but enforced for KDE (specifically Konqueror/KHTML)
match
   any pixelsize > 8
   any pixelsize < 14
edit
   antialias = false;

Lo and behold, reboot X and the fonts should look great! Very nearly as good as certain other commercial operating systems. Try visiting http://www.microsoft.com for example, and compare it to how it would look before (at least it was a radical difference under Konqueror). Note that Xftconfig allows for many more powerful features such as font substitution, great if you cannot change the fonts used by some apps but you want to use a font that you know to look better on screen. You should experiment with various fonts, and configure your window manager to use the ones that look best.

Here's a link that describes further some of the ways in which you can customise Xftconfig (thanks to a post by mksoft): http://dot.kde.org/989808269/addPostingForm
The XFree86 Font Deuglification HOWTO also makes a good read, particularly this page:
http://www.tldp.org/HOWTO/mini/FDU/x-4x.html


Last edited by 474 on Mon Dec 16, 2002 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
mb
Guru
Guru


Joined: 25 Apr 2002
Posts: 355
Location: Hessen | .de

PostPosted: Thu Jun 13, 2002 7:42 am    Post subject: Reply with quote

great 8O

one question.... i tried to activate sub-pixel hinting on my notebook... but the result looks like the last shot in: http://www.xfree86.org/~keithp/render/clear.html
some blue margin... all in all ugly... so.. whats wrong ?? i thing the shot above should be the real result....


#mb
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Fri Jun 14, 2002 7:31 pm    Post subject: Re: sub-pixel hinting Reply with quote

I'm assuming you entered a line such as:
Code:
match edit rgba=rgb

Note to casual viewers: This enables sub-pixel sampling which can improve the legibility of text on LCD screens. Micro$oft call it ClearType technology <snigger>.

Anyway, my advice would be to try changing the rgb bit to any of bgr, vrgb, or vbgr. Find out which one looks best for you out of those four options.
Back to top
View user's profile Send private message
tgnb
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 208
Location: New York, NY

PostPosted: Sun Jun 16, 2002 3:24 am    Post subject: Reply with quote

i have these files:

/etc/X11/XftConfig
/usr/X11R6/lib/X11/fonts/truetype/XftConfig
/usr/X11R6/lib/X11/XftConfig

Which one should i edit?
What do the other ones do? Are they just left over from upgrading?
When you say u "add rivial modifications" to the file, did you add those to the bottom of the XftConfig file or do you edit stuff inbetween?
What do the .xftcache files do?
How does all this come to play with mozilla's unix.js file?

Thanks
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 18, 2002 4:02 pm    Post subject: Very interesting! This seems to be the answer ... Reply with quote

Quote:
i have these files:

/etc/X11/XftConfig
/usr/X11R6/lib/X11/fonts/truetype/XftConfig
/usr/X11R6/lib/X11/XftConfig

Which one should i edit?

Make your changes in /etc/X11/XftConfig. As far as I can see, the contents of this file just get "mirrored" (copied) to /usr/X11R6/lib/X11/XftConfig. Alternatively, you can create a file called .xftconfig in your home directory and put your desired changes there. Why do this? Because individual user preferences can be established, rather than forcing all users to have a certain configuration. If you look at /etc/X11/XftConfig you'll see a line:
Code:
includeif "~/.xftconfig"

If the file exists in your home directory it will get sourced.
Quote:
What do the other ones do? Are they just left over from upgrading?

As far as I can tell, if a font path is scanned (say, because you put it in /etc/X11/Xftconfig), and one of those paths contains an XftConfig file (such as the /usr/X11R6/fonts/truetype/XftConfig file to which you refer), then that instance will override the master XftConfig file. I had a look at the one in the truetype directory, and the first line is:
Code:
DIR "."

which means add the fonts in the path of the directory we're in at the moment. You might think why do we have to do that, if we already specifed the path of the truetype fonts in the master XftConfig file? Well, I think it's because it overrides rather than inherits the master file. The remainder of the file tells the font engine what to call the fonts, and what the actual filenames for the truetype fonts are (the .ttf files).

I'm glad you mentioned this because when I looked closer I found that the anti-aliasing (using the modifications I described) wasn't actually working on the truetype fonts properly. The Type1 fonts look really nice, but the Truetype ones looked jagged at large sizes. So I realised that you have to add the antialiasing directives to /usr/X11R6/lib/X11/fonts/truetype/XftConfig as well! Edit that file and add just the match directives for anti-aliasing. Let me be clear about that, edit that file and add just the following, at the bottom:
Code:
match
   any size > 8
   any size < 14
edit
   antialias = false;

match
   any pixelsize > 8
   any pixelsize < 14
edit
   antialias = false;

I did this after reading your post, then I went to the KDE Font control panel. I chose Times New Roman (Ms) and previewed it at a very large size and a very small size - wow ... it looked absolutely fantastic in all cases! :-D
Before, it looked very jagged. I'm grateful that you (inadvertantly) brought this to my attention! CONCLUSION: If a font path contains its own XftConfig file, then make sure you put the "match" directives into that file also, otherwise the anti-aliasing rules will be ignored!
Quote:
When you say u "add rivial modifications" to the file, did you add those to the bottom of the XftConfig file or do you edit stuff inbetween?
It seems you can put them anywhere you like, top or bottom. Just make sure they're in there and that you don't remove the other stuff in the file. Having said that, I put the "dir" paths at the top, and the "match" stuff at the bottom. Sorry, I know I could have just quoted the whole file but I wanted to keep the post concise!
Quote:
What do the .xftcache files do?

Well you could type man xftcache and find out ;-)
It says "a cache is created which contains properties of each font and the associated filename. This cache is used to speed application startup when using the Xft library". So it's a performance enhancing feature, but has no effect on the nature of anti-aliasing/rendering. If you type xftcache at the console with no parameters, it will read your master XftConfig file and create a cache for all of the font paths referenced. Recommended then, for speed purposes!

I hope all that makes sense. I'll update the Tips above when I get a chance, adding what we've learnt here ...
Quote:
How does all this come to play with mozilla's unix.js file?

Sadly, I am not qualified to answer that yet! I'll have to emerge it and have a go. There have been quite a few posts about this, search the forum and see what you can dig up. I know some people have been saying don't use XFree-4.2.0-r11 because older builds of Mozilla don't play ball with the new libXft based on freetype-2.0.9. Personally, if that's the case, I'd rather wait until Mozilla gets updated rather than limit X capabilities for the sake of one or two programs. But as I say, I'm not sure and need to learn more myself. I don't even have it emerged yet, so I'll check it out and see what I can do. If anyone has a comprehensive answer to this question, please tell me so that I can update my post. Too much of this important info is getting buried in the dark recesses of the forums ... :-(
Back to top
View user's profile Send private message
amigadave
n00b
n00b


Joined: 29 Apr 2002
Posts: 55
Location: UK

PostPosted: Tue Jun 18, 2002 9:55 pm    Post subject: Reply with quote

kerframil, it seems as though - by making the additions to /usr/X11R6/fonts/truetype/XftConfig - Mozilla's fonts look perfect again! :D

Thanks so much for this great tip as I couldn't stand the yucky small anti-aliased fonts.
Back to top
View user's profile Send private message
TheWart
Guru
Guru


Joined: 10 May 2002
Posts: 432
Location: Nashville,TN - USA

PostPosted: Wed Jun 19, 2002 1:43 am    Post subject: Reply with quote

thanks a ton for this tip, it is very thorough and in depth...now my fonts wont make me go blind! :)
_________________
Face it, we are all noobs.

On the box it said it was designed for Win XP or better, so why won't it work with Linux?
Back to top
View user's profile Send private message
g2boojum
Retired Dev
Retired Dev


Joined: 15 Apr 2002
Posts: 21
Location: Houston, TX, USA

PostPosted: Wed Jun 19, 2002 4:47 pm    Post subject: Nice tutorial! Want to add it as a Gentoo doc? Reply with quote

It would be great to have the font info as a guide doc on the Gentoo site. The Gentoo guide xml is pretty straightforward, and I would be happy to add it to the site.

-g2boojum-
Back to top
View user's profile Send private message
dook43
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2002
Posts: 116
Location: Baton Rouge, LA

PostPosted: Fri Jun 21, 2002 3:17 am    Post subject: choosing truetype fonts Reply with quote

I happened to quickly browse through all of my config files and they all emerged to correctly be set. I have some truetype fonts in the correct directory, now how do I choose them in gnome (sawfish configuration)
_________________
"We who are about to die salute you!"
Back to top
View user's profile Send private message
jay
l33t
l33t


Joined: 08 May 2002
Posts: 980

PostPosted: Fri Jun 21, 2002 8:00 am    Post subject: Reply with quote

Also remember to use the the new iso8859-15 fonts instead of the old iso8859-1 ones. These will work properly with the new characters i.e. for the Euro symbol: €
_________________
Do you want your posessions identified? [ynq] (n)
Back to top
View user's profile Send private message
jtmace
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2002
Posts: 101

PostPosted: Sun Jun 23, 2002 4:19 pm    Post subject: Reply with quote

i installed gentoo.. emerged KDE and Mozilla and other common apps.

Konqueror renders fonts beutifully but Mozilla applies no antialiasing what-so-ever. Is there a way to fix this or does Mozilla just no work with anti-aliasing? Thanks
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sun Jun 23, 2002 6:32 pm    Post subject: Re: sub-pixel hinting Reply with quote

kerframil wrote:
I'm assuming you entered a line such as:
Code:
match edit rgba=rgb

Note to casual viewers: This enables sub-pixel sampling which can improve the legibility of text on LCD screens. Micro$oft call it ClearType technology <snigger>.

Anyway, my advice would be to try changing the rgb bit to any of bgr, vrgb, or vbgr. Find out which one looks best for you out of those four options.


You made my day, I now have a new project to take on - Gentoo on my laptop, and try this out :)
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Jun 24, 2002 10:11 pm    Post subject: XftConfig paths Reply with quote

As far as I can see, /etc/X11/XftConfig is not used at all. The actual settings are taken from /usr/X11R6/lib/X11/XftConfig. (I came to this conclusion after hiding the two files in turn and restarting X. Note though I don't use antialiasing size-dependent rules.)

Since I want /usr/X11R6/lib/X11/XftConfig to be backed up when I backup /etc/, I've made a symlink from /etc/XftConfig to it, but apart from that, there seems to be no reason to have a file called /etc/XftConfig.

(By the way, I perceived a loss of smoothness and some inconsistencies in stroke-weight after I upgraded from XFree86-4.2-r9 to XFree86-4.2-r12. I went back to r9 as a consequence. Did anyone else notice this? If so, can I fix it?)
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 25, 2002 2:16 am    Post subject: XftConfig & Slight Hinting Reply with quote

Quote:

As far as I can see, /etc/X11/XftConfig is not used at all
Oh but it is! Making changes to that file will alter the configuration accordingly. Otherwise the implication would be that it does nothing and that it's existence is pointless which seems rather unlikely and surely would have generated many topic replies to this end (and even more comments to the XFree86 team). Furthermore, the changes I made to my default setup were performed exactly as I stated and had the desired effect. At no point did I edit the XftConfig file under the X11 directory.

I suspect it would use the file from the X11 directory in the absence of one in the etc directory, but preference would be given to the latter. If you actually add the rules in question (or anything that results in an obvious visual change), I believe your results will support my assertion. Nonetheless I shouldn't make any assumptions so I will try some similar tests myself and see what happens (maybe it is a symlink and I didn't notice?) ...

Quote:
(By the way, I perceived a loss of smoothness and some inconsistencies in stroke-weight after I upgraded from XFree86-4.2-r9 to XFree86-4.2-r12. I went back to r9 as a consequence. Did anyone else notice this?

Perhaps this is because the Xft slight patch (as it is known) is no longer applied in the build? Not so long ago I fiddled around with a pre-compiled libXft from an RPM that was intended for Mandrake. This resulted in superior strokes and weighting, and significantly improved the anti-aliasing effect. For some reason it was removed if I recall correctly. Check the ebuild files to confirm this. The author, David Chester, is intending to move his hack into the Freetype library, ostensibly so that more applications can take advantage of it. Here is his homepage:

http://www.cs.mcgill.ca/~dchest/xfthack/

Here is a shot which shows why his efforts may be a very good thing[tm] for us all (his hack is reflected in the third column of text):

http://www.cs.mcgill.ca/~dchest/abc-shint.png

An interesting characteristic of his hack is that it relies on the bytcode intepreter being disabled. One would assume that fonts rendered at small sizes suffer, but this is clearly not the case.

This is yet another thing on my list of things to look at, and has been for a while. There shouldn't be any reason why you can't get the patch and make your own modified XFree86 ebuild where the patch is applied, and the lines patching the bytecode interpreter in the bundled Freetype (with sed) are removed. If you do try this, do me a favour and let me know what your results are! Or just use the libXft.so in the RPM, but bear in mind that it is compiled for i586 arch only ...

jtmace said:
Quote:
Konqueror renders fonts beutifully but Mozilla applies no antialiasing what-so-ever. Is there a way to fix this or does Mozilla just no work with anti-aliasing?

Yes it does, but the situation with Mozilla and anti-aliasing is certainly convoluted (if you look under /usr/portage/net-www/mozilla/files, you will see lots of font related patches, only one of which is used in the latest build). Hang in there, information on this will be forthcoming!!! In the meantime, see if swaun's tip works for you (from this post):

https://forums.gentoo.org/viewtopic.php?t=5630
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 25, 2002 2:21 am    Post subject: Not sure ... Reply with quote

Quote:
I happened to quickly browse through all of my config files and they all emerged to correctly be set. I have some truetype fonts in the correct directory, now how do I choose them in gnome (sawfish configuration)

Sorry, I don't use Gnome (I'll look at it when they finish Gnome2). Perhaps you would have more luck asking this question in the Desktop Environments forum area. BTW, anti-aliasing only works in Gnome2 (unless you are using some kind of hacked GTK library).
Back to top
View user's profile Send private message
pbienst
Retired Dev
Retired Dev


Joined: 29 May 2002
Posts: 70
Location: Belgium

PostPosted: Wed Jun 26, 2002 12:55 pm    Post subject: Reply with quote

I tried the tips to turn off aliasing for small and big fonts, and it works.

However, now I want to revert to the original behaviour, so I deleted the corresponding lines from /etc/X11/XftConfig and /usr/X11R6/lib/X11/XftConfig. I ran xftcache, restarted the X server, but the changes don't seem to take effect, small fonts are still unaliased.

Any ideas?
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Mon Jul 01, 2002 12:36 pm    Post subject: Further to the Mozilla saga ... Reply with quote

UPDATE: OK, I'm testing Mozilla and the font rendering is disgusting! I have found out that Keith Packard's Xft patch is required. As I have already mentioned, such a patch is included in the Portage tree but has been commented out from the build because it requires a newer build of XFree86 (higher than 4.2). Why? Because Xft has been significantly revamped apparently, and the patch for Mozilla is for the new Xft. Have a look at:

http://keithp.com/mozilla/

So, I am going to look at three possible approaches:

1) Test the latest XFree86 code from CVS (4.2.99, I think) and if it seems stable, make an ebuild. Then it should simply be a matter of uncommenting the relevant patch lines in the Mozilla ebuild and font rendering should be as good as Konqueror.
2) It may be possible to download the latest Xft source code specifically, and to patch that into the regular XFree86 4.2 build process. In other words, replace the sub-directory in the unpacked source code which contains the Xft code.
3) I think there is a pre-built version on the link I've given (which is optimised for i686). That might be a nice candidate for an ebuild, especially for those who do not want to go through the lengthy process of compiling Mozilla (HINT: anyone want to try this out?)

The new Xft is supposed to be so much better. I really hope that David Chester gets Freetype hacked soon because this should hopefully put a stop to this issue of applications having to specifically support Xft.

Quote:
However, now I want to revert to the original behaviour, so I deleted the corresponding lines from /etc/X11/XftConfig and /usr/X11R6/lib/X11/XftConfig. I ran xftcache, restarted the X server, but the changes don't seem to take effect, small fonts are still unaliased.


Not sure, I haven't been able to re-produce this behaviour. Are you using KDE/Qt? Try running qtconfig and ensuring the relevant tickboxes are disabled in the font configuration, as well as turning off the anti-aliasing tickbox in the KDE Control Center. Make sure you don't have a personalised config file in your home directory (.xftconfig) which may be getting sourced and overriding the settings.
Back to top
View user's profile Send private message
djresonance
n00b
n00b


Joined: 01 Jul 2002
Posts: 13
Location: Sacramento, CA, USA

PostPosted: Mon Jul 01, 2002 7:22 pm    Post subject: true type fonts squished after screwing something up Reply with quote

Hi, I've been battling with this problem for the past couple days. For some reason unbeknownst to me, X has started displaying my truetype fonts squished along the horizontal axis. It's hard to describe, so take a look at this screenshot from gEdit:

http://www.resynthesize.com/Screenshot.png

It is only the truetype fonts that look like this, the regular fonts that come with gnome/X look fine. I've tried everything I can think of so far, completely removed the truetype fonts directory and recreated it, rebooted my workstation, etc... with no avail. It's not just the microsoft TTf's, for instance luxi mono looks all squished as well.

Has anyone seen this problem before? I've looked all over the web and haven't been able to find anything. I'm bashing my head against the wall and may just trash my whole install if I can't get it fixed.

Thanks,
Brandon
Back to top
View user's profile Send private message
wilbertnl
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 89
Location: Tulsa, OK, USA

PostPosted: Mon Jul 01, 2002 10:18 pm    Post subject: Very informative, what about ttf fonts without font server? Reply with quote

My compliments for such detailed information!

I just first started looking at anti-aliasing when gnome-2 was released. Why did I settle with less before???

At first I was confused, because it is my understanding that you need a font server running to get the truetype fonts working.
But you were not talking about ttf, but about anti-aliasing.

Is my understanding right that I need to start the xfs service to get the truetype fonts activated?
_________________
Wilbert van Bakel
Strive for excellence, not perfection
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Tue Jul 02, 2002 5:17 am    Post subject: Re: sub-pixel hinting Reply with quote

on my laptop the "match edit rgba=rgb;" in /etc/X11/XftConfig made a world of difference! my laptop fonts look almost as good as my desktop fonts now.

kerframil wrote:
I'm assuming you entered a line such as:
Code:
match edit rgba=rgb

Note to casual viewers: This enables sub-pixel sampling which can improve the legibility of text on LCD screens. Micro$oft call it ClearType technology <snigger>.

Anyway, my advice would be to try changing the rgb bit to any of bgr, vrgb, or vbgr. Find out which one looks best for you out of those four options.
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Tue Jul 02, 2002 7:29 am    Post subject: Re: Very informative, what about ttf fonts without font serv Reply with quote

wilbertnl wrote:
At first I was confused, because it is my understanding that you need a font server running to get the truetype fonts working.


You're doing well to be only confused 'at first' 8-) I thought a font-server was obligatory to use fonts, and that Xft (incorporating the freetype renderer for doing all that nice antialiasing for truetype fonts) was the one used by Gentoo. I guess that's not true...

I wonder if someone could provide a sketch of the Linux/X font architecture (and any Gentoo-specific stuff), because I'd love to know how all the bits fit together. In particular, I'm baffled as to why some X applications (such as KDE) get beautiful antialiased truetype rendering, others like Mozilla get antialiasing but not as good, and others like GIMP and xfontsel can't even seem to see truetype fonts at all. If anyone can tell me how to fix this, that would be great too.
Back to top
View user's profile Send private message
Larde
Guru
Guru


Joined: 07 Jun 2002
Posts: 313
Location: Duesseldorf, Germany

PostPosted: Tue Jul 02, 2002 4:33 pm    Post subject: additional Mozilla hint Reply with quote

Just as a small tip for people who experienced getting their fonts trashed with AA on and scrolling around in Mozilla (it looked like this on my system):

I changed the display resolution setting in Mozilla from "System Setting" to 96dpi. This totally solved my problem (which I only had with one of two machines).
Back to top
View user's profile Send private message
wilbertnl
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 89
Location: Tulsa, OK, USA

PostPosted: Tue Jul 02, 2002 4:58 pm    Post subject: Maybe give XFS a try? Reply with quote

iangoldby wrote:
In particular, I'm baffled as to why some X applications (such as KDE) get beautiful antialiased truetype rendering, others like Mozilla get antialiasing but not as good, and others like GIMP and xfontsel can't even seem to see truetype fonts at all. If anyone can tell me how to fix this, that would be great too.


Ehm... I'm running the XFS font server and here and now all the Microsoft Truetype fonts are available in xfontsel and Gimp. :roll:
I'm not a KDE user, but to me, Mozilla looks much better after I implemented the tip in this thread. Maybe XFS is worth giving a try?
_________________
Wilbert van Bakel
Strive for excellence, not perfection
Back to top
View user's profile Send private message
Ivan Zenkov
n00b
n00b


Joined: 03 Jul 2002
Posts: 26
Location: Russia

PostPosted: Wed Jul 03, 2002 6:02 pm    Post subject: Reply with quote

Good manual on this subject - Good-looking fonts in X Windows
_________________
Jabber ID: rublik@jabber.ru
Back to top
View user's profile Send private message
arkmch
n00b
n00b


Joined: 03 May 2002
Posts: 2
Location: Kurów, Poland

PostPosted: Thu Jul 11, 2002 4:43 pm    Post subject: Re: XFree anti-aliased font tips Reply with quote

kerframil wrote:

Code:

# There's no need for fonts to be anti-aliased at "normal' sizes,
# they cause eyestrain and don't really enhance the fonts. Tell Xft
# not to anti-alias fonts between 8pt and 14pt sizes
match
   any size > 8
   any size < 14
edit
   antialias = false;

# Same again, but enforced for KDE (specifically Konqueror/KHTML)
match
   any pixelsize > 8
   any pixelsize < 14
edit
   antialias = false;



Maybe this is a bug in my KDE installation, but I found that size is not the same as pixelsize. I got much better results in Konqueror with these settings:

Code:

# There's no need for fonts to be anti-aliased at "normal' sizes,
# they cause eyestrain and don't really enhance the fonts. Tell Xft
# not to anti-alias fonts between 8pt and 14pt sizes, and bold fonts
# between 8pt and 10 pt sizes.
match
        any size > 8
        any size < 15
edit
        antialias = false;

match
        any size > 10
        all weight == bold
edit
        antialias = true;

# Same again, with some fine-tuning, enforced for KDE (specifically
# Konqueror/KHTML)
match
        any pixelsize > 8
        any pixelsize < 18
edit
        antialias = false;

# Verdana should also be antialiased at 17pts
match
        any family == "Verdana"
        any pixelsize = 17

edit
        antialias = true;

# Times New Roman Italic doesn't look good antialiased at larger sizes
match
        any family == "Times New Roman"
        all slant == italic
        any pixelsize > 15
        any pixelsize  < 20
edit
        antialias = false;

# Bold fonts
match
        any pixelsize > 12
        all weight == bold
edit
        antialias = true;
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum