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. IOS设备设计完整指南(转载)

    http://blog.sina.com.cn/s/blog_6cc9af670102vq12.html

  2. 实现了在android实现左右滑动切换界面的效果

    这是实现了在android实现左右滑动切换界面的效果,该效果的源码下载,请到源码天堂下载吧,喜欢的朋友可以研究一下. 布局文件 <?xml version="1.0" enc ...

  3. 【数学水题】【TOJ4113】【 Determine X】

    题目大意: yuebai has a long sequence of integers A1,A2,-,AN. He also has such a function: F(x)=∑i=1N(⌊Ai ...

  4. 第一个关于ajax的代码

    昨天由于需要,写了第一个需要ajax的程序,之前只是看过相关介绍,没想到这么有用,记录一下,如有错误,还希望大家提出$(document).ready(function () {//获取url中名字为 ...

  5. asp.net访问母版页控件方法

    一.使用多种方式为内容页加载母版页默认情况下是给单个内容页指定一个母版页加载,当多个内容页需加载到同一个母版页时,我们可以通过配置文件为多个内容页批量加载母版页,另外,还可以在PreInit事件中动态 ...

  6. jQuery ZeroClipboard中Flash定位不准确的解决方案

    转自波斯马,原文地址<jQuery ZeroClipboard中Flash定位不准确的解决方案> jQuery ZeroClipboard支持在多种浏览器中复制内容到剪贴板,IE.Fire ...

  7. gulp配置版本号 教程之gulp-rev-append

    简介: 使用gulp-rev-append给页面的引用添加版本号,清除页面引用缓存. 1.安装nodejs/全局安装gulp/项目安装gulp/创建package.json和gulpfile.js文件 ...

  8. 判断用户是pc访问还是手机访问

    前天因为手机页面中点击无法链接53客服,就研究了下怎样通过js判断,用户是拿手机(ipad)访问,还是pc端访问, 如果是手机访问的话只需把链接通过attr修改a的链接地址~ <a class= ...

  9. arm-linux-gcc 安装和测试

    下载交叉编译器http://pan.baidu.com/share/link?shareid=984027778&uk=388424485 第一步进行解压: tar -zxvf 文件 第二部将 ...

  10. python sys.exit()函数说明

    sys.exit()函数是通过抛出异常的方式来终止进程的,也就是说如果它抛出来的异常被捕捉到了的话程序就不会退出了. #!/usr/bin/python #!coding:utf-8 import s ...