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

相关推荐
AOwhisky18 分钟前
板块三章节3——NFS 服务器
运维·服务器·php
₯㎕星空&繁华1 小时前
接口自动化-pytest
运维·经验分享·笔记·自动化·pytest·接口
从零开始的ops生活1 小时前
【Day 18】Linux-DNS解析
linux·运维·服务器
AI克斯1 小时前
【VSCode】 使用 SFTP 插件实现多服务器同步
服务器·ide·vscode
Dontla1 小时前
Linux怎么查看时区信息?(Linux时区)(tzselect)
linux·运维·服务器
Linux运维技术栈2 小时前
解决 Nginx 反代中 proxy_ssl_name 环境变量失效问题:网页能打开但登录失败
运维·nginx·ssl
鱼骨不是鱼翅2 小时前
Linux---第三天---权限
linux·运维·服务器
Duan2baka2 小时前
我爱发明之Linux下使用Conky在桌面显示Spotify状态及封面字符画
linux
BenChuat3 小时前
Ubuntu 系统 Docker 启动失败(iptables/nf\_tables)
linux·ubuntu·docker