年金Report服务器打印报表提要字体支持,请帮忙安装下字体,字体已上传至服务器 ,路径:/home/app/chinese。
解决方案
一、上传字体
将需要安装的字体上传到服务器上,本次变更已经有同事上传到了服务器,因此跳过此步骤。
二、创建字体目录
将已上传的字体文件夹移动到/usr/share/fonts/目录下。若是单个字体文件,建议在fonts目录下创建文件夹。
[root@shizhanxia.com ~]# mv /home/app/chinese/ /usr/share/fonts/
三、安装字体
刷新系统字体库:(依次执行下列命令)
[root@shizhanxia.com ~]# mkfontscale [root@shizhanxia.com ~]# mkfontdir [root@shizhanxia.com ~]# fc-cache -fv /usr/share/fonts: caching, new cache contents: 0 fonts, 5 dirs /usr/share/fonts/chinese: caching, new cache contents: 5 fonts, 0 dirs /usr/share/fonts/cjkuni-ukai: caching, new cache contents: 4 fonts, 0 dirs /usr/share/fonts/cjkuni-uming: caching, new cache contents: 4 fonts, 0 dirs /usr/share/fonts/google-noto: caching, new cache contents: 28 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: caching, new cache contents: 36 fonts, 0 dirs /usr/share/X11/fonts/Type1: caching, new cache contents: 13 fonts, 0 dirs /usr/share/X11/fonts/TTF: skipping, no such directory /usr/local/share/fonts: skipping, no such directory /root/.local/share/fonts: skipping, no such directory /root/.fonts: skipping, no such directory /usr/share/fonts: caching, new cache contents: 0 fonts, 5 dirs /usr/share/X11/fonts/Type1: caching, new cache contents: 13 fonts, 0 dirs /usr/share/X11/fonts/TTF: skipping, no such directory /usr/local/share/fonts: skipping, no such directory /root/.local/share/fonts: skipping, no such directory /root/.fonts: skipping, no such directory /var/cache/fontconfig: cleaning cache directory /root/.cache/fontconfig: not cleaning non-existent cache directory /root/.fontconfig: not cleaning non-existent cache directory fc-cache: succeeded
四、扩展阅读
如果上述命令不存在,请执行如下命令安装:
[root@shizhanxia.com ~]# yum install mkfontscale [root@shizhanxia.com ~]# yum install mkfontdir [root@shizhanxia.com ~]# yum install fontconfig
原创文章,作者:保哥,如若转载,请注明出处:https://www.shizhanxia.com/1830.html