Linux系列之安装中文字体
Linux系统安装中文字体
拷贝字体文件至Linux
从windows电脑的C:\Windows\fonts复制字体文件上传至Linux服务器新建的目录下
复制ttc、ttf文件至Linux服务器字体库/usr/share/Fonts
在/usr/share/Fonts新建一个文件夹
[root@localhost fonts]# mkdir chinese
[root@localhost windows]# cp *.ttc /usr/share/Fonts/chinese
[root@localhost windows]# cp *.ttf /usr/share/Fonts/chinese
更改这些字体库的权限
[root@localhost fonts]# chmod 755 /usr/share/fonts/chinese/*
然后进入linux字体库
[root@localhost fonts]# cd /usr/share/fonts/chinese/
根据当前目录下的字体建立scale文件
[root@localhost chinese]# mkfontscale
建立dir文件
[root@localhost chinese]# mkfontdir
然后运行
[root@localhost chinese]# fc-cache