fc-list命令报错
Tofloor
poster avatar
wbsheng
deepin
2016-10-20 01:43
Author
本帖最后由 wbsheng 于 2016-10-19 17:43 编辑

为了查看系统字体执行 fc-list 命令。然而出现如下错误:
  1. Fontconfig error: "/home/xxx/.config/fontconfig/conf.d/99-deepin.conf", line 1: Unsupported version '2.0'
Copy the Code
似乎是因为 99-deepin.conf采用xml2格式,而系统的fontconfig不支持。因为看了下 /etc/fonts/conf.d/下面的的字体配置文件都是 xml1 的,只有这个是xml2,所以导致报错。

Reply Favorite View the author
All Replies
avatar
jingle
deepin
2016-10-20 16:12
#1
我反馈上去看看,我这边正常的。
jingle@jingle:~$ fc-list
/usr/share/fonts/truetype/droid/DroidSansHebrew-Regular.ttf: Droid Sans Hebrew:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
Reply View the author
avatar
wbsheng
deepin
2016-10-20 17:26
#2
https://bbs.deepin.org/post/44705
我反馈上去看看,我这边正常的。
jingle@jingle:~$ fc-list
/usr/share/fonts/truetype/droid/DroidSansHeb ...

手动把 ~/.config/fontconfig/conf.d/99-deepin.conf 的第一行
Copy the Code

改成了
Copy the Code

fc-list 可以工作了。不懂xml语法,不知道有没有副作用。。。
Reply View the author
avatar
wbsheng
deepin
2016-12-15 00:01
#3
https://bbs.deepin.org/post/44705
我反馈上去看看,我这边正常的。
jingle@jingle:~$ fc-list
/usr/share/fonts/truetype/droid/DroidSansHeb ...

偶然发现原因是因为我装了python anaconda 套装并且加入了环境变量。这样 fc-list 实际是 anaconda 套装中的命令 ~/anaconda3/bin/fc-list。使用系统中的 /usr/bin/fc-list 对于 xml2 没有问题。
Reply View the author