首页 > 系统相关 >centos7下安装中文字体

centos7下安装中文字体

时间:2024-05-28 10:00:32浏览次数:27  
标签:style Sans fonts share centos7 中文字体 DejaVu usr 安装

1.安装fontconfig
yum -y install fontconfig

 

2.创建chinesem目录
/usr/shared/fonts目录下新建一个目录chinese
#cd /usr/share/fonts
#mkdir chinese

 

3.上传如下两个文件到目录/usr/share/fonts/chinese
simhei.ttf
simsun.ttc
宋体和黑体

这两个文件在windows下的C:\Windows\fonts下可以找到

cp /tmp/simhei.ttf /usr/share/fonts/chinese/
cp /tmp/simsun.ttc /usr/share/fonts/chinese/

 

4.修改权限
#chmod -R 755 /usr/share/fonts/chinese

 

5.安装ttmkfdir
yum -y install ttmkfdir

 

6.执行如下命令
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir

 

7.修改/etc/fonts/fonts.conf文件
vi /etc/fonts/fonts.conf

<!-- Font directory list -->

        <dir>/usr/share/fonts</dir>
        <dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
        <dir>/usr/share/fonts/chinese</dir>
        <dir prefix="xdg">fonts</dir>
        <!-- the following element will be removed in the future -->
        <dir>~/.fonts</dir>

 

8.执行如下命令
#fc-cache

 

9.查看

[root@hxl-hangzhou-db-backup001 fonts]# 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/chinese/simsun.ttc: SimSun,宋体:style=Regular,常规
/usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/chinese/simsun.ttc: NSimSun,新宋体:style=Regular,常规
/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/chinese/simhei.ttf: SimHei:style=Normal
/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

 

标签:style,Sans,fonts,share,centos7,中文字体,DejaVu,usr,安装
From: https://www.cnblogs.com/hxlasky/p/18217226

相关文章

  • mac aab转apk安装到真机
    工具准备:mac安卓手机 一:安装brew准备下载google的aab转apk插件/bin/zsh-c"$(curl-fsSLhttps://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"直接选1选择完成之后会选择国内源,中科大,阿里巴巴,清华都想应该是有个推荐字样的(我随便选的) 二:安装java11本来......
  • docker 安装 rocketmq 5.2.0
    sudomkdir-p/opt/rocketmq/conf/brokersudomkdir-p/opt/rocketmq/conf/namesrvsudomkdir-p/opt/rocketmq/data/broker###nameservice.conflistenPort:9876storePathRootDir:/opt/rocketmq-5.2.0/store###broker.conf#集群名称brokerClusterName=Default......
  • 数据库初始,SQL语句介绍,MySQL数据库安装,SQL语句基础,操作MySQL数据库
    Ⅰ数据库初识【一】存储数据的演变过程【1】文件基于内存保存在早期,随意地存放到一个文件中、数据格式也是千差万别的,完全取决于个人员工管理系统是基于列表或字典(内存)存储数据【2】文件操作用本地的文本文件存储数据有的人喜欢存储到本地的一个文件中有的人喜欢存......
  • 1:安装homebrew
    方式1:apk包安装步骤1:进入github地址https://github.com/Homebrew/brew/releases/tag/4.3.2直接下载pkg包,之后安装步骤二:brew命令出现下面命令安装成功 brewdoctor......
  • mysql 8.0.18的docker安装
    1.拉取镜像sudodockerpullmysql:8.0.182.运行dockersudodockerrun-p3306:3306--namemysql--restart=always--privileged=true\-v/home/cy/soft/mysql/conf/mysql/log:/var/log/mysql\-v/home/cy/soft/mysql/data:/var/lib/mysql\-v/home/cy/soft/mysql/conf/......
  • Inno Setup Dependency Installer 安装包 运行环境安装
    Downloadandinstallanydependencysuchas.NET,VisualC++orSQLServerduringyourapplication'sinstallation!Inthisarticle,youwillseeinstallation,usage,integration,details,anddependenciesofInnoSetupDependencyInstaller.Downlo......
  • centos7.9简单的jar包的部署脚本
    #!/bin/bash#应用程序的名字APP_NAME="wecom"BASE_PATH="/home/cy/soft/wecom/"#JAR文件的新版本路径JAR_PATH="${BASE_PATH}${APP_NAME}.jar"#PID文件的路径PID_PATH="${BASE_PATH}${APP_NAME}.pid"#上传jar文件的位置JAR_BAK_PATH="......
  • Kubernetes(k8s) v1.30.1 本地集群部署 安装metallb 支持LoadBalancer 生产环境 推荐
    1 metallb安装参考:Kubernetes(k8s)v1.30.1本地集群部署默认不支持LoadBalancermetallb来解决-CSDN博客2 删除Layer2模式配置kubectldelete-fIPAddressPool.yamlkubectldelete-fL2Advertisement.yamlkubectldelete-fdiscuz-srv.yaml3配置k8sMeta......
  • ubuntu安装mysql
    ubuntu安装mysql更新软件包列表sudoaptupdate安装mysql服务器sudoaptinstallmsyql-server启动并检查mysql服务sudosystemctlstartmysqlsudosystemctlstatusmysql无密码登录mysqlsudomysql-uroot给root创建密码如果是mysql5.0版本,使用alteruser'root'......
  • redis的6.2.14的docker安装
    1.拉取镜像dockerpullredis:6.2.142.运行镜像sudodockerrun--nameredis-d-p6379:6379\-v/home/cy/soft/redis/data:/data\-v/home/cy/soft/redis/conf/redis-docker.conf:/usr/local/etc/redis/redis.conf\--privileged=true\redis:6.2.14redis-server/usr/lo......