取得windows下/windows/fonts的所有字体文件。
sudo mkdir /usr/share/fonts/winfont
under /windows/fonts :
sudo cp aria* /usr/share/fonts/winfont/
sudo cp verdan* /usr/share/fonts/winfont/
sudo cp sim* /usr/share/fonts/winfont/
sudo cp cour* /usr/share/fonts/winfont/
sudo cp ST* /usr/share/fonts/winfont/
sudo cp tahoma* /usr/share/fonts/winfont/
sudo cp georgia* /usr/share/fonts/winfont/
cd /usr/share/fonts/winfont
sudo mkfontdir
sudo mkfontscale
sudo fc-cache
建立local.conf配置文件。
sudo gedit /etc/fonts/local.conf
内容:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure local fonts -->
<!--
说明,这一套设置在GNome桌面和Firefox及其它GTK程序上都表现的很好,KDE中也还差不多,但Konqueror好像有自己的
字体匹配技术,不太遵循fontconfig,所以在KDE中建议用Firefox浏览网页,这样的话GNome+KDE的中文环境都非常好了
-->
<fontconfig>
<!--
第一部分,字体优先设置和替换
-->
<!--
字体别名设置,主要设置SimSun和NSimSun,设置之后后面的SimSun和
NSimSun英文替换只用针对英文别名写,中文别名可以不写了。
-->
<match target="pattern">
<test name="family">
<string>宋体</string>
</test>
<edit name="family" mode="assign">
<string>SimSun</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>新宋体</string>
</test>
<edit name="family" mode="assign">
<string>NSimSun</string>
</edit>
</match>
<!--
Sans-serif 字体族
-->
<alias>
<family>SimSun</family>
<family>Verdana</family>
<family>Arial</family>
<family>SimHei</family>
<family>FangSong_GB2312</family>
<family>KaiTi_GB2312</family>
<family>YouYuan</family>
<family>LiSu</family>
<family>STSong</family>
<family>STZhongsong</family>
<family>STXihei</family>
<family>STFangsong</family>
<family>STKaiti</family>
<family>STXingkai</family>
<family>STLiti</family>
<family>STCaiyun</family>
<family>STHupo</family>
<family>STXinwei</family>
<family>FZYaoTi</family>
<family>FZShuTi</family>
<family>Arial Unicode MS</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Serif 字体族
-->
<alias>
<family>SimSun</family>
<family>Georgia</family>
<family>Times New Roman</family>
<default><family>serif</family></default>
</alias>
<!--
Monospace 字体族
-->
<alias>
<family>NSimSun</family>
<family>Courier New</family>
<family>Andale Mono</family>
<default><family>monospace</family></default>
</alias>
<!--
SimSun字体,英文部分用Tahoma替换,解决粗体英文破粹问题
“宋体”不用再做设置,前面已用别名解决
<match target="pattern">
<test name="family" >
<string>SimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Tahoma</string>
</edit>
</match>
-->
<!--
把3个Adobe字体用MS中相对应的字体替换
<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>SimSun</family>
<family>Tahoma</family>
<family>Verdana</family>
<family>Arial</family>
<family>SimHei</family>
<family>FangSong_GB2312</family>
<family>KaiTi_GB2312</family>
<family>YouYuan</family>
<family>LiSu</family>
<family>STSong</family>
<family>STZhongsong</family>
<family>STXihei</family>
<family>STFangsong</family>
<family>STKaiti</family>
<family>STXingkai</family>
<family>STLiti</family>
<family>STCaiyun</family>
<family>STHupo</family>
<family>STXinwei</family>
<family>FZYaoTi</family>
<family>FZShuTi</family>
<family>Arial Unicode MS</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>SimSun</family>
<family>Georgia</family>
<family>Times New Roman</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>NSimSun</family>
<family>Courier New</family>
<family>Andale Mono</family>
</prefer>
</alias>
<!--
NSimSun字体,英文部分用Courier New替换,解决粗体英文破粹问题,这样
在firefox中查看源码时不会出现英文破粹
“新宋体”不用再做设置,前面已用别名解决
-->
<match target="pattern">
<test name="family" >
<string>NSimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier New</string>
</edit>
</match>
<!--
Courier 字体替换成 Courier New
-->
<match target="pattern">
<test name="family" >
<string>Courier</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier</string>
</edit>
</match>
<!--
针对Tahoma,Verdana字体,大号粗体显示太粗,
这里我替换成Arial,临界值为20px(96 dpi 下15pt)
15*96/72=20,注意下面的单位是像素pixelsize,可以
测试后再换成其它值
-->
<!--
<match target="pattern">
<test name="family" >
<string>Tahoma</string>
<string>Verdana</string>
</test>
<test name="weight" compare="more_eq">
<int>180</int>
</test>
<test name="pixelsize" compare="more_eq" >
<double>20</double>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Arial</string>
</edit>
</match>
-->
<!--
第二部分
全局设置和调整,包括AA,HINT等
-->
<!--
设置DPI,请设置成xdpyinfo | grep dot看到的DPI,也可以不设置。
-->
<!--
<match target="pattern" >
<edit name="dpi" mode="assign" >
<double>96</double>
</edit>
</match>
-->
<!--
子像素渲染设置,据需要而定,我的LCD就没开,设置为NONE,如果看到字体
颜色有问题(如泛蓝,泛绿色等),请设置成rgb或其它值,具体参考man fonts-conf
-->
<match target="font">
<edit name="rgba" mode="assign">
<const>none</const>
</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" >Courier New
<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>
sudo mkdir /usr/share/fonts/winfont
under /windows/fonts :
sudo cp aria* /usr/share/fonts/winfont/
sudo cp verdan* /usr/share/fonts/winfont/
sudo cp sim* /usr/share/fonts/winfont/
sudo cp cour* /usr/share/fonts/winfont/
sudo cp ST* /usr/share/fonts/winfont/
sudo cp tahoma* /usr/share/fonts/winfont/
sudo cp georgia* /usr/share/fonts/winfont/
cd /usr/share/fonts/winfont
sudo mkfontdir
sudo mkfontscale
sudo fc-cache
建立local.conf配置文件。
sudo gedit /etc/fonts/local.conf
内容:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure local fonts -->
<!--
说明,这一套设置在GNome桌面和Firefox及其它GTK程序上都表现的很好,KDE中也还差不多,但Konqueror好像有自己的
字体匹配技术,不太遵循fontconfig,所以在KDE中建议用Firefox浏览网页,这样的话GNome+KDE的中文环境都非常好了
-->
<fontconfig>
<!--
第一部分,字体优先设置和替换
-->
<!--
字体别名设置,主要设置SimSun和NSimSun,设置之后后面的SimSun和
NSimSun英文替换只用针对英文别名写,中文别名可以不写了。
-->
<match target="pattern">
<test name="family">
<string>宋体</string>
</test>
<edit name="family" mode="assign">
<string>SimSun</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>新宋体</string>
</test>
<edit name="family" mode="assign">
<string>NSimSun</string>
</edit>
</match>
<!--
Sans-serif 字体族
-->
<alias>
<family>SimSun</family>
<family>Verdana</family>
<family>Arial</family>
<family>SimHei</family>
<family>FangSong_GB2312</family>
<family>KaiTi_GB2312</family>
<family>YouYuan</family>
<family>LiSu</family>
<family>STSong</family>
<family>STZhongsong</family>
<family>STXihei</family>
<family>STFangsong</family>
<family>STKaiti</family>
<family>STXingkai</family>
<family>STLiti</family>
<family>STCaiyun</family>
<family>STHupo</family>
<family>STXinwei</family>
<family>FZYaoTi</family>
<family>FZShuTi</family>
<family>Arial Unicode MS</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Serif 字体族
-->
<alias>
<family>SimSun</family>
<family>Georgia</family>
<family>Times New Roman</family>
<default><family>serif</family></default>
</alias>
<!--
Monospace 字体族
-->
<alias>
<family>NSimSun</family>
<family>Courier New</family>
<family>Andale Mono</family>
<default><family>monospace</family></default>
</alias>
<!--
SimSun字体,英文部分用Tahoma替换,解决粗体英文破粹问题
“宋体”不用再做设置,前面已用别名解决
<match target="pattern">
<test name="family" >
<string>SimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Tahoma</string>
</edit>
</match>
-->
<!--
把3个Adobe字体用MS中相对应的字体替换
<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>SimSun</family>
<family>Tahoma</family>
<family>Verdana</family>
<family>Arial</family>
<family>SimHei</family>
<family>FangSong_GB2312</family>
<family>KaiTi_GB2312</family>
<family>YouYuan</family>
<family>LiSu</family>
<family>STSong</family>
<family>STZhongsong</family>
<family>STXihei</family>
<family>STFangsong</family>
<family>STKaiti</family>
<family>STXingkai</family>
<family>STLiti</family>
<family>STCaiyun</family>
<family>STHupo</family>
<family>STXinwei</family>
<family>FZYaoTi</family>
<family>FZShuTi</family>
<family>Arial Unicode MS</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>SimSun</family>
<family>Georgia</family>
<family>Times New Roman</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>NSimSun</family>
<family>Courier New</family>
<family>Andale Mono</family>
</prefer>
</alias>
<!--
NSimSun字体,英文部分用Courier New替换,解决粗体英文破粹问题,这样
在firefox中查看源码时不会出现英文破粹
“新宋体”不用再做设置,前面已用别名解决
-->
<match target="pattern">
<test name="family" >
<string>NSimSun</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier New</string>
</edit>
</match>
<!--
Courier 字体替换成 Courier New
-->
<match target="pattern">
<test name="family" >
<string>Courier</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Courier</string>
</edit>
</match>
<!--
针对Tahoma,Verdana字体,大号粗体显示太粗,
这里我替换成Arial,临界值为20px(96 dpi 下15pt)
15*96/72=20,注意下面的单位是像素pixelsize,可以
测试后再换成其它值
-->
<!--
<match target="pattern">
<test name="family" >
<string>Tahoma</string>
<string>Verdana</string>
</test>
<test name="weight" compare="more_eq">
<int>180</int>
</test>
<test name="pixelsize" compare="more_eq" >
<double>20</double>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Arial</string>
</edit>
</match>
-->
<!--
第二部分
全局设置和调整,包括AA,HINT等
-->
<!--
设置DPI,请设置成xdpyinfo | grep dot看到的DPI,也可以不设置。
-->
<!--
<match target="pattern" >
<edit name="dpi" mode="assign" >
<double>96</double>
</edit>
</match>
-->
<!--
子像素渲染设置,据需要而定,我的LCD就没开,设置为NONE,如果看到字体
颜色有问题(如泛蓝,泛绿色等),请设置成rgb或其它值,具体参考man fonts-conf
-->
<match target="font">
<edit name="rgba" mode="assign">
<const>none</const>
</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" >Courier New
<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>
转载于:https://blog.51cto.com/zhangjunhd/140641