<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Generated by SuSEconfig.fonts, don't edit, your changes will get lost. -->
<!-- Edit /etc/sysconfig/fonts-config instead.                              -->
<!-- Or put rules into your personal config file ~/.fonts.conf.             -->

<!-- ************************************************************ -->
<!-- Hinting and antialiasing                                     -->
<!-- ************************************************************ -->

<!--
    Fonts which have high quality byte code interpreter instructions
    can look very good in small sizes when rendered in black and white
    (antialias=false) using the byte code interpreter (autohint=false).
    The results look as good as high quality bitmap fonts.

    On the other hand, most Fonts do not have good byte code interpreter
    instructions and look *very* ugly when rendered like this.
    I.e. for most fonts autohint=true and antialias=true gives best
    results.

    For fonts which do have good byte code instructions, it seems
    to be a matter of taste. Most users apparently do not like the
    bitmaps no matter how good they are and prefer to render
    these fonts with anti-aliasing as well.

    When rendering fonts which do have good byte code with anti-aliasing
    (antialias=true), the byte code apparently doesn't help much, to
    the contrary, it produces strange rendering artifacts.
    Therefore it is usually better to always use the autohinter (autohint=true)
    when rendering with anti-aliasing.

-->

        <!--
            Using the autohinter and anti-aliasing.
            This is a good default for most fonts.
        -->
        <match target="font">
                <edit name="autohint">
                        <bool>true</bool>
                </edit>
                <edit name="antialias">
                        <bool>true</bool>
                </edit>
        </match>

        <!--
            The following rule sets up black and white rendering with
            the byte code interpreter for a small list of fonts which
            are known to have good byte code and give bitmap quality
            results at small sizes.
            The pixelsize limit is set to '0' though, which effectively
            disables this rule by default because most users don't like
            that bitmap look and feel.
            If you like a bitmap look and feel of your desktop,
            copy this rule into your ~/.fonts.conf file and replace the '0'
            with non-zero pixelsize limit. Using '18' as the pixelsize
            limit is a good choice if you have the fonts in this list installed
            and like a bitmap look and feel. 
        -->
        <match target="font">
                <test name="family">
                        <string>Andale Mono</string>
                        <string>Arial</string>
                        <string>Comic Sans MS</string>
                        <string>Georgia</string>
                        <string>Impact</string>
                        <string>Trebuchet MS</string>
                        <string>Verdana</string>
                        <string>Courier New</string>
                        <string>Times New Roman</string>
                        <string>Tahoma</string>
                        <string>Webdings</string>
                        <string>Albany AMT</string>
                        <string>Thorndale AMT</string>
                        <string>Cumberland AMT</string>
                </test>
		<test name="pixelsize" compare="less_eq">
				<double>0</double>
		</test>
                <edit name="autohint">
                        <bool>false</bool>
                </edit>
                <edit name="antialias">
                        <bool>false</bool>
                </edit>
        </match>

<!-- 
Hinting for CJK fonts in freetype doesn't yet work as well as for Latin fonts.

But our freetype package has the patch from
 http://www.kde.gr.jp/~akito/patch/freetype2/2.1.7
applied which improves the hinting results for CJK fonts a lot.

If you are using a freetype package without that patch you may prefer
to switch off hinting by setting hintstyle=hintnone for CJK fonts.

This can be achieved by using the following rule:

        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                        <string>zh</string>
                        <string>ko</string>
                </test>
                <edit name="hintstyle" mode="assign">
                        <const>hintnone</const>
                </edit>
        </match>
-->

<!--
Since we updated to freetype 2.1.10, the patch from
http://www.kde.gr.jp/~akito/patch/freetype2/2.1.7 could not be applied
anymore. Unfortunately the rendering quality of CJK fonts suffered a lot
because of this update. The most extreme loss of rendering quality
happened for the IPA fonts.

See also http://bugzilla.novell.com/show_bug.cgi?id=105626

For other CJK fonts it is not that bad and on top of that most
other CJK fonts have a wide range of embedded bitmaps which are used
by default. And for big sizes, where there are not bitmaps anymore,
the rendering quality is good anyway.

As a workaround, switch of the hinting by setting hintstyle=hintnone
for the IPA fonts:
-->

        <match target="font">
                <test name="family">
                        <string>IPAMincho</string>
                        <string>IPAGothic</string>
                        <string>IPAPMincho</string>
                        <string>IPAPGothic</string>
                        <string>IPAUIGothic</string>
                </test>
                <edit name="hintstyle">
                        <const>hintnone</const>
                </edit>
        </match>

<!--
for some Bengali fonts (e.g. "Mukti Narrow"), the autohinter works well
with the patch from http://www.kde.gr.jp/~akito/patch/freetype2/2.1.7
applied. But for "Likhan" it still doesn't work that well
(look how the "matra" lines at the top line up). Therefore, switch
off the autohinter for the "Likhan" font:
-->

        <match target="font">
                <test name="family">
                        <string>Likhan</string>
                </test>
                <edit name="hintstyle">
                        <const>hintnone</const>
                </edit>
        </match>


</fontconfig>
