Step 1:切换至字体下载目录:

[Richard@localhost Downloads]$ ll | grep otf
-rw-rw-r--. Richard Richard 7月 RBNo2Light_a.otf
-rw-rw-r--. Richard Richard 7月 RBNo2Light.otf

Step 2:切换至root用户:

[Richard@localhost Downloads]$ su
密码:
[root@localhost Downloads]#

Step 3:新建/usr/share/fonts/default/TrueType目录

[root@localhost Downloads]# mkdir /usr/share/fonts/default/TrueType

Step 4:把字体拷贝到新建的目录下

[root@localhost Downloads]# cp RBNo2Light*.otf /usr/share/fonts/default/TrueType/

Step 5:切换至字体所在目录

[root@localhost Downloads]# cd /usr/share/fonts/default/TrueType/

Step 6:创建fonts.scale

[root@localhost TrueType]# ll
总用量
-rw-r--r--. root root 12月 : RBNo2Light_a.otf
-rw-r--r--. root root 12月 : RBNo2Light.otf
[root@localhost TrueType]# ttmkfdir
[root@localhost TrueType]# ll
总用量
-rw-r--r--. root root 12月 : fonts.scale
-rw-r--r--. root root 12月 : RBNo2Light_a.otf
-rw-r--r--. root root 12月 : RBNo2Light.otf

Step 7:创建fonts.dir

[root@localhost TrueType]# mkfontdir
[root@localhost TrueType]# ll
总用量
-rw-r--r--. root root 12月 : fonts.dir
-rw-r--r--. root root 12月 : fonts.scale
-rw-r--r--. root root 12月 : RBNo2Light_a.otf
-rw-r--r--. root root 12月 : RBNo2Light.otf

