Ubuntu字体美化之安装使用准圆字体(附图)

86211941 2008-01-19

想不想给自己的Ubuntu字体美化下呢?下面跟我来吧!

注意:在Ubuntu下使用本准圆字体有版权方面的问题——大概有吧,请放心大胆的偷偷摸摸的使用。另外,只能满足中文、英文、法文、日文等(我也不清楚那些是什么字符)用户的需要。

1。首先下载由我修改过的准圆字体(原作者是谁不清楚)。
地址: http://ftp.ubuntu.org.cn/home/zhuqin_83/ZhunYuan.ttf
用户名:ubuntu,密码:ubuntuftp

声明:我修改了原来的英文部分,换成原来准圆的英文字体,并对部分非英文如 á ô è ï 之类进行了宽度调整。

2。将字体cp到~/.fonts 或者 /usr/local/share/fonts/ 或者 /usr/share/fonts/ 。
如果嫌麻烦,就放到~/.fonts好了,然后刷新一下字体缓存,执行 代码:
sudo fc-cache -f
注意,如果不是放到~/.fonts的请小心字体的权限。
如果出现方框字体,请打开终端,cd到你的字体目录,并执行 代码:
sudo chmod 755 ZhunYuan.ttf

3。修改/etc/fonts/language-selector.conf。
代码:
sudo gedit /etc/fonts/language-selector.conf

如果你从来没修改过这个文件,那么可以直接复制粘贴,否则本配置文件仅作参考。注意,ZhunYuan必须放在每个<family>xxx</family>的第二行。
代码:
<fontconfig>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Bitstream Vera Serif</family>
                        <family>ZhunYuan</family>
                        <family>DejaVu Serif</family>
                        <family>AR PL ShanHeiSun Uni</family>
                        <family>AR PL ZenKai Uni</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Bitstream Vera Sans</family>
                        <family>ZhunYuan</family>
                        <family>DejaVu Sans</family>
                        <family>AR PL ShanHeiSun Uni</family>
                        <family>AR PL ZenKai Uni</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Bitstream Vera Sans Mono</family>
                        <family>ZhunYuan</family>
                        <family>DejaVu Sans Mono</family>
                        <family>AR PL ShanHeiSun Uni</family>
                        <family>AR PL ZenKai Uni</family>
                </prefer>
        </alias>
        <match target="font" >
                <test qual="any" name="family" compare="eq" >
                        <string>ZhunYuan</string>
                        <string>Bitstream Vera Serif</string>
                        <string>Bitstream Vera Sans</string>
                        <string>Bitstream Vera Sans Mono</string>
                </test>
                <edit name="rgba" mode="assign">
                        <const>rgb</const>
                </edit>
                <edit name="antialias" mode="assign" >
                        <bool>true</bool>
                </edit>
                <edit name="autohint" mode="assign" >
                        <bool>false</bool>
                </edit>
                <edit name="hinting" mode="assign" >
                        <bool>true</bool>
                </edit>
                <edit name="hintstyle" mode="assign" >
                        <const>hintslight</const>
                </edit>
        </match>
        <match target="font" >
                <test name="family" compare="contains" >
                        <string>Song</string>
                        <string>Sun</string>
                        <string>Kai</string>
                        <string>Ming</string>
                </test>
                <!-- check to see if the font is just regular -->
                <test name="weight" compare="less_eq">
                        <int>100</int>
                </test>
                <test compare="more_eq" target="pattern" name="weight" >
                        <int>180</int>
                </test>
                <edit mode="assign" name="embolden" >
                        <bool>true</bool>
                </edit>
        </match>
        <match target="font" >
                <test name="family" compare="contains" >
                        <string>Song</string>
                        <string>Sun</string>
                        <string>Kai</string>
                        <string>Ming</string>
                </test>
                <edit name="globaladvance">
                        <bool>false</bool>
                </edit>
                <edit name="spacing">
                        <int>0</int>
                </edit>
                <edit name="hinting">
                        <bool>true</bool>
                </edit>
                <edit name="autohint">
                        <bool>false</bool>
                </edit>
                <edit name="antialias" mode="assign">
                        <bool>true</bool>
                </edit>
                <test name="pixelsize" compare="less_eq">
                        <int>18</int>
                </test>
                <edit name="antialias" mode="assign" >
                        <bool>false</bool>
                </edit>
        </match>
</fontconfig>

相关推荐