archlinux
Geek code...

oh!my god!

TLHL28 posted @ Sat, 13 Jun 2009 09:44:02 +0800 in 随笔 with tags 记录 , 1361 readers

oh! my god !

i like archlinux ! and archlinux wiki!!

this script is copy form this guideline which belong to archlinux wiki.

i just had a try ! i don't think it would make any sence!

i copied it into /etc/fonts/conf.d/50-user.conf, and saved it. the font changed immediately, without restart X window!

and it show good!

 

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- Load per-user customization file -->
    <include ignore_missing="yes">~/.fonts.conf</include>

    <!--全部的字体使用autohint 和 antialiasing,渲染度为 hintfull ,通常这是一个很好的全局默认设置。也可以根据个人喜好使用渲染度为hintslight。  -->
    <match target="font">
        <edit name="autohint">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle">
            <const>hintfull</const>
        </edit>
        <edit name="antialias">
            <bool>true</bool>
        </edit>
    </match>

    <!--小于16号的MS core fonts,关闭Antialiasing 和 Autohint,(使用hinting) 。可以根据个人喜欢调节字号的大小 -->
    <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>
            <string>Andale Sans</string>
            <string>Andy MT</string>
            <string>Bell MT</string>
            <string>Monotype Sorts</string>
        </test>
        <test name="pixelsize" compare="less_eq">
            <double>16</double>
        </test>
        <edit name="autohint">
            <bool>false</bool>
        </edit>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
    </match>

    <!--让字体引擎(FreeType)取消CJK字体的指定宽度 -->
    <match target="font">
        <test target="pattern" name="lang" compare="contains">
            <string>zh</string>
            <string>ja</string>
            <string>ko</string>
        </test>
        <edit name="spacing">
            <const>proportional</const>
        </edit>
        <edit name="globaladvance">
            <bool>false</bool>
        </edit>
    </match>

    <!--把Simsun , SimSun-18030 , AR PL ShanHeiSun Uni等这个几个中文字体的英文部分,用 Tahoma,Arial 等替换。  -->
    <match target="pattern">
        <test name="family">
            <string>SimSun</string>
            <string>SimSun-18030</string>
            <string>AR PL ShanHeiSun Uni</string>
            <string>AR PL New Sung</string>
            <string>MingLiU</string>
            <string>PMingLiU</string>
        </test>
        <edit binding="strong" mode="prepend" name="family">
            <string>Tahoma</string>
            <string>Arial</string>
            <string>Verdana</string>
            <string>DejaVu Sans</string>
            <string>Bitstream Vera Sans</string>
        </edit>
    </match>

    <!-- 把 AR PL ShanHeiSun Uni , AR PL New Sung 字体中12~16号的中文字用 WenQuanYi Bitmap Song 点阵字替换, WenQuanYi Bitmap Song 比 AR PL ShanHeiSun Uni , AR PL New Sung中的内嵌点阵更加完善,美观。  -->
    <match target="pattern">
        <test name="family" qual="any">
            <string>AR PL ShanHeiSun Uni</string>
            <string>AR PL New Sung</string>
        </test>
        <test compare="more_eq" name="pixelsize" >
            <double>12</double>
        </test>
        <test compare="less_eq" name="pixelsize" >
            <double>16</double>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>WenQuanYi Bitmap Song</string>
        </edit>
    </match>

    <!--当字体有内嵌字体时,优先使用内嵌字体 -->
    <match target="font">
        <edit name="embeddedbitmap" mode="assign">
            <bool>true</bool>
        </edit>
    </match>


    <!--有些 CJK 字体要the byte code interpreter (hinting)才能正确的显示,因为这些字体使用了hinting的一些技术制作。常见的MingLiu 就是这类字体。  -->
    <match target="font">
        <test name="family">
            <string>MingLiU</string>
            <string>PMingLiU</string>
        </test>
        <edit name="autohint">
            <bool>false</bool>
        </edit>
        <edit name="hinting">
            <bool>true</bool>
        </edit>
    </match>

</fontconfig>

 


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter