centos6和centos7无网络环境下安装fontconfig,配置中文字体

以centos6为例

1、查看系统版本

cat /etc/redhat-release

2、访问https://vault.centos.org下载相关rpm包

找到对应系统版本

3、下载相应的rpm包上传到服务器

dejavu-fonts-common-2.33-1.el6.noarch.rpm

dejavu-sans-fonts-2.33-1.el6.noarch.rpm

fontconfig-2.8.0-5.el6.x86_64.rpm

fontpackages-filesystem-1.41-1.1.el6.noarch.rpm

freetype-2.3.11-17.el6.x86_64.rpm

4、进入rpm包文件夹

rpm -Uvh --force --nodeps *.rpm

5、查看linux已安装中文字体

fc-list :lang=zh

6、上传字体

mkdir -p /usr/share/fonts/my_fonts

将要安装的字体上传到该文件夹下

进入C:\Windows\Fonts,该文件夹下就存放相关字体

7、添加字体文件

vim /etc/fonts/fonts.conf

<!-- Font directory list -->

<dir>/usr/share/fonts</dir>

<dir>/usr/share/fonts/my_fonts</dir>

<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>

<dir prefix="xdg">fonts</dir>

<!-- the following element will be removed in the future →

8、刷新内存中的字体缓存

fc-cache

5、查看字体列表fc-list

fc-list :lang=zh

相关推荐
江屿风18 分钟前
【Linux系统】【从菜鸟驿站到操作系统:一节课打通Linux重定向与缓冲区真相】流食般投喂
linux·运维·服务器·开发语言·笔记
今天要早睡_27 分钟前
Linux 基础指令速查:从 ls 到 tar 的常用命令全解析
linux·运维·chrome
吴声子夜歌32 分钟前
Docker入门与实战——核心概念与安装配置
运维·docker·容器
高山有多高37 分钟前
【Linux笔记】UDP协议
linux
Felven11 小时前
stress-ng 与 fio 性能测试工具使用指南
linux·测试工具·fio·stress-ng
XiaoMaqqqq11 小时前
市面上正规的IP驱动产业新场景新工具哪家强
运维·python·网络协议·tcp/ip
huainingning12 小时前
RJ SW Console口忘记密码处理方法
linux·运维·服务器
布裘12 小时前
【银河麒麟】桌面系统循环登录,无法进入桌面?
linux·运维·服务器
慧都小项12 小时前
程序到了Linux才出错?用CLion把调试接到目标环境
linux·运维·服务器
Lsetea13 小时前
OpenSSL verify报unhandled critical extension:error 34与关键扩展排查
运维·https·ssl证书·openssl·证书链