admin管理员组文章数量:1594755
1、fc -list查看字体库
发现没有安装
2、yum -y install fontconfig安装
3、安装好后/usr/share目录下多两个目录fonts和fontconfig
4、首先在/usr/shared/fonts目录下新建一个目录chinese
5、到C:\Windows\Fonts目录下上传你需要的字体到/usr/shared/fonts/chinese目录下
本处需要上传的是simsun.ttf (宋体)、simheittf.ttf (黑体)
附下载链接:
https://download.csdn/download/weixin_41846320/10862472
6、修改chinese权限
chmod -R 755 /usr/share/fonts/chinese
7、接下来需要安装ttmkfdir来搜索目录中所有的字体信息,并汇总生成fonts.scale文件,输入命令:
yum -y install ttmkfdir
8、最后一步就是修改字体配置文件了,首先通过编辑器打开配置文件:
vi /etc/fonts/fonts.conf
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<dir>/usr/share/fonts/chinese</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
9、fc-cache 刷新
10、fc-list 可以看到刚刚已安装的字体了
版权声明:本文标题:Linux CentOS 7 安装 字体库文件(simsun.ttf、simheittf.ttf) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1728203066a1149636.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论