求一个字体配置文件fonts.conf

回复
redlhl
帖子: 334
注册时间: 2008-06-27 20:47
送出感谢: 0
接收感谢: 0

求一个字体配置文件fonts.conf

#1

帖子 redlhl » 2010-11-06 21:15

如题 :em06
这个不会弄,这个必须得弄
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid
送出感谢: 1 次
接收感谢: 23 次

Re: 求一个字体配置文件fonts.conf

#2

帖子 leeaman » 2010-11-06 21:16

这个....看看wiki自己写一个都不难吧?我只有一个中文字体,所以没有这个烦恼
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
pocoyo
论坛版主
帖子: 25878
注册时间: 2008-03-25 15:49
来自: 谁知道?
送出感谢: 5 次
接收感谢: 9 次
联系:

Re: 求一个字体配置文件fonts.conf

#3

帖子 pocoyo » 2010-11-06 21:32

redlhl
帖子: 334
注册时间: 2008-06-27 20:47
送出感谢: 0
接收感谢: 0

Re: 求一个字体配置文件fonts.conf

#4

帖子 redlhl » 2010-11-06 22:36

这个....看看wiki自己写一个都不难吧?我只有一个中文字体,所以没有这个烦恼
wiki里面东西一大堆,想偷偷懒 :em02
这里面只是一些字体选择把,好像没有类似抗锯齿之类效果的设置
我的字体显示发虚,主要想解决这个问题
头像
pocoyo
论坛版主
帖子: 25878
注册时间: 2008-03-25 15:49
来自: 谁知道?
送出感谢: 5 次
接收感谢: 9 次
联系:

Re: 求一个字体配置文件fonts.conf

#5

帖子 pocoyo » 2010-11-06 22:42

我还是小模糊
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Target dots per inch -->
<match target="pattern">
<edit name="dpi" mode="assign" >
<double>96</double>
</edit>
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>

<!--Fonts rendering sequence-->
<alias>
<family>serif</family>
<prefer>
<!-- <family>DejaVu Serif Condensed</family> -->
<family>Monaco</family>
<family>WenQuanYi Micro Hei</family>
<family>方正兰亭黑_GBK</family>
<family>WenQuanYi Bitmap Song</family>
<family>方正稚艺 \- Kelvin</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family> <!-- 此处定义了Emacs里 C-h a里面的字体也跟colortheme有关。 sans对应于 右键主题中的 选择sans 后的字体 -->
<prefer>
<family>Monaco</family>
<family>方正兰亭黑_GBK</family>
<family>WenQuanYi Micro Hei</family>
</prefer>
</alias>
<alias>
<family>monospace</family> <!-- 此处定义Emacs里的内容里面的英文字体,rhythmbox里面的字体 运行 火狐里面的中文字体??? -->
<prefer>
<family>Monaco</family>
<family>WenQuanYi Micro Hei</family>
<family>方正兰亭黑_GBK</family>
</prefer>
</alias>

<!-- 下面三个 match created by WenQuanYi FcDesigner v0.5 -->
<!-- <match> -->
<!-- <test name="family"><string>sans-serif</string></test> -->
<!-- <edit name="family" mode="prepend" binding="strong"> -->
<!-- <string>Monaco</string> -->
<!-- <string>方正兰亭黑_GBK</string> -->
<!-- <string>WenQuanYi Micro Hei</string> -->
<!-- </edit> -->
<!-- </match> -->
<!-- <match> -->
<!-- <test name="family"><string>serif</string></test> -->
<!-- <edit name="family" mode="prepend" binding="strong"> -->
<!-- <string>Monaco</string> -->
<!-- <string>WenQuanYi Micro Hei</string> -->
<!-- <string>方正兰亭黑_GBK</string> -->
<!-- <string>WenQuanYi Bitmap Song</string> -->
<!-- </edit> -->
<!-- </match> -->
<!-- <match> -->
<!-- <test name="family"><string>monospace</string></test> -->
<!-- <edit name="family" mode="prepend" binding="strong"> -->
<!-- <string>Monaco</string> -->
<!-- <string>WenQuanYi Micro Hei</string> -->
<!-- <string>方正兰亭黑_GBK</string> -->
<!-- </edit> -->
<!-- </match> -->

<!--Global settings for improving fonts rendering-->
<match target="font">
<test compare="more" name="pixelsize" qual="any">
<double>16</double>
</test>
<edit name="autohint" mode="assign" >
<bool>true</bool>
</edit>
</match>

