centos7安装中文宋体
1.操作系统环境
[[email protected] ~]# cat /etc/issue\SKernel \r on an \m
2.安装字体管理工具,命令如下
[[email protected] TrueType]# yum install fontconfig mkfontscale
3.把Windows下字体放在服务器相应目录,示例如下
注:Windows字体目录C:\Windows\Fonts
mkdir -pv /usr/share/fonts/chinese/TrueType
注:创建字体目录,并把相应字体上传到此目录即可
4.建立字体缓存
[[email protected] ~]# cd /usr/share/fonts/chinese/TrueType [[email protected] TrueType]# mkfontscale [[email protected] TrueType]# mkfontdir [[email protected] TrueType]# fc-cache -fv
5.查看字体
[[email protected] TrueType]# fc-list |grep SimSun /usr/share/fonts/chinese/TrueType/simsun.ttc: SimSun,宋体:style=Regular,常规 /usr/share/fonts/chinese/TrueType/simsun.ttc: NSimSun,新宋体:style=Regular,常规
reboot重启即可使用
时间: 2024-11-09 09:25:38