美文网首页
增加Linux中文字体

增加Linux中文字体

作者: 木火应 | 来源:发表于2022-05-28 12:30 被阅读0次
    • 使用rz -y命令将windows楷体(simkai.ttf)拷贝到linux
      [root@mhy ~]# cd /usr/share/fonts/
      [root@mhy fonts]# mkdir chinese
      [root@mhy fonts]# cd chinese/
      [root@mhy chinese]# rz -y
      [root@mhy chinese]# chmod -R 755 /usr/share/fonts/chinese
      
    • 配置字体,将<dir>/usr/share/fonts/chinese</dir>加入到Font list
      [root@mhy chinese] vi /etc/fonts/fonts.conf
      
      加入配置字体
    • 建立字体索引信息,更新字体缓存(切换到chinese目录,分别执行mkfontscalemkfontdirfc-cache命令)
      [root@mhy ~]# cd /usr/share/fonts/chinese
      [root@mhy chinese]# mkfontscale
      [root@bigdatahost chinese]# mkfontdir
      [root@bigdatahost chinese]# fc-cache
      
    • 执行fc-list :lang=zh,查看是否安装成功
      成功

    相关文章

      网友评论

          本文标题:增加Linux中文字体

          本文链接:https://www.haomeiwen.com/subject/liyiprtx.html