How to check and update new font in Centos/Redhat Linux ?

Today lets see how to check and update new fonts in CentOS or Redhat Linux.

This is very useful tip to manage fonts on your Linux system.

Lets see if our system has “DejaVu Serif” font installed or not.

 

I. Check available fonts and grep the font you are looking for.

[user@ngelinux001 ]$ fc-list | grep -i deja
DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
DejaVu Sans Mono:style=Bold Oblique
DejaVu LGC Sans Mono:style=Oblique
DejaVu Serif:style=Bold Italic
DejaVu Sans:style=Bold Oblique
DejaVu LGC Sans Mono:style=Bold Oblique
DejaVu LGC Sans Mono:style=Bold
DejaVu LGC Sans Mono:style=Book
DejaVu Sans:style=Oblique
DejaVu Sans Mono:style=Oblique
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
DejaVu Sans,DejaVu Sans Light:style=ExtraLight
DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
DejaVu Serif,DejaVu Serif Condensed:style=Condensed Italic,Italic
DejaVu Sans:style=Bold
DejaVu Sans:style=Book
DejaVu Serif:style=Italic
DejaVu Sans Mono:style=Book
DejaVu Sans Mono:style=Bold
DejaVu Serif:style=Book
DejaVu Serif:style=Bold
[user@ngelinux001 ]$

 

II. Check the RPM package for font if installed.

[user@fav-parasoft dejavu]$ rpm -qa --last | grep -i dejavu
dejavu-serif-fonts-2.33-6.el7.noarch          Fri 08 Apr 2022 07:18:04 AM PDT
dejavu-sans-fonts-2.33-6.el7.noarch           Fri 08 Apr 2022 07:15:58 AM PDT
dejavu-sans-mono-fonts-2.33-6.el7.noarch      Fri 08 Apr 2022 07:15:37 AM PDT
dejavu-fonts-common-2.33-6.el7.noarch         Fri 08 Apr 2022 07:15:13 AM PDT

 

III. Check out the available fonts on the system.

[user@fav-parasoft fonts]$ cd /usr/share/fonts; ls -ltr
total 32
drwxr-xr-x. 2 root root  123 Apr  8 07:15 abattis-cantarell
drwxr-xr-x. 4 root root   38 Apr  8 07:17 default
drwxr-xr-x. 2 root root 4096 Apr  8 07:18 liberation
drwxr-xr-x. 2 root root 4096 Apr  8 07:18 dejavu
drwxr-xr-x. 2 root root  113 Apr  8 07:18 google-crosextra-caladea
drwxr-xr-x. 2 root root   26 Apr  8 07:18 opensymbol
drwxr-xr-x. 2 root root  113 Apr  8 07:18 google-crosextra-carlito
drwxr-xr-x. 2 root root 8192 Apr  8 07:18 culmus
drwxr-xr-x. 2 root root   99 Apr  8 07:23 thai-scalable
drwxr-xr-x. 2 root root   75 Apr  8 07:23 khmeros
drwxr-xr-x. 2 root root   23 Apr  8 07:23 smc
drwxr-xr-x. 2 root root   88 Apr  8 07:23 nhn-nanum
drwxr-xr-x. 2 root root   32 Apr  8 07:24 lohit-gujarati
drwxr-xr-x. 2 root root   28 Apr  8 07:25 wqy-zenhei
drwxr-xr-x. 2 root root   29 Apr  8 07:25 lohit-oriya
drwxr-xr-x. 2 root root   31 Apr  8 07:25 lohit-bengali
drwxr-xr-x. 2 root root   34 Apr  8 07:25 lohit-devanagari
drwxr-xr-x. 2 root root   23 Apr  8 07:25 madan
drwxr-xr-x. 2 root root  114 Apr  8 07:25 paratype-pt-sans
drwxr-xr-x. 2 root root  254 Apr  8 07:25 overpass
drwxr-xr-x. 2 root root   35 Apr  8 07:25 paktype-naskh-basic
drwxr-xr-x. 2 root root  101 Apr  8 07:25 stix
drwxr-xr-x. 2 root root   32 Apr  8 07:25 lohit-assamese
drwxr-xr-x. 2 root root   23 Apr  8 07:25 lklug
drwxr-xr-x. 2 root root   30 Apr  8 07:25 lohit-nepali
drwxr-xr-x. 2 root root   31 Apr  8 07:25 lohit-kannada
drwxr-xr-x. 2 root root   33 Apr  8 07:25 sil-abyssinica
drwxr-xr-x. 2 root root   26 Apr  8 07:25 sil-nuosu
drwxr-xr-x. 2 root root   23 Apr  8 07:25 cjkuni-uming
drwxr-xr-x. 2 root root   29 Apr  8 07:25 lohit-tamil
drwxr-xr-x. 2 root root   35 Apr  8 07:25 vlgothic
drwxr-xr-x. 2 root root   30 Apr  8 07:25 lohit-telugu
drwxr-xr-x. 2 root root   30 Apr  8 07:25 wqy-microhei
drwxr-xr-x. 2 root root   31 Apr  8 07:25 lohit-marathi
drwxr-xr-x. 2 root root   33 Apr  8 07:25 lohit-malayalam
drwxr-xr-x. 2 root root   43 Apr  8 07:25 jomolhari
drwxr-xr-x. 2 root root   31 Apr  8 07:25 lohit-punjabi
drwxr-xr-x. 2 root root 4096 Apr  8 07:25 open-sans
drwxr-xr-x. 2 root root 4096 Apr  8 07:25 ucs-miscfixed
drwxr-xr-x. 2 root root   47 Apr  8 07:25 sil-padauk
drwxr-xr-x. 2 root root 4096 Apr  8 07:25 gnu-free
[user@fav-parasoft fonts]$
[user@fav-parasoft fonts]$ cd dejavu/
[user@fav-parasoft dejavu]$ ls -ltr
total 9040
-rw-r--r--. 1 root root 345204 Feb 27  2011 DejaVuSans-ExtraLight.ttf
-rw-r--r--. 1 root root 643852 Feb 27  2011 DejaVuSansCondensed.ttf
-rw-r--r--. 1 root root 576004 Feb 27  2011 DejaVuSansCondensed-Oblique.ttf
-rw-r--r--. 1 root root 631992 Feb 27  2011 DejaVuSansCondensed-Bold.ttf
-rw-r--r--. 1 root root 580168 Feb 27  2011 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r--. 1 root root 672300 Feb 27  2011 DejaVuSans-Bold.ttf
-rw-r--r--. 1 root root 611212 Feb 27  2011 DejaVuSans-BoldOblique.ttf

 

IV. To add a new font file manually.

a. Copy all font files in a directory inside /usr/share/fonts/newfont
b. Recreate font cache : fc-cache -f /usr/share/fonts/

 

V. Export Display to your local system and try to check the new font.

bash-4.2$ export DISPLAY=172.18.26.166:10.0
bash-4.2$ gnome-font-viewer DejaVuSansMono.ttf

 

VI. New font window will appear like below.


0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments