分页: 1 / 1

终端中代码是什么意识望解答

发表于 : 2009-03-28 3:38
大度灯
phoenix@phoenix-desktop:~$ /usr/lib/Adobe/Reader8/bin/acroread
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 1: not well-formed (invalid token)
Fontconfig error: "language-selector.conf", line 1: syntax error
Fontconfig error: "/etc/fonts/conf.d/49-sansserif.conf", line 1: not well-formed (invalid token)
Fontconfig error: "language-selector.conf", line 1: syntax error

phoenix@phoenix-desktop:~$


可能是我自己配置字体的时候搞错了什么了,还望大虾解读一下,指点小弟迷津,呵呵 :em01

Re: 终端中代码是什么意识望解答

发表于 : 2009-03-28 4:35
runpin
49-sansserif.conf、language-selector.conf 都是 XML 文件。

所有的 XML 文件都必须是格式化良好的(well-formed),也就是说参数必须小写、参数必须在引号中、标签必须被关闭,比如有一个 <family>,那么必须有一个 </family> 关闭它。还有 XML 文件必须声明。

你代码出现的错误说第一行有问题,是无效的标签(invalid token),估计是声明的问题,看看有没有 <?xml version="1.0"?> 这一句或者类似的,并且这一句前不能有任何内容,包括空格都不能有!

Re: 终端中代码是什么意识望解答

发表于 : 2009-03-28 5:18
大度灯

<fontconfig>

<!--

If the font still has no generic name, add sans-serif

-->

<match target="pattern">

<test qual="all" name="family" compare="not_eq">
<string>sans-serif</string>
</test>

<test qual="all" name="family" compare="not_eq">
<string>serif</string>
</test>

<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>

<edit name="family" mode="append_last">
<string>WenQuanYi Zen Hei</string>
</edit>
</match>
</fontconfig>


我的49-sansserif.conf如上。不知道如何修改才可以哦

Re: 终端中代码是什么意识望解答

发表于 : 2009-03-28 5:46
runpin

代码: 全选

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
加到最顶上试试

还有,空行间那些减号是什么东东?

Re: 终端中代码是什么意识望解答

发表于 : 2009-03-28 10:29
大度灯
谢谢runpin的解答,
添上并去掉-后,就不再出现上述提示了。 :em11

Re: 终端中代码是什么意识望解答

发表于 : 2009-03-28 11:36
njuptsoz
就是中间那一-的问题 :em04