<match target="font">
<edit name="hinting">
<bool>true</bool>
</edit>
<!--subpixel hinting for LCD ONLY-->
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="hintstyle">
<const>hintslight</const>
</edit>
<edit name="antialias">
<bool>true</bool>
</edit>
</match>

<!--Make Chinese fonts bigger if it's smaller than 12 pixel-->
<!-- <match target="font" > -->
<!-- <test name="family" compare="contains" > -->
<!-- <string>SimSun</string> -->
<!-- <string>AR PL</string> -->
<!-- </test> -->
<!-- <test compare="less_eq" name="pixelsize"> -->
<!-- <int>12</int> -->
<!-- </test> -->
<!-- <edit mode="assign" name="pixelsize"> -->
<!-- <int>12</int> -->
<!-- </edit> -->
<!-- </match> -->

<!--Rendering settings for Chinese fonts-->
<!-- <match target="font" > -->
<!-- <test name="family" compare="contains" > -->
<!-- <string>WenQuanYi Micro Hei</string> -->
<!-- <string>方正兰亭黑_GBK</string> -->
<!-- </test> -->
<!-- <edit name="globaladvance"> -->
<!-- <bool>false</bool> -->
<!-- </edit> -->
<!-- <edit name="spacing"> -->
<!-- <int>0</int> -->
<!-- </edit> -->
<!-- <test name="pixelsize" compare="less_eq"> -->
<!-- <int>12</int> -->
<!-- </test> -->
<!-- <edit name="antialias" mode="assign" > -->
<!-- <bool>false</bool> -->
<!-- </edit> -->
<!-- </match> -->

</fontconfig>
头像
wmpotato
帖子: 265
注册时间: 2009-11-06 19:48
送出感谢: 0
接收感谢: 0

Re: 求一个字体配置文件fonts.conf

#6

帖子 wmpotato » 2010-11-06 23:08

里面应该有你需要的功能的,有些地方有些莫名其妙,可能还有些错,原谅我懒,因为没影响到我。 :em06 :em06

