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. 关于Makefile.am中与Build相关的变量设置 AM_CPPFLAGS

    http://tonybai.com/2010/10/26/about-variables-related-to-building-in-makefile-am/ 关于Makefile.am中与Bui ...

  2. c++冒泡排序的模板函数设计

    说明 由于课程设计需要,特编写本程序.本程序首先定义了一个冒泡程序的模板函数,然后在main()函数中定义了两个不同类型的数组,调用模板函数对其进行排序.(注意,本程序是在linux下编写,但是直接拷 ...

  3. 前端学习——JQuery Ajax使用经验

    0.前言     在项目推进过程中常常使用Ajax,通过Jquery提供的函数能够很方便的使用Ajax,可是在实际使用中也遇到一些问题,比如怎样防止浏览器使用缓存,怎样使用同步方式等.通过博文整理总结 ...

  4. MS SQL 当记录不存在时插入insert INTO not exists

    INSERT INTO dbo.[T_DabaoTemp]  ([PType]           ,[pID]           ,[NewVersion]           ,[ParentC ...

  5. CF#263

    昨天没打,今天写了一下,前三题都没有难度吧. A. Appleman and Easy Task time limit per test 1 second memory limit per test ...

  6. the first has precedence, perhaps you need a NameVirtualHost directive

    报错信息1: Starting httpd: [Fri May 19 11:49:42 2011] [warn] VirtualHost 127.0.0.1:80 overl aps with Vir ...

  7. 修改ORACLE-NLS_DATE_FORMAT时间格式的四种方式

    修改ORACLE-NLS_DATE_FORMAT时间格式的四种方式 改变ORACLE -NLS_DATE_FORMAT中时间显示格式的显示有以下方式: 1.可以在用户环境变量中指定(LINUX). 在 ...

  8. 【十分不错】【离线+树状数组】【TOJ4105】【Lines Counting】

    On the number axis, there are N lines. The two endpoints L and R of each line are integer. Give you ...

  9. DictoryInfo.GetFiles

    using System; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(stri ...

  10. 《think in python》学习-8

    字符串 字符串是一个序列,可以用方括号操作符来访问字符串中的单独字符 fruit = 'banana' letter = fruit[1] 方括号中的表达式称为下标 下标从0 开始 任何表达式,包括变 ...