安装必要的字体包

1sudo apt-get install ttf-droid ttf-wqy-zenhei xfonts-wqy ttf-wqy-microhei ttf-arphic-ukai ttf-arphic-uming

修改字体配置文件

将以下内容写到存放到你的home目录下,命名为 .fonts.conf,就可以了。

  1<?xmlversion ='1.0'encoding='utf-8'??>
  2
  3<fontconfig>
  4<alias>
  5<family>serif</family>
  6<prefer>
  7<family>DejaVu Serif</family>
  8<family>Bitstream Vera Serif</family>
  9<family>Evermore Song</family>
 10<family>WenQuanYi Bitmap Song</family>
 11<family>AR PL UMing CN</family>
 12<family>AR PL ShanHeiSun Uni</family>
 13<family>Droid Sans Fallback</family>
 14<family>WenQuanYi Micro Hei</family>
 15<family>WenQuanYi Zen Hei</family>
 16</prefer>
 17</alias>
 18<alias>
 19<family>sans-serif</family>
 20<prefer>
 21<family>DejaVu Sans</family>
 22<family>Bitstream Vera Sans</family>
 23<family>Evermore Song</family>
 24<family>Droid Sans Fallback</family>
 25<family>WenQuanYi Micro Hei</family>
 26<family>WenQuanYi Bitmap Song</family>
 27<family>WenQuanYi Zen Hei</family>
 28<family>AR PL UMing CN</family>
 29<family>AR PL ShanHeiSun Uni</family>
 30</prefer>
 31</alias>
 32<alias>
 33<family>monospace</family>
 34<prefer>
 35<family>DejaVu Sans Mono</family>
 36<family>Bitstream Vera Sans Mono</family>
 37<family>Evermore Song</family>
 38<family>WenQuanYi Micro Hei Mono</family>
 39<family>WenQuanYi Zen Hei Mono</family>
 40<family>Droid Sans Fallback</family>
 41<family>WenQuanYi Bitmap Song</family>
 42<family>AR PL UMing CN</family>
 43<family>AR PL ShanHeiSun Uni</family>
 44</prefer>
 45</alias>
 46
 47<alias>
 48<family>DejaVu Sans</family>
 49<default>
 50<family>sans-serif</family>
 51</default>
 52</alias>
 53
 54<matchtarget>
 55<testname>
 56<string>serif</string>
 57
 58<editbinding>
 59<string>DejaVu Serif</string>
 60
 61
 62<matchtarget>
 63<testname>
 64<string>sans-serif</string>
 65
 66<editbinding>
 67<string>DejaVu Sans</string>
 68
 69
 70<matchtarget>
 71<testname>
 72<string>monospace</string>
 73
 74<editbinding>
 75<string>DejaVu Sans Mono</string>
 76
 77
 78
 79<matchtarget>
 80<editname>
 81<bool>false</bool>
 82
 83
 84
 85<selectfont>
 86<acceptfont>
 87<pattern>
 88<pateltname>
 89<string>WenQuanYi Bitmap Song</string>
 90
 91</pateltname></pattern>
 92</acceptfont>
 93</selectfont>
 94<matchtarget>
 95<testname>
 96<string>WenQuanYi Bitmap Song</string>
 97
 98<testcompare>
 99<double>12</double>
100
101<editmode>
102<string>WenQuanYi Micro Hei</string>
103
104
105<matchtarget>
106<testname>
107<string>WenQuanYi Bitmap Song</string>
108
109<testcompare>
110<double>16</double>
111
112<editmode>
113<string>AR PL ShanHeiSun</string>
114
115
116
117<alias>
118<family>SimSun</family>
119<family>宋体</family>
120<accept>
121<family>Evermore Song</family>
122<family>WenQuanYi Bitmap Song</family>
123<family>AR PL ShanHeiSun Uni</family>
124</accept>
125<default>
126<family>serif</family>
127</default>
128</alias>
129<alias>
130<family>SimHei</family>
131<family>黑体</family>
132<accept>
133<family>WenQuanYi Micro Hei</family>
134<family>WenQuanYi Zen Hei</family>
135</accept>
136<default>
137<family>sans-serif</family>
138</default>
139</alias>
140<alias>
141<family>微软雅黑</family>
142<family>Microsoft YaHei</family>
143<accept>
144<family>WenQuanYi Micro Hei</family>
145<family>WenQuanYi Zen Hei</family>
146</accept>
147<default>
148<family>sans-serif</family>
149</default>
150</alias>
151
152<matchtarget>
153<editmode>
154<const>rgb</const>
155
156
157<matchtarget>
158<editmode>
159<bool>true</bool>
160
161
162<matchtarget>
163<editmode>
164<const>hintfull</const>
165
166
167<matchtarget>
168<editmode>
169<bool>true</bool>
170
171
172<dir>~/.fonts</dir>
173</editmode></matchtarget></editmode></matchtarget></editmode></matchtarget></editmode></matchtarget></editmode></testcompare></testname></matchtarget></editmode></testcompare></testname></matchtarget></editname></matchtarget></editbinding></testname></matchtarget></editbinding></testname></matchtarget></editbinding></testname></matchtarget></fontconfig>

Konsole 字体

Konsole 下还是坚持使用 DejaVu Sans Mono 字体,那个字体更适合工作。

Chrome

Chrome 的字体渲染原则很奇怪,如果我们直接使用默认配置的话,它会选择一个很奇怪的日文字体来渲染中文,对于日文字体里不存在的中文文字,它又会 Fallback 到另外一个奇怪的中文字体上。滇狐目前没太多时间和精力来详细调查这个现象,

解决这个问题最简单的
方法就是把 Chrome 里的默认字体和 Sans 字体全都强制指定“Droid Sans Fallback”上,效果还不错。至于 Serif
字体,我们可以使用“Droid Serif”,Monospace 字体就用“Droid Sans Mono”,这样风格比较统一。