如何在CentOS/Red Hat Linux下添加/安装Ubuntu字体

时间:2019-08-20 17:58:12  来源:igfitidea点击:
  1. http://font.ubuntu.com/中下载 Ubuntu字体
cd /root
yum install wget       (you can skip this step if wget is already installed)
wget font.ubuntu.com/download/ubuntu-font-family-0.80.zip
  1. 检查目录 /usr/share/fonts是否存在。如果目录不存在,则创建1个。
mkdir -p /usr/share/fonts
  1. 解压下载的Ubuntu字体文件
cd /root
yum install unzip  (You can skip this step,if unzip is already installed)
unzip ubuntu-font-family-0.80.zip
  1. ubuntu-font-family-0.80目录复制到 /usr/share/fonts/
cp -rvf ubuntu-font-family-0.80 /usr/share/fonts/

目录中有很多.ttf文件。这些都是字体文件。

  1. 运行“fc cache”命令。fc cache命令在中构建信息缓存目录。如果字体安装成功,则不会出现任何错误。
fc-cache -fv