1.准备包。
wkhtmltox-0.12.6-1.centos7.x86_64.rpm
百度查询下载你需要的字体。
2.开始安装。
sudo yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm
3.fc-list查看字体库
发现没有这个命令
4.安装字体库命令工具
yum -y install fontconfig
5.在/usr/shared/fonts目录下新建一个目录chinese
mkdir -p /usr/share/fonts/chinese
6.把下载好的字体,放到/usr/share/fonts/chinese下,并且赋权。
chmod -R 755 /usr/share/fonts/chinese
7、接下来需要安装ttmkfdir来搜索目录中所有的字体信息,并汇总生成fonts.scale文件,输入命令:
yum -y install ttmkfdir
8、最后一步就是修改字体配置文件了,首先通过编辑器打开配置文件:
vi /etc/fonts/fonts.conf
<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