Linux/centos中文字体解决方案
来源:互联网 发布:用友u8软件免费下载 编辑:程序博客网 时间:2024/05/17 00:58
在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文件
4. 更改fonts.conf文件
[root@localhost ~]#vi /etc/fonts/fonts.conf
然后添加如下一行;
/usr/share/fonts/chinese/windows
/usr/share/fonts/chinese/windows
添加位置如下:
/usr/share/fonts/chinese/windows #新加内容
/usr/share/fonts
5. 执行:fc-cache -fv
6. 查看字体有没有添加成功
[root@localhost ~]# fc-list :lang=zh-cn
新宋体,NSimSun:style=Regular
宋体,SimSun:style=Regular #字体添加成功
文鼎PL中楷Uni,AR PL ZenKai Uni:style=Medium
文鼎PL细上海宋Uni,AR PL ShanHeiSun Uni,文鼎PL細上海宋Uni:style=Regular
新宋体,NSimSun:style=Regular
宋体,SimSun:style=Regular #字体添加成功
文鼎PL中楷Uni,AR PL ZenKai Uni:style=Medium
文鼎PL细上海宋Uni,AR PL ShanHeiSun Uni,文鼎PL細上海宋Uni:style=Regular
至此,在linux添加支持中文字体成功
0 0
- Linux/centos中文字体解决方案
- Linux/centos 5.x 中文字体解决方案
- Linux/centos 5.x 中文字体解决方案
- centos 中文字体解决方案
- Linux 中文字体终极解决方案之一
- linux随笔 CentOS中文字体的问题
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- Linux CentOS 7 安装字体库 & 中文字体
- jdk1.5linux中的中文字体解决方案
- linux 中文字体
- linux中文字体
- Linux中文字体
- 15 个必须知道的 Java 面试问题
- Selenium-窗口跳转
- msvcr100.dll 没有指定在windows上运行
- 欢迎使用CSDN-markdown编辑器
- powerdesigner逆向工程生成PDM时的列注释(ColumnComment)解决方案
- Linux/centos中文字体解决方案
- Java - Mac上创建数据库表如何创建到指定的数据库中,此处有坑,已填
- springMVC源码分析--ControllerBeanNameHandlerMapping(八)
- 试位法求解非线性方程的根
- Qt:QML:JavaScript 和QML 语法错误表
- HTTP Get,Post请求详解
- Sublime Text 3 + Markdown 配置步骤
- HDOJ2089 不要62(数位DP)
- 《明解C语言》示例代码和练习代码[第9章]