linux 离线安装中文字库,centos7 离线安装字体fontconfig
起因:最近做了個flowable然而linux下亂碼,發現需要安裝字體包
在線:直接?yum -y install fontconfig;yum -y install ttmkfdir;配置下即可。
拓展:離線所需rpm包如何獲取?
百度不好找,找個可上網的服務器?yum?install?yum-utils? 然后?yumdownloader??即可。這個很好用想要其他rpm包同理。
離線:
rpm -ivh fontconfig-2.13.0-4.3.el7.x86_64.rpm ?--nodeps --force
C:\Windows\Fonts 下找自己需要字體
cd /usr/share/fontconfig/
mkdir myfonts
上傳字體文件到myfonts
賦權 chmod -R 755 /usr/share/fontconfig/myfonts/
rpm -ivh ttmkfdir-3.0.9-42.el7.x86_64.rpm ? --nodeps --force
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vi /etc/fonts/fonts.conf
添加
然后輸入:wq保存退出,
刷新內存中的字體緩存fc-cache
查看是否成功fc-list
結果:
/usr/share/fontconfig/myfonts/simsun.ttc: NSimSun,新宋體:style=Regular,常規
/usr/share/fontconfig/myfonts/simsun.ttc: SimSun,宋體:style=Regular,常規
相關安裝包可直接下載
總結
以上是生活随笔為你收集整理的linux 离线安装中文字库,centos7 离线安装字体fontconfig的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux读取SSD的smart信息,使
- 下一篇: linux防火墙配置说明,Linux防火