Step 8: 将字体路径添加到X Font serve 路径(或者[root@localhost Downloads]# /usr/sbin/chkfontpath --add /usr/share/fonts/default/TrueType):

[root@localhost TrueType]# chkfontpath --add /usr/share/fonts/default/TrueType

Step 9:更新字体信息cache

[root@localhost TrueType]# fc-cache

Step 10:查看字体

[Richard@localhost Downloads]$ fc-list :lang=en | grep RB
/usr/share/fonts/default/TrueType/RBNo2Light.otf: RBNo2 Light:style=Regular
/usr/share/fonts/default/TrueType/RBNo2Light_a.otf: RBNo2 Light Alternative :style=Regular

备注:如果没有chkfontpath,则安装chkfontpath(chkfontpath依赖xfs),安装方法如下:

Step 1: http://rpm.pbone.net/index.php3/stat/4/idpl/13943722/dir/centos_5/com/chkfontpath-1.10.1-1.1.x86_64.rpm.html下载chkfontpath-1.10.1-1.1.x86_64.rpm,然后安装。

Step 2:rpm安装chkfontpath(可能缺少依赖)

[Richard@localhost Downloads]$ chmod +x chkfontpath-1.10.-1.1.x86_64.rpm
[Richard@localhost Downloads]$ sudo rpm -ivh chkfontpath-1.10.-1.1.x86_64.rpm
[sudo] password for Richard:
警告:chkfontpath-1.10.-1.1.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID e8562897: NOKEY
错误:依赖检测失败:
xfs 被 chkfontpath-1.10.-1.1.x86_64 需要

Step 3:安装xfs依赖

[Richard@localhost Downloads]$ sudo yum install xfs
已加载插件:fastestmirror, langpacks, refresh-packagekit
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* fedora: mirrors..com
* rpmfusion-free-rawhide: ftp.sjtu.edu.cn
* rpmfusion-nonfree-rawhide: mirrors..com
* updates: mirrors..com
正在解决依赖关系
--> 正在检查事务
---> 软件包 xorg-x11-xfs.x86_64.1.1.1.2-.fc20 将被 安装
--> 解决依赖关系完成 依赖关系解决 ================================================================================
Package 架构 版本 源 大小
================================================================================
正在安装:
xorg-x11-xfs x86_64 :1.1.-.fc20 fedora k 事务概要
================================================================================
安装 软件包 总下载量: k
安装大小: k
Is this ok [y/d/N]: y
Downloading packages:
xorg-x11-xfs-1.1.-.fc20.x86_64.rpm | kB :
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
正在安装 : :xorg-x11-xfs-1.1.-.fc20.x86_64 /
验证中 : :xorg-x11-xfs-1.1.-.fc20.x86_64 / 已安装:
xorg-x11-xfs.x86_64 :1.1.-.fc20 完毕!

Step 4:使用RPM安装chkfontpath:

[Richard@localhost Downloads]$ sudo rpm -ivh chkfontpath-1.10.-1.1.x86_64.rpm
警告:chkfontpath-1.10.-1.1.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID e8562897: NOKEY
准备中... ################################# [%]
正在升级/安装...
:chkfontpath-1.10.-1.1 ################################# [%]
[Richard@localhost Downloads]$

参考:http://vijayk.blogspot.jp/2005/05/how-to-install-ttfotf-fonts-in-linux.html

Fedora、CentOS install TTF/otf fonts的更多相关文章

  1. fedora、centos、rhel安装Adobe Flash Player 28

    切换到root用户 添加Adobe Repository Adobe Repository 32-bit x86 rpm -ivh http://linuxdownload.adobe.com/ado ...

  2. 红帽旗下Linux的版本说明RedHat、CentOS、Fedora、OEL等

    简单总结一下RedHat.CentOS.Fedora Core区别关系: RedHat: 红帽已经被IBM 340亿刀收购了,但是红帽依旧发型自己的RedHat enterprise linux 版本 ...

  3. Fedora、SuSE、Redhat、Ubuntu、Centos

    想学Linux,但版本太多了,如Fedora.SuSE.Redhat.Ubuntu等,不免让人眼花缭乱,那么初学者该如何选择呢?也许很多人会不屑的说,Linux不就是个操作系统么.错!Linux不是一 ...

  4. 如何在Fedora或CentOS上使用Samba共享

    如今,无论在家里或者是办公场所,不同的电脑之间共享文件夹已不是什么新鲜事了.在这种趋势下,现代操作系统通过网络文件系统的方式使得电脑间数据的交换变得简单而透明.如果您工作的环境中既有微软的Window ...

  5. (实用)Ubuntu 、CentOS更换国内源

    Ubuntu更换apt-get源 通过编辑/etc/apt/sources.list文件,我们能够更换Ubuntu的默认软件更新源.通常是将其换成一些国内比较知名的源.本文主要列举这些内容. 注意,在 ...

  6. 1、CentOS 6 安装GitLab

    1.安装和配置必需的依赖项 在CentOS上将系统防火墙打开HTTP和SSH访问. sudo yum install -y curl policycoreutils-python openssh-se ...

  7. Xshell 连接centOS虚拟机、centOS内置python版本升级

    Xshell 连接虚拟机 前置条件:VMware Workstation 12.5.1.Xshell 5 .  centOS 6.6 1.打开虚拟机,输入用户名和密码: 2.输出命令:ifconfig ...

  8. 二十八、CentOS系统光盘安装、anaconda概述

    常见问题你会感觉 tftp timeout: 防火墙 time out script: 网关没有指定,在dhcpd.conf中 不能下载:vmlinuz和initrd程序和安装的系统版本不一致 内存必 ...

  9. 一、CentOS 7安装部署GitLab服务器

    一.CentOS 7安装部署GitLab服务器 1.安装依赖软件 yum -y install policycoreutils policycoreutils-python openssh-serve ...

随机推荐

  1. CURL常用命令---样例

    原文地址: http://www.thegeekstuff.com/2012/04/curl-examples/ 下载单个文件,默认将输出打印到标准输出中(STDOUT)中 curl http://w ...

  2. 微信小程序 app.json 配置

    我们使用app.json文件来对微信小程序进行全局配置,决定页面文件的路径.窗口表现.设置网络超时时间.设置多 tab 等. 以下是一个包含了所有配置选项的简单配置app.json : { " ...

  3. skynet-源码分析1:目录下的文件整理

    skynet是c和lua结合的一个开源游戏引擎,是云风所写,对我等屌丝来说,是很好的参考 先整理一下文件结构,然后再慢慢深入 主目录下有10个目录,105个文件, 具体包含的情况,我简单画了个图,明天 ...

  4. 【部分枚举】【3-21个人赛】ProblemH

    Problem H Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Sub ...

  5. c# 校验文本框的正则

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 #region ...

  6. win10系统安装 VS 2015 安装包下载

    这个VS2015安装包 我找了好久才找到  能在WIN 10系统下安装 下面分享链接地址给大家: http://www.ithome.com/html/win10/215213.htm

  7. 线程-run和start

    import java.lang.Thread; class Machine extends Thread{ public void run() { int a ; for( a = 0 ; a &l ...

  8. cocos2d-x box2d使用调试绘图

    cocos2d-x box2d使用调试绘图 复制TestCpp的GLES-Render.h和GLES-Render.cpp过来. 添加一个成员变量: GLESDebugDraw *m_debugDra ...

  9. JavaScript学习笔记(二)原型

    JavaScript不包含传统的类继承模型,而是使用prototype原型模型.JavaScript使用原型链的继承方式. function Foo() { this.value = 42; } Fo ...

  10. Git 操作常用命令

    Git使用 1. git pull    更新服务器代码到本地a). git pull origin master是将origin这个版本库的代码更新到本地的master主分支 2. git push ...