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
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值