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

相关推荐
江湖有缘17 小时前
Jump个人仪表盘Docker化部署教程:从0到 搭建专属导航页
运维·docker·容器
小猪佩奇TONY17 小时前
Linux 内核学习(14) --- linux x86-32 虚拟地址空间
linux·学习
Lam㊣17 小时前
Centos 7 系统docker:更换镜像源
linux·docker·centos
FL162386312917 小时前
win11+WSL+Ubuntu-xrdp+远程桌面闪退+黑屏闪退解决
linux·运维·ubuntu
石头53017 小时前
Kubernetes监控全栈解决方案:从零搭建Prometheus+Grafana监控体系
linux
ha204289419417 小时前
Linux操作系统学习记录之---TcpSocket
linux·网络·c++·学习
AOwhisky18 小时前
Linux逻辑卷管理:从“固定隔间”到“弹性存储池”的智慧
linux·运维·服务器
翼龙云_cloud18 小时前
阿里云渠道商:如何使用弹性伸缩来实现计算资源的弹性配置?
服务器·阿里云·云计算
05大叔19 小时前
大事件Day02
运维·服务器
五仁火烧19 小时前
Vue3 项目的默认端口行为
服务器·vue.js·nginx·容器·vue