代码: 全选

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<match>
		<test name="family">
			<string>sans-serif</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>DejaVu Sans Condensed</string>
			<string>宋体</string>
			<string>SimSun</string>
			<string>Droid Sans Fallback</string>
			<string>WenQuanYi Bitmap Song</string>
			<string>WenQuanYi Micro Hei</string>
			<string>WenQuanYi Zen Hei</string>
			<string>Liberation Sans</string>
		</edit>
	</match>
	<match>
		<test name="family">
			<string>serif</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>DejaVu Serif Condensed</string>
			<string>宋体</string>
			<string>WenQuanYi Bitmap Song</string>
			<string>WenQuanYi Zen Hei Sharp</string>
			<string>Bitstream Charter</string>
			<string>Droid Serif</string>
		</edit>
	</match>
	<match>
		<test name="family">
			<string>monospace</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>DejaVu Sans Mono</string>
			<string>WenQuanYi Zen Hei Mono</string>
			<string>WenQuanYi Micro Hei Mono</string>
			<string>WenQuanYi Zen Hei Sharp</string>
			<string>Liberation Sans Mono</string>
		</edit>
	</match>

	<match>
		<test name="family">
			<string>Courier New</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Courier New</string>
			<string>SimSun</string>
		</edit>
	</match>

	<match>
		<test name="family">
			<string>Courier 10 Pitch</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Courier 10 Pitch</string>
			<string>SimSun</string>
		</edit>
	</match>

	<match>
		<test name="family">
			<string>Century Schoolbook L</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Century Schoolbook L</string>
			<string>SimSun</string>
		</edit>
	</match>

	<match>
		<test name="family">
			<string>Century Schoolbook L</string>
		</test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Century Schoolbook L</string>
			<string>SimSun</string>
		</edit>
	</match>

	<match target = "font">
		<test compare = "eq" name = "family" qual = "any">
			<string>Tahoma</string>
			<string>Courier New</string>
			<string>Verdana</string>
		</test>
		<edit mode = "assign" name = "spacing">
			<int>0</int> 
		</edit>
		<edit mode = "assign" name = "hinting">
			<bool>true</bool>
		</edit>
		<edit mode = "assign" name = "hintstyle">
			<const>hintfull</const>
		</edit>
		<edit mode = "assign" name = "antialias">
			<bool>false</bool>
		</edit>
		<edit mode = "assign" name = "autohint">
			<bool>false</bool>
		</edit>
	</match>

	<match target = "font">
		<test compare = "eq" name = "family" qual = "any">
			<string>宋体</string>
			<string>SimSun</string>
			<string>新宋体</string>
			<string>NSimSun</string>
		</test>
		<test compare = "more_eq" name = "pixelsize">
			<double>10</double>
		</test>
		<test compare = "less_eq" name = "pixelsize">
			<double>16</double>
		</test>

		<edit mode = "assign" name = "hinting">
			<bool>true</bool>
		</edit>
		<edit mode = "assign" name = "hintstyle">
			<const>hintfull</const>
		</edit>
		<edit mode = "assign" name = "antialias">
			<bool>false</bool>
		</edit>
		<edit mode = "assign" name = "autohint">
			<bool>false</bool>
		</edit>
	</match>

	<match target = "font">
		<test compare = "eq" name = "family" qual = "any">
			<string>宋体</string>
			<string>SimSun</string>
			<string>新宋体</string>
			<string>NSimSun</string>
		</test>
		<test compare = "more_eq" name = "pixelsize">
			<double>17</double>
		</test>

		<edit mode = "assign" name = "hinting">
			<bool>true</bool>
		</edit>
		<edit mode = "assign" name = "hintstyle">
			<const>hintfull</const>
		</edit>
		<edit mode = "assign" name = "antialias">
			<bool>true</bool>
		</edit>
		<edit mode = "assign" name = "autohint">
			<bool>true</bool>
		</edit>
	</match>


	<match target = "font">
		<test compare = "eq" name = "family">
			<string>WenQuanYi Micro Hei Mono</string>
			<string>文泉驿等宽微米黑</string>
			<string>DejaVu Sans Mono</string>
			<string>DejaVu Sans</string>
			<string>DejaVu Serif</string>
			<string>monospace</string>
			<string>Monospace</string>
			<string>WenQuanYi ZenHei Mono</string>
			<string>文泉驿等宽正黑</string>
			<string>WenQuanYi Micro Hei</string>
			<string>文泉驿微米黑</string>
			<string>WenQuanYi ZenHei</string>
			<string>文泉驿正黑</string>
			<string>YaHei Consolas Hybrid</string>
			<string>微软雅黑</string>
			<string>Century Schoolbook L</string>
			<string>Droid Sans Fallback</string>
			<string>Envy Code R</string>
		</test>
		<edit name = "globaladvance"> <bool>true</bool> </edit>
		<edit name = "hinting"> <bool>true</bool> </edit>
		<edit name = "hintstyle"> <const>hintfull</const> </edit>
		<edit name = "antialias"> <bool>true</bool> </edit>
		<edit name = "autohint"> <bool>true</bool> </edit>
	</match>

	<match target = "font">
		<test compare = "eq" name = "family">
			<string>Monaco</string>
		</test>
		<edit name = "globaladvance"> <bool>true</bool> </edit>
		<edit name = "hinting"> <bool>false</bool> </edit>
		<edit name = "hintstyle"> <const>hintfull</const> </edit>
		<edit name = "antialias"> <bool>true</bool> </edit>
		<edit name = "autohint"> <bool>true</bool> </edit>
	</match>


	<match target = "font">
		<test name = "family">
			<string>Adobe 宋体 std</string>
		</test>
		<edit name = "spacing"> <int>0</int> </edit>
		<edit name = "globaladvance"> <bool>true</bool> </edit>
		<edit name = "hinting"> <bool>true</bool> </edit>
		<edit name = "hintstyle"> <const>hintfull</const> </edit>
		<edit name = "antialias"> <bool>true</bool> </edit>
		<edit name = "autohint"> <bool>false</bool> </edit>
	</match>


</fontconfig>

http://hi.baidu.com/wmpotato

Debian~Debian~Debian~~~
redlhl
帖子: 334
注册时间: 2008-06-27 20:47
送出感谢: 0
接收感谢: 0

Re: 求一个字体配置文件fonts.conf

#7

帖子 redlhl » 2010-11-07 15:22

十分感谢 :em11
头像
tenzu
论坛版主
帖子: 36913
注册时间: 2008-11-21 20:26
送出感谢: 0
接收感谢: 21 次

Re: 求一个字体配置文件fonts.conf

#8

帖子 tenzu » 2010-11-07 15:54

你们真是精溢求精啊
头像
HuntXu
论坛版主
帖子: 5778
注册时间: 2007-09-29 3:09
送出感谢: 0
接收感谢: 6 次

Re: 求一个字体配置文件fonts.conf

#9

帖子 HuntXu » 2010-11-07 16:58

HUNT Unfortunately No Talent...
回复

回到 “Arch发行版”