Step 1: Switch to the font download directory:
grep OTF 1 Richard Richard 16676 July rbno2light_a.otf1 Richard Richard 17912 July RBNO2LIGHT.OTF
Step 2: Switch to root User:
Su
Step 3: Create a new/usr/share/fonts/default/truetype directory
mkdir /usr/share/fonts/default/truetype
Step 4: Copy the font to the new directory
CP rbno2light*.otf/usr/share/fonts/default/truetype/
Step 5: Switch to the directory where the fonts are located
[Email protected] downloads]# cd/usr/share/fonts/default/truetype/
Step 6: Create a Fonts.scale
[[email protected] truetype]# ll total dosage +-rw-r--r--.1Root root16676December1 -: -RBNO2LIGHT_A.OTF-rw-r--r--.1Root root17912December1 -: -Rbno2light.otf[[email protected] truetype]# ttmkfdir [[email protected] truetype]# ll total dosage --rw-r--r--.1Root root2December1 +:xxFonts.scale-rw-r--r--.1Root root16676December1 -: -RBNO2LIGHT_A.OTF-rw-r--r--.1Root root17912December1 -: -Rbno2light.otf
Step 7: Create a Fonts.dir
[[ Email protected] truetype]# Mkfontdir [[email protected] truetype]# ll total dosage --rw-r--r--.1Root root2December1 +:xxFonts.dir-rw-r--r--.1Root root2December1 +:xxFonts.scale-rw-r--r--.1Root root16676December1 -: -RBNO2LIGHT_A.OTF-rw-r--r--.1Root root17912December1 -: -Rbno2light.otf
Step 8: Add the font path to the X font serve path (or [[email protected] downloads]#/usr/sbin/chkfontpath--add/usr/share/fonts/default/ TrueType):
[Email protected] truetype]# Chkfontpath--add/usr/share/fonts/default/truetype
Step 9: Update font information cache
[Email protected] truetype]# Fc-cache
Step 10: View fonts
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
Note: If you do not have Chkfontpath, install Chkfontpath (Chkfontpath dependent XFS) with the following installation methods:
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 download chkfontpath-1.10.1-1.1.x86_64.rpm, then install.
Step 2:rpm Installation Chkfontpath (may be missing dependencies)
[Email protected] downloads]$chmod+x chkfontpath-1.10.1-1.1. x86_64.rpm [[email protected] downloads]$sudoRPM-IVH chkfontpath-1.10.1-1.1. x86_64.rpm [sudo] Password forRichard: Warning: Chkfontpath-1.10.1-1.1. x86_64.rpm: Head V3 dsa/SHA1 Signature, key ID E8562897:nokey Error: Dependency detection failed: XFS is Chkfontpath-1.10.1-1.1. x86_64 needs
Step 3: Install XFS dependencies
[Email protected] downloads]$sudo Yum Installxfs Loaded plugins: Fastestmirror, langpacks, refresh-packagekitrepository Updates is listed Morethan onceinchThe configurationrepository updates-debuginfo is listed Morethan onceinchThe configurationrepository updates-source is listed Morethan onceinchThe configurationrepository updates is listed Morethan onceinchThe configurationrepository updates-debuginfo is listed Morethan onceinchThe configurationrepository updates-source is listed Morethan onceinchThe configurationrepository Fedora is listed Morethan onceinchThe configurationrepository Fedora-debuginfo is listed Morethan onceinchThe configurationrepository Fedora-source is listed Morethan onceinchThe configurationrepository Fedora is listed Morethan onceinchThe configurationrepository Fedora-debuginfo is listed Morethan onceinchThe configurationrepository Fedora-source is listed Morethan onceinchThe configurationloading mirror speeds from cached Hostfile* Fedora:mirrors.163. com* rpmfusion- Free-rawhide:FTP. sjtu.edu.cn* Rpmfusion-nonfree-rawhide:mirrors.163. com* Updates:mirrors.163. com is resolving dependencies-Checking Transactions---> Package xorg-x11-xfs.x86_64.1.1.1.2-4. FC20 will be installed-resolve dependencies to complete dependency relationships================================================================================Package schema version source size================================================================================Installing: xorg-X11-XFS x86_641:1.1.2-4. FC20 Fedora thek Transaction Summary================================================================================installation1Total Package Downloads: thek installation Size:136kIs This ok [y/d/N]: ydownloading packages:xorg-x11-xfs-1.1.2-4. fc20.x86_64.rpm | theKbxx:xxRunning Transaction checkrunning transaction testtransaction Test succeededrunning transaction (shutdown inhibite d) Installing:1: xorg-x11-xfs-1.1.2-4. fc20.x86_641/1in the verification:1: xorg-x11-xfs-1.1.2-4. fc20.x86_641/1installed: xorg-x11-xfs.x86_641:1.1.2-4. FC20 finished!
Step 4: Install Chkfontpath with RPM:
[Email protected] downloads]$sudoRPM-IVH chkfontpath-1.10.1-1.1. X86_64.RPM Warning: Chkfontpath-1.10.1-1.1. x86_64.rpm: Head V3 dsa/SHA1 Signature, key ID e8562897:nokey in preparation ... ################################# [ -%] is upgrading/Install ...1: chkfontpath-1.10.1-1.1################################# [ -%][[email protected] downloads]$
Reference: http://vijayk.blogspot.jp/2005/05/how-to-install-ttfotf-fonts-in-linux.html
Fedora, CentOS install TTF/OTF fonts