centos 中文字体解决方案
2016-04-18 13:53
579 查看
在linux下添加支持中文字体,中文字体的获取可以从windows平台的字体库中找到,windows下的C:\windows\fonts下面有你想要的字体,比如simsun.ttc<简体中文>等字体。
centos下的字体库存放位置:/usr/share/fonts
具体操作步骤:
================================
1. 在/usr/share/fonts/chinese文件夹下创建一个文件夹(windows)
[root@localhost ~]# mkdir /usr/share/fonts/chinese/windows
2. 把从windows中找出的字体复制到windows文件夹中,再为windows文件夹更改权限
[root@localhost ~]# chmod -R 755 /usr/share/fonts/chinese/windows
3. 在字体目录中执行ttmkfdir命令
[root@localhost windows]# ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
4. 更改fonts.conf文件
[root@localhost ~]#vi /etc/fonts/fonts.conf
然后添加如下一行;
/usr/share/fonts/chinese/windows
添加位置如下:
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
#新加内容
<dir>/usr/share/fonts/chinese/windows</dir>
5. 重启xfs服务器
[root@localhost ~]# service xfs restart
6. 查看字体有没有添加成功
[root@localhost ~]# fc-list :lang=zh-cn
Microsoft YaHei UI Light:style=Regular
Microsoft YaHei,微软雅黑:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
STXihei,华文细黑:style=Regular
LiSu,隶书:style=Regular
SimSun,宋体:style=Regular,常规
STKaiti,华文楷体:style=Regular
至此,在linux添加支持中文字体成功
centos下的字体库存放位置:/usr/share/fonts
具体操作步骤:
================================
1. 在/usr/share/fonts/chinese文件夹下创建一个文件夹(windows)
[root@localhost ~]# mkdir /usr/share/fonts/chinese/windows
2. 把从windows中找出的字体复制到windows文件夹中,再为windows文件夹更改权限
[root@localhost ~]# chmod -R 755 /usr/share/fonts/chinese/windows
3. 在字体目录中执行ttmkfdir命令
[root@localhost windows]# ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
4. 更改fonts.conf文件
[root@localhost ~]#vi /etc/fonts/fonts.conf
然后添加如下一行;
/usr/share/fonts/chinese/windows
添加位置如下:
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
#新加内容
<dir>/usr/share/fonts/chinese/windows</dir>
5. 重启xfs服务器
[root@localhost ~]# service xfs restart
6. 查看字体有没有添加成功
[root@localhost ~]# fc-list :lang=zh-cn
Microsoft YaHei UI Light:style=Regular
Microsoft YaHei,微软雅黑:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
STXihei,华文细黑:style=Regular
LiSu,隶书:style=Regular
SimSun,宋体:style=Regular,常规
STKaiti,华文楷体:style=Regular
至此,在linux添加支持中文字体成功
相关文章推荐
- RStudio Linux Server 版本 安装配置 说明
- linux 内存管理逻辑地址,物理地址以及虚拟地址
- linux等待队列wait_queue_head_t和wait_queue_t
- centos7yum安装mesos(0.28)+marathon+zookeeper
- 加锁
- linux下(ubuntu),段错误产生的原因Segmentation Fault
- linux :故障提示:Error:No suitable device found: no device found for connection "System eth0"
- 如何在linux下共享文件夹
- Datastage9.1 Linux环境安装配置文档
- 盘点linux系统中的12条性能调优命令
- linux的内存管理机制、内存监控、buffer/cache异同
- linux的top下buffer与cache的区别、free命令内存解释
- 记录Linux启动流程的工具bootchart
- linux常用命令-搜索
- linux 防火墙iptables简明教程
- linux 常用设置
- linux ssh上传和下载
- CentOS6下ssh无法连接
- Centos 7 mysql 5.5 启用innodb引擎
- Linux chkconfig 命令