Example .fonts.conf

Fontconfig is very powerful but easy to get confused by. Also, the default configurations has a Westerner using only Latin true type fonts in mind, those of us who want to use other fonts and want to read other scripts have to try to find settings that work for us as well. Having said that, there are personal preferences that come into play as well.

I like to use bitmap fonts in my editor gvim, and in my main profile a Japanese bitmap font in Firefox as well. So allow bitmap fonts.

Remove the symbolic link 70-no-bitmaps.conf from /etc/fonts.conf.d (and if that's not enough symlink 70-yes-bitmaps.conf.

rm /etc/fonts/conf.d/70-no-bitmaps.conf    
ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/

Edit: in Slackware 14.1 you also need to remove the following line to get sharp bitmap fonts at only their natural size:

rm /etc/fonts/conf.d/10-scale-bitmap-fonts.conf.

Certain Asian TTF don't need to be hinted or don't need to be anti-aliased, or neither, but it depends on the font really. Calligraphic fonts seem to look better with anti-alias for example.

For the most of the fonts on my system so far the ~/.fonts.conf below seems best for my eyes, but I'm still working on it.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="font" >
        <edit mode="assign" name="rgba" >
            <const>none</const>
        </edit>
    </match>

    <match target="font" >
        <edit mode="assign" name="hinting" >
            <bool>true</bool>
        </edit>
    </match>

    <match target="font" >
        <edit mode="assign" name="hintstyle" >
            <const>hintfull</const>
        </edit>
    </match>

    <match target="font" >
        <edit mode="assign" name="antialias" >
            <bool>true</bool>
        </edit>
    </match>

    <match target="font">
        <test name="family">
            <string>EPSON 行書体M</string>
        </test>
        <edit name="hinting">
            <bool>false</bool>
        </edit>
        <edit mode="assign" name="antialias" >
            <bool>true</bool>
        </edit>
    </match>

    <match target="font">
        <test name="family">
            <string>EPSON 太行書体B</string>
        </test>
        <edit name="hinting">
            <bool>false</bool>
        </edit>
        <edit mode="assign" name="antialias" >
            <bool>true</bool>
        </edit>
    </match>
</fontconfig>

The lines below, matching all Japanese fonts, are too general for me, and need further testing anyway. I did notice that certain Japanese TTF became much more crisp and readable using these lines, but I think I've got to match them individually, like 太行書体B above. Also, taste may vary, some people want all their fonts to be fat, even if that means blurry as well.

<fontconfig> 
    <match target="font"> 
        <test name="lang" compare="contains"> 
            <string>ja</string> 
        </test> 
        <edit name="embeddedbitmap" mode="assign"> 
            <bool>false</bool> 
        </edit> 
        <edit name="autohint" mode="assign"> 
            <bool>true</bool> 
        </edit> 
        <edit name="antialias" mode="assign"> 
            <bool>false</bool> 
        </edit> 
        <edit name="hintstyle" mode="assign"> 
            <const>hintnone</const> 
        </edit> 
    </match> 
</fontconfig>