HowTo use partially non-aliased fonts

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

HowTo use partially non-aliased fonts

#1 Post by MU »

The X-Font-Server (xfs) has a method to antialias fonts.
They look less "pixeled" then.

This is good for huge fonts, because they look "rounded".

But depending on your monitor and your eyes, such fonts can be difficult to read at small sizes.

So here is a description, how to avoid antialias at small sizes.

That picture shows the result:
http://dotpups.de/pics/puppy/antialias.jpg


I installed this Dotpup, but I am not shure you need that:
http://www.murga.org/~puppy/viewtopic.php?t=4672

Then I deleted all files in /etc/fonts (rename them!)
I added a new /etc/fonts/fonts.conf

Code: Select all

<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> 
<!-- /etc/fonts/local.conf file for local customizations --> 
<fontconfig> 

	<dir>/usr/share/fonts</dir>
	<dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/opt/ttfonts</dir> <dir>/usr/share/yudit/fonts</dir>
	<dir>~/.fonts</dir>



        <match target="font"> 
            <test name="size" compare="less"> 
                <double>13</double> 
            </test> 
            <edit name="antialias" mode="assign"> 
                <bool>false</bool> 
            </edit> 
        </match> 
        <match target="font"> 

            <test name="pixelsize" compare="less" qual="any"> 
                <double>13</double> 
            </test> 
            <edit mode="assign" name="antialias"> 
                <bool>false</bool> 
            </edit> 
        </match> 
</fontconfig>
You can run leafpad now, to test it.
Maybe, you will not see what you expected.
You have to force Gtk2-applications like leafpad,to use a font, that looks good.

Create a file /root/.gtkrc-2.0

Code: Select all

style "user-font" {
	font_name = "lucida 12"
}
widget_class "*" style "user-font"
You also might have to set up your windowmanager.
I use fluxbox, with the Aqua-Theme.
So I edited
/root/.fluxbox/styles/FluxAqua

I replaced the line

Code: Select all

*font:					Andale-12
with

Code: Select all

*font:					-adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*
I copied Helvetica and Verdana from my Windows-Folder to /root/.fonts , and ran the commands:
cd /root/.fonts
mkfontscale `pwd`
mkfontdir `pwd`
xset fp+ /root/.fonts


Now Mozilla:
In edit - preferences:

Image

Mark
Ps: more info on Fonts: http://www.murga.org/~puppy/viewtopic.p ... 1&start=30

Thanks to Barry and Bombayrockers for their tips :!: :P

Post Reply