centos 5

linux 下添加windons的中文字体  

添加宋体:

从windos 的C:/windows/fonts下选择想要的字体拷贝到/usr/share/fonts/chinese/windows/

首先新建文件夹

mkdir -p /usr/share/fonts/chinese/windows/

chmod -R 755 /usr/share/fonts/chinese/windows

修改配置文件/etc/fonts/fonts.conf,添加如下代码:

<dir>/usr/share/fonts/chinese/windows</dir>

service xfs restart 重启xfs服务

fc-cache fv 刷新字体缓存

fc-list :lang=zh-cn 列出支持的中文字体,有如下输出说明字体安装成功

新宋体,NSimSun:style=Regular

宋体,SimSun:style=Regular


centos 6 添加后验证

fc-cache -f

fc-list :lang=zh-cn 输出如下说明成功:


新宋体,NSimSun:style=Regular

AR PL UMing CN:style=Light

宋体,SimSun:style=Regular

AR PL UKai TW MBE:style=Book

AR PL UKai CN:style=Book

AR PL UKai HK:style=Book

AR PL UKai TW:style=Book

文泉驿正黑,文泉驛正黑,WenQuanYi Zen Hei:style=Regular

微软雅黑,Microsoft YaHei:style=Negreta

新宋体,NSimSun:style=Regular

AR PL UMing CN:style=Light

宋体,SimSun:style=Regular

AR PL UKai TW MBE:style=Book

AR PL UKai CN:style=Book

AR PL UKai HK:style=Book