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

相关推荐
老师用之于民5 分钟前
【DAY21】Linux软件编程基础&Shell 命令、脚本及系统管理实操
linux·运维·chrome·经验分享·笔记·ubuntu
路由侠内网穿透.8 分钟前
本地部署代码托管解决方案 Gitea 并实现外部访问( Windows 版本)
运维·服务器·网络协议·gitea
serve the people22 分钟前
python环境搭建 (十三) tenacity重试库
服务器·python·php
jake don42 分钟前
GPU服务器搭建大模型指南
服务器·人工智能
江畔何人初1 小时前
pod的内部结构
linux·运维·云原生·容器·kubernetes
不做无法实现的梦~1 小时前
PX4编译环境配置和qgc配置安装教程(2)
linux·stm32
齐鲁大虾1 小时前
Linux下用什么编程语言方便开发B/S架构程序
linux·运维·架构
范纹杉想快点毕业1 小时前
状态机设计与嵌入式系统开发完整指南从面向过程到面向对象,从理论到实践的全面解析
linux·服务器·数据库·c++·算法·mongodb·mfc
三块钱07942 小时前
群晖docker部署Mattermost,对接openclaw
运维·docker·容器
博客-小覃2 小时前
内网穿透/端口映射之二层穿透访问”FTP共享文件“示例操作教程
运维·服务器·网络