In this tutorial we will learn how to install Ubuntu font family for individual user in CentOS/Red Hat. In our last post we have already described about how to install Ubuntu font family system wide.
System Details:
Operating System CentOS 6.5
Arch: x86_64
Runlevel : 3
To Add/Install Ubuntu font family for an individual users in CentOS and Red Hat
Step A: Create a .fonts directory in User’s home directory. For eg. here username is sharad
Login to desired user account for which you want to install Ubuntu Fonts
mkdir ~/.fonts
Below is the reference of my system
[sharad@CentOS-Server ~]$ whoami sharad [sharad@CentOS-Server ~]$ ls -la total 20 drwx------ 2 sharad sharad 4096 Jan 1 14:21 . drwxr-xr-x 3 root root 4096 Jan 1 14:21 .. -rw-r--r-- 1 sharad sharad 18 Jul 18 13:19 .bash_logout -rw-r--r-- 1 sharad sharad 176 Jul 18 13:19 .bash_profile -rw-r--r-- 1 sharad sharad 124 Jul 18 13:19 .bashrc [sharad@CentOS-Server ~]$ [sharad@CentOS-Server ~]$ mkdir .fonts [sharad@CentOS-Server ~]$ [sharad@CentOS-Server ~]$
Step B: Download the Ubuntu Fonts.
wget font.ubuntu.com/download/ubuntu-font-family-0.80.zip
Below given is the reference of my system
[sharad@CentOS-Server ~]$ wget font.ubuntu.com/download/ubuntu-font-family-0.80.zip --2014-01-01 14:34:27-- http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip Resolving font.ubuntu.com... 91.189.94.230 Connecting to font.ubuntu.com|91.189.94.230|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2091643 (2.0M) [application/zip] Saving to: `ubuntu-font-family-0.80.zip' 100%[===========================================================>] 2,091,643 2.32M/s in 0.9s 2014-01-01 14:34:28 (2.32 MB/s) - `ubuntu-font-family-0.80.zip' saved [2091643/2091643] [sharad@CentOS-Server ~]$ [sharad@CentOS-Server ~]$ ls -la total 2068 drwx------ 3 sharad sharad 4096 Jan 1 14:34 . drwxr-xr-x 3 root root 4096 Jan 1 14:21 .. -rw-r--r-- 1 sharad sharad 18 Jul 18 13:19 .bash_logout -rw-r--r-- 1 sharad sharad 176 Jul 18 13:19 .bash_profile -rw-r--r-- 1 sharad sharad 124 Jul 18 13:19 .bashrc drwxrwxr-x 2 sharad sharad 4096 Jan 1 14:29 .fonts -rw-rw-r-- 1 sharad sharad 2091643 Sep 29 2011 ubuntu-font-family-0.80.zip [sharad@CentOS-Server ~]$
Step C: unzip downloaded ubuntu-font-family-0.80.zip file
unzip ubuntu-font-family-0.80.zip
Below given is the reference of my system
[sharad@CentOS-Server ~]$ unzip ubuntu-font-family-0.80.zip Archive: ubuntu-font-family-0.80.zip creating: ubuntu-font-family-0.80/ inflating: ubuntu-font-family-0.80/Ubuntu-MI.ttf inflating: ubuntu-font-family-0.80/LICENCE-FAQ.txt inflating: ubuntu-font-family-0.80/Ubuntu-R.ttf inflating: ubuntu-font-family-0.80/Ubuntu-M.ttf inflating: ubuntu-font-family-0.80/UbuntuMono-R.ttf inflating: ubuntu-font-family-0.80/Ubuntu-C.ttf inflating: ubuntu-font-family-0.80/Ubuntu-LI.ttf inflating: ubuntu-font-family-0.80/copyright.txt inflating: ubuntu-font-family-0.80/README.txt inflating: ubuntu-font-family-0.80/TRADEMARKS.txt inflating: ubuntu-font-family-0.80/UbuntuMono-RI.ttf inflating: ubuntu-font-family-0.80/UbuntuMono-BI.ttf inflating: ubuntu-font-family-0.80/Ubuntu-B.ttf inflating: ubuntu-font-family-0.80/LICENCE.txt inflating: ubuntu-font-family-0.80/Ubuntu-RI.ttf inflating: ubuntu-font-family-0.80/CONTRIBUTING.txt inflating: ubuntu-font-family-0.80/FONTLOG.txt inflating: ubuntu-font-family-0.80/UbuntuMono-B.ttf inflating: ubuntu-font-family-0.80/Ubuntu-BI.ttf inflating: ubuntu-font-family-0.80/Ubuntu-L.ttf [sharad@CentOS-Server ~]$ [sharad@CentOS-Server ~]$ ls -la total 2072 drwx------ 4 sharad sharad 4096 Jan 1 14:36 . drwxr-xr-x 3 root root 4096 Jan 1 14:21 .. -rw-r--r-- 1 sharad sharad 18 Jul 18 13:19 .bash_logout -rw-r--r-- 1 sharad sharad 176 Jul 18 13:19 .bash_profile -rw-r--r-- 1 sharad sharad 124 Jul 18 13:19 .bashrc drwxrwxr-x 2 sharad sharad 4096 Jan 1 14:29 .fonts drwxrwxr-x 2 sharad sharad 4096 Sep 26 2011 ubuntu-font-family-0.80 -rw-rw-r-- 1 sharad sharad 2091643 Sep 29 2011 ubuntu-font-family-0.80.zip [sharad@CentOS-Server ~]$
Step D : Now copy the ubuntu-family-0.80 directory into ~/.fonts
cp -prvf ubuntu-font-family-0.80 .fonts
Below given is reference of my system
[sharad@CentOS-Server ~]$ cp -prvf ubuntu-font-family-0.80 .fonts `ubuntu-font-family-0.80' -> `.fonts/ubuntu-font-family-0.80' `ubuntu-font-family-0.80/LICENCE-FAQ.txt' -> `.fonts/ubuntu-font-family-0.80/LICENCE-FAQ.txt' `ubuntu-font-family-0.80/Ubuntu-C.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-C.ttf' `ubuntu-font-family-0.80/copyright.txt' -> `.fonts/ubuntu-font-family-0.80/copyright.txt' `ubuntu-font-family-0.80/LICENCE.txt' -> `.fonts/ubuntu-font-family-0.80/LICENCE.txt' `ubuntu-font-family-0.80/TRADEMARKS.txt' -> `.fonts/ubuntu-font-family-0.80/TRADEMARKS.txt' `ubuntu-font-family-0.80/CONTRIBUTING.txt' -> `.fonts/ubuntu-font-family-0.80/CONTRIBUTING.txt' `ubuntu-font-family-0.80/FONTLOG.txt' -> `.fonts/ubuntu-font-family-0.80/FONTLOG.txt' `ubuntu-font-family-0.80/Ubuntu-L.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-L.ttf' `ubuntu-font-family-0.80/Ubuntu-LI.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-LI.ttf' `ubuntu-font-family-0.80/Ubuntu-BI.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-BI.ttf' `ubuntu-font-family-0.80/UbuntuMono-RI.ttf' -> `.fonts/ubuntu-font-family-0.80/UbuntuMono-RI.ttf' `ubuntu-font-family-0.80/UbuntuMono-B.ttf' -> `.fonts/ubuntu-font-family-0.80/UbuntuMono-B.ttf' `ubuntu-font-family-0.80/Ubuntu-B.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-B.ttf' `ubuntu-font-family-0.80/UbuntuMono-BI.ttf' -> `.fonts/ubuntu-font-family-0.80/UbuntuMono-BI.ttf' `ubuntu-font-family-0.80/Ubuntu-MI.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-MI.ttf' `ubuntu-font-family-0.80/Ubuntu-R.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-R.ttf' `ubuntu-font-family-0.80/Ubuntu-RI.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-RI.ttf' `ubuntu-font-family-0.80/Ubuntu-M.ttf' -> `.fonts/ubuntu-font-family-0.80/Ubuntu-M.ttf' `ubuntu-font-family-0.80/README.txt' -> `.fonts/ubuntu-font-family-0.80/README.txt' `ubuntu-font-family-0.80/UbuntuMono-R.ttf' -> `.fonts/ubuntu-font-family-0.80/UbuntuMono-R.ttf' [sharad@CentOS-Server ~]$
Step E: Now run fc-cache command to build the information cache. This is the last step and font installation is completed
fc-cache -fv ~/.fonts/
Below given is the reference of my system
[sharad@CentOS-Server ~]$ fc-cache -fv ~/.fonts/ /home/sharad/.fonts: caching, new cache contents: 0 fonts, 1 dirs /home/sharad/.fonts/ubuntu-font-family-0.80: caching, new cache contents: 13 fonts, 0 dirs /var/cache/fontconfig: not cleaning unwritable cache directory /home/sharad/.fontconfig: cleaning cache directory fc-cache: succeeded [sharad@CentOS-Server ~]$