CentOS安装中文字体
免费中文字体:https://github.com/zenozeng/Free-Chinese-Fonts
安装思源黑体
思源黑体 Github repo:https://github.com/adobe-fonts/source-han-sans/blob/master/README-CN.md
首先切换到CentOS中存放字体的文件目录 cd /usr/share/fonts/
下载压缩包:wget https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansSC.zip
解压:unzip SourceHanSansSC.zip
重命名:mv OTF/ SourceHanSans/
切换到思源黑体的解压后目录里面 cd SourceHanSans
执行如下命令:
mkfontscale
mkfontdir
fc-cache -fv
验证:执行如下命令 fc-list :lang=zh
, 控制台会输出如下:
[root@VM-centos ~]# fc-list :lang=zh
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Heavy.otf: Source Han Sans SC,Source Han Sans SC Heavy:style=Heavy,Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Medium.otf: Source Han Sans SC,Source Han Sans SC Medium:style=Medium,Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Regular.otf: Source Han Sans SC:style=Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Normal.otf: Source Han Sans SC,Source Han Sans SC Normal:style=Normal,Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Light.otf: Source Han Sans SC,Source Han Sans SC Light:style=Light,Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-ExtraLight.otf: Source Han Sans SC,Source Han Sans SC ExtraLight:style=ExtraLight,Regular
/usr/share/fonts/SourceHanSans/SimplifiedChinese/SourceHanSansSC-Bold.otf: Source Han Sans SC:style=Bold
安装文泉驿黑体
文泉驿黑体官方网址:http://wenq.org/wqy2/index.cgi?ZenHei
CentOS 官方软件仓库有资源
输入如下命令:yum search wqy
输出如下:
[root@VM-centos ~]# yum search wqy
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
================================== N/S matched: wqy ==================================
wqy-microhei-fonts.noarch : Compact Chinese fonts derived from Droid
wqy-unibit-fonts.noarch : WenQuanYi Unibit Bitmap Font
wqy-zenhei-fonts.noarch : WenQuanYi Zen Hei CJK Font
wqy-microhei-fonts 指代文泉驿微米黑
wqy-zenhei-fonts 指代文泉驿正黑体
安装指令 yum -y install wqy-zenhei-fonts
使用 fc-list :lang=zh | grep wqy
验证结果如下
[root@VM-centos ~]# fc-list :lang=zh | grep wqy
/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc: WenQuanYi Zen Hei:style=Regular
/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc: WenQuanYi Zen Hei Sharp,文泉驛點陣正黑:style=Regular
/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc: WenQuanYi Zen Hei Mono:style=Regular
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
2016-08-12 JS中常用到的数组工具方法
2016-08-12 使用Git遇到的问题及解决方案
2016-08-12 使用Git遇到的问题及解决方案(初级)