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. Linux id 命令 - 显示用户id和组id信息

    要登入一台计算机,我们需要一个用户名.用户名是一个可以被计算机识别的身份.基于此,计算机会对使用这个用户名的登陆的人应用一系列的规则.在Linux系统下,我们可以使用 id 命令. 什么是 id 命令 ...

  2. SHUTDOWN: Active processes prevent shutdown operation

    在使用shutdown immediate关闭数据库时hang住,查看alert 日志,遭遇了SHUTDOWN: Active processes prevent shutdown operation ...

  3. Codeforces 433 C. Ryouko's Memory Note

    C. Ryouko's Memory Note time limit per test 1 second memory limit per test 256 megabytes input stand ...

  4. spring-android的使用【转】

    android + Spring RESTful 简单登录 (spring3实现服务端 rest api)  https://github.com/spring-projects/spring-and ...

  5. asp.net application

    Application 对象用于存储和访问来自任何页面的变量,类似于 session 对象.不同之处在于,所有的用户分享一个 Application 对象,而 session 对象和用户的关系是一一对 ...

  6. JavaWeb核心编程之(四.1)JSP

    JSP简介: JSP是简化Servlet编写的一种技术, 它将Java代码和HTML语句混合在一个文件中编写, 只对网页中药动态产生的内容采用Java代码来编写, 而对固定不变的静态内容采用普通的静态 ...

  7. 【译】Optimize caching-缓存优化

    缓存优化 大部分的网页都包括不常更改的资源,比如CSS文件,图片文件,JavaScript文件等.这些资源通过网络下载需要一定的时间,这就增加了网页加载的总时间.HTTP缓存可以让这些资源通过浏览器以 ...

  8. [iOS]リソースファイルの取得方法

    リソースファイルのパスを取得するためには下記のように実装する. -------------------------------------------------------------------- ...

  9. jquerymobile listview 局部刷新

    function onSuccess(data, status) { data = $.trim(data); // alert(data); // return; if (data) { $('#l ...

  10. Scrapy的架构初探

    Scrapy,Python开发的一个web抓取框架. 1,引言 Python即时网络爬虫启动的目标是一起把互联网变成大数据库.单纯的开放源代码并不是开源的全部,开源的核心是“开放的思想”,聚合最好的想 ...