zoukankan      html  css  js  c++  java
  • Linux

    如何在CentOS7上安装中文字体

    # 安装软件
    yum -y install fontconfig
    
    # 我们查看当前系统中已经有的字体
    [root@loanapp opt]# fc-list
    /usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
    /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
    /usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
    /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
    /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
    /usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf: DejaVu Sans,DejaVu Sans Light:style=ExtraLight
    /usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
    /usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
    /usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold Oblique
    
    # 然后切换到这个字体存放目录
    cd /usr/share/fonts
    
    # 创建一个我们自定义的目录进去
    mkdir Song
    
    # 然后把我们准备好的字体文件上传到这个目录中
    STSONG.TTF & simsun.ttc
    
    # 最后,我们刷新字体
    fc-cache -fv

    注意:有些时候需要重启应用或者服务器才能生效。

  • 相关阅读:
    下载字体的正确姿势
    字体基础知识与实际运用
    CSP复习与模板
    地理必修三知识点
    LaTeX公式手册(全网最全)
    动态规划求解0/1背包问题
    JavaScript对象简介(一)
    DOM文档对象模型简介
    SQLServer 的case when语句使用实现统计
    批量初始化数组和memset函数
  • 原文地址:https://www.cnblogs.com/duchaoqun/p/12667091.html
Copyright © 2011-2022 走看看