Showing posts with label fontconfig. Show all posts
Showing posts with label fontconfig. Show all posts

Friday, September 16, 2011

arch linux 基于cairo-ubuntu的自己美化

~/cairo.html
archlinux的字体还是显示的有问题!


前几天使用了网上的那个帖子介绍的方法复制了.fonts.conf到自己的目录下.
结果显示的一塌糊涂,还不如原来的好看呢.结果把原来的配置也破坏了.

于是重新把gnome3的配置文件(~/.config/dconf/  ~/.gconf/ ~/.gconfd/)
删除掉才可以,然后重新配置.

首先还是安装 ttf-dejavu 和wqy-miacrohei 2种字体

然后 安装 ubuntu打了lcd补丁的cairo

    yaourt -S cairo-ubuntu

一个命令,yaourt就会自动安装fontconfig-ubuntu,freetype2-ubuntu,libxft-ubuntu
这3个带补丁的包

这个包提供了3种可选的方案,可以使用下面的方法选用其中一种

    cd /etc/fonts/conf.d/
    sudo ln -s ..conf.avail/10-hinting-<新方案名>.conf ./
    sudo rm 10-hinting-<原方案名>.conf

来实现可选渲染方案的切换.
默认的方案名是slight,可选的方案名总共包括:slight medium full

Wednesday, September 14, 2011

Archlinux 字体美化+配置

~/fontconig.html
 1 安装好arch使用了gnome-shell,在安装的过程中也安装了ttf-dejavu和wqy-microhei字体,可是显示的效果总让人很无奈。
 2 
 3 于是使用gnome-tweak-tool改变了字体的设置,使用microhei显示所有字体,可是效果还是有点不那么爽。
 4 
 5 上网挂google搜到这么一篇文章 Archlinux字体美化+配置
 6 
 7 于是按照上面文章所说使用 ubuntu打了补丁的程序替代原有的arch的字体渲染补丁。
 8 
 9 1,安装字体:
10 pacman -S ttf-dejavu
11 yaourt -S wqy-microhei
12 2,安装补丁:
13 yaourt -S cairo-ubuntu libxft-ubuntu freetype2-ubuntu fontconfig-ubuntu
14 3,配置文件:~/.fonts.conf
15 
16 <fontconfig>
17 
18    <match target="pattern">
19       <test qual="any" name="family">
20          <string>serif</string>
21       </test>
22       <edit name="family" mode="prepend" binding="strong">
23          <string>DejaVu Serif</string>
24          <string>WenQuanYi Micro Hei</string>
25       </edit>
26    </match>
27 
28    <match target="pattern">
29       <test qual="any" name="family">
30          <string>sans-serif</string>
31       </test>
32       <edit name="family" mode="prepend" binding="strong">
33          <string>DejaVu Sans</string>
34          <string>WenQuanYi Micro Hei</string>
35       </edit>
36    </match>
37 
38    <match target="pattern">
39       <test qual="any" name="family">
40          <string>monospace</string>
41       </test>
42       <edit name="family" mode="prepend" binding="strong">
43 <string>DejaVu Sans Mono</string>
44          <string>WenQuanYi Micro Hei Mono</string>
45       </edit>
46    </match>
47 
48 </fontconfig>
49 
50 //4,网上流传的通用字体配置文件:http://www.linuxsir.org/bbs/thread339541.html