增加了/etc/fonts/local.conf就变成这样,文件如下:
[code:1]<fontconfig>
<match target="pattern" >
<edit name="dpi" mode="assign" >
<double>96</double>
</edit>
</match>
<alias>
<family>Arial</family>
<family>Verdana</family>
<family>Tahoma</family>
<family>SimSun</family>
<family>宋体</family>
<family>PMingLiU</family>
<family>新細明體</family>
<family>Comic Sans MS</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Georgia</family>
<family>Times New Roman</family>
<family>SimSun</family>
<family>宋体</family>
<family>PMingLiU</family>
<family>新細明體</family>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>Courier New</family>
<family>NSimSun</family>
<family>新宋体</family>
<family>MingLiU</family>
<family>細明體</family>
<default>
<family>monospace</family>
</default>
</alias>
<alias>
<family>Times</family>
<prefer>
<family>Times New Roman</family>
</prefer>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>Helvetica</family>
<prefer>
<family>Arial</family>
</prefer>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Courier</family>
<prefer>
<family>Courier New</family>
</prefer>
<default>
<family>monospace</family>
</default>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Arial</family>
<family>Verdana</family>
<family>Tahoma</family>
<family>SimSun</family>
<family>宋体</family>
<family>PMingLiU</family>
<family>新細明體</family>
<family>Comic Sans MS</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Georgia</family>
<family>Times New Roman</family>
<family>SimSun</family>
<family>宋体</family>
<family>PMingLiU</family>
<family>新細明體</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Courier New</family>
<family>NSimSun</family>
<family>新宋体</family>
<family>MingLiU</family>
<family>細明體</family>
</prefer>
</alias>
<match target="pattern">
<test name="family" >
<string>SimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Tahoma</string>
</edit>
</match>
<match target="pattern">
<test name="family" >
<string>宋体</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Tahoma</string>
</edit>
</match>
<match target="pattern">
<test name="family" >
<string>NSimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier New</string>
</edit>
</match>
<match target="pattern">
<test name="family" >
<string>新宋体</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier New</string>
</edit>
</match>
<match target="pattern">
<test name="family" >
<string>Courier</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier</string>
</edit>
</match>
<!--
设置最小字体,所有字体都如此,英文优先是Tahoma 8pt
-->
<match target="font" >
<test name="pixelsize" compare="more_eq" >
<double>8</double>
</test>
<test name="pixelsize" compare="less_eq" >
<double>11</double>
</test>
<edit name="pixelsize" mode="assign" >
<double>11</double>
</edit>
</match>
<!--
设置CJK最小字体,主要体现为SimSun ,和上面的综合起来就是
Tahoma 11px,SimSun 12px
对应96 dpi 下的就是 8pt , 9pt
具体临界值自己可以调整
-->
<match target="font" >
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="pixelsize" compare="more_eq" >
<double>8</double>
</test>
<test name="pixelsize" compare="less_eq" >
<double>12</double>
</test>
<edit name="pixelsize" mode="assign" >
<double>12</double>
</edit>
</match>
<!--
支持伪斜体,从fonts.conf中粗过来的。
-->
<match target="font">
<!-- check to see if the font is roman -->
<test name="slant">
<const>roman</const>
</test>
<!-- check to see if the pattern requested non-roman -->
<test target="pattern" name="slant" compare="not_eq">
<const>roman</const>
</test>
<!-- multiply the matrix to slant the font -->
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix>
<double>1</double><double>0.2</double>
<double>0</double><double>1</double>
</matrix>
</times>
</edit>
<!-- pretend the font is oblique now -->
<edit name="slant" mode="assign">
<const>oblique</const>
</edit>
</match>
<!--
支持伪粗体,从fonts.conf中粘过来的
-->
<match target="font">
<!-- check to see if the font is just regular -->
<test name="weight" compare="less_eq">
<int>100</int>
</test>
<!-- check to see if the pattern requests bold -->
<test target="pattern" name="weight" compare="more_eq">
<int>180</int>
</test>
<!-- set the embolden flag -->
<edit name="embolden" mode="assign">
<bool>true</bool>
</edit>
</match>
<!--
默认AA设置
针对自由字体,打开AA,AutoHint,关掉Hinting,样式为hintfull
MS和CJK字体,下面专门调整
-->
<match target="font" >
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign" >
<const>hintfull</const>
</edit>
</match>
<!--
解决中英文间距过大的问题
-->
<match target="font">
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<edit name="spacing" mode="assign" >
<const>proportional</const>
</edit>
<edit name="globaladvance" mode="assign" >
<bool>false</bool>
</edit>
</match>
<!--
CJK字体AA设置,小于20px(96dpi 上是15pt)时不开AA
-->
<match target="font" >
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="pixelsize" compare="more_eq" >
<double>8</double>
</test>
<test name="pixelsize" compare="less_eq" >
<double>20</double>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>false</bool>
</edit>
</match>
<!--
CJK字体AA设置,大于20px(96dpi 上是15pt)时开AA,AutoHint,Hinting
采用hintfull,
在我机器上autohint和hinting都开效果比较好,可以自己调整,一般两者只开一个,
具体视情况而定
-->
<match target="font" >
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="pixelsize" compare="more_eq" >
<double>20</double>
</test>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
</match>
<!--
如果是斜体CJK字体,打开AA,不喜欢可以把这一段删除掉或全部改成false
-->
<match target="font">
<test name="lang" compare="contains" >
<string>zh</string>
<string>ja</string>
<string>ko</string>
</test>
<test name="slant" compare="not_eq">
<const>roman</const>
</test>
<edit name="antialias" mode="assign" >
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign" >
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign" >
<bool>true</bool>
</edit>
</match>
<!--
微软字体设置
-->
<!--
默认,打开AA和hint,不喜欢,可以全部改成false
-->
<match target="font" >
<test name="foundry" >
<string>monotype</string>
<string>microsoft</string>
</test>
<edit name="antialias" mode="assign" >
<bool>false</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>hintfull</const>
</edit>
</match>
<!--
如果是Courier New,打开AA,AutoHint,Hinting,不喜欢可以全部改成false
-->
<match target="font" >
<test name="family" >
<string>Courier</string>
<string>Courier New</string>
</test>
<edit name="antialias" mode="assign" >
<bool>false</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>hintfull</const>
</edit>
</match>
<!--
Courier New 字体大小设置
这里设置最小为14.7px(96 dpi 上是11pt),可以依情况而定
-->
<match target="font" >
<test name="family" >
<string>Courier New</string>
</test>
<test name="pixelsize" compare="less_eq" >
<double>12</double>
</test>
<edit name="pixelsize" mode="assign" >
<double>12</double>
</edit>
</match>
</fontconfig>[/code:1]
修改~/.fcitx/config文件中的中文字体为NSimSun无效,并且变成小方框。
请指教啊!! |