请教:误删除 /etc/fonts/fonts.conf 怎么办?

系统字体配置、中文显示和输入法问题
回复
xiejs
帖子: 2
注册时间: 2007-05-28 18:26

请教:误删除 /etc/fonts/fonts.conf 怎么办?

#1

帖子 xiejs » 2007-05-31 2:33

弄了一晚上都没解决
我试过如下2种下操作,都不能解决问题:
1、sudo cp ~/fonts.conf /etc/fonts(提示~/fonts.conf 找不到)

2、sudo apt-get install --reinstall fontconfig提示如下:

xiejs@xiejs-desktop:/etc/fonts$ sudo apt-get install --reinstall fontconfig
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
The following packages were automatically installed and are no longer required:
libxvidcore4 libmp4v2-0 libggi2 libgii1 libgii1-target-x libmpcdec3 liblame0
libfaac0
使用 'apt-get autoremove' 来删除它们。
共升级了 0 个软件包,新安装了 0 个软件包,共重新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 0B/136kB 的软件包。
解压缩后会消耗掉 0B 的额外空间。
您希望继续执行吗?[Y/n]y
(正在读取数据库 ... 系统当前总共安装有 120141 个文件和目录。)
正预备替换 fontconfig 2.4.2-1ubuntu1 (使用 .../fontconfig_2.4.2-1ubuntu1_i386.deb) ...
Cleaning up font configuration of fontconfig...
Cleaning up category cid..
Cleaning up category truetype..
Cleaning up category type1..
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
正在解压缩将用于更替的包文件 fontconfig ...
正在设置 fontconfig (2.4.2-1ubuntu1) ...
Updating font configuration of fontconfig...
Cleaning up category cid..
Cleaning up category truetype..
Cleaning up category type1..
Updating category type1..
Updating category truetype..
Updating category cid..
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
Regenerating fonts cache... done.

希望高手指点
头像
jupengfei
帖子: 1258
注册时间: 2006-10-31 11:02
来自: Beijing

#2

帖子 jupengfei » 2007-05-31 3:23

1 查看~下有没有.fonts.conf文件,一般是没有的

2重新安装下几个字体,应该会重新写fonts.conf的
图片
我也喜欢蓝妹妹......
xiejs
帖子: 2
注册时间: 2007-05-28 18:26

#3

帖子 xiejs » 2007-05-31 12:48

有没有什么命令从新生成fonts.conf
hjjdebug
帖子: 94
注册时间: 2009-04-21 9:48

Re: 请教:误删除 /etc/fonts/fonts.conf 怎么办?

#4

帖子 hjjdebug » 2020-08-25 10:57

fonts.conf 属于 fontconfig-config 包, 只要重安装该包即可:
sudo apt-get install fontconfig-config
回复