djlsunshine

我们知道centos是基于linux内核的这款系统默认是不带中文字体了,如果我们要使用中文字体就需要自行安装了,下面一起来看看吧。

安装过程也很简单,记录一下

安装的思路是将windows中的字体拷贝到centos中,然后执行几个命令即可。
windows xp中字体位于C:/WINDOWS/Fonts目录中,每中字体一个文件,比如simsun.ttc
centos中的字体文件位于/usr/share/fonts/,每种字体一个目录

安装过程是,首先在centos的/usr/share/fonts/目录下新建simsun目录
然后将windows中的simsun.ttc拷贝到/usr/share/fonts/simsun目录

修改字体文件的权限,使root用户以外的用户也可以使用

# chmod -R 755 /usr/share/fonts

建立字体缓存

# mkfontscale

如果提示 mkfontscale: command not found,需自行安装# yum install mkfontscale -y

# mkfontdir

# fc-cache -fv

如果提示 fc-cache: command not found,则需要安装# yum install fontconfig -y

参考博客:

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2021-06-21
  • 2022-03-04
猜你喜欢
  • 2021-06-28
  • 2021-08-04
  • 2021-07-07
  • 2021-09-26
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案