Adding new fonts for all users

To install fonts for all users

for example the boring company font:

https://www.futurafree.com/wp-content/uploads/2017/04/futura-bold.zip

one need to login as root and create a directory under

/usr/share/fonts/
# tested on
hostnamectl 
Static hostname: centos.localdomain
Chassis: laptop
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 4.15.9
Architecture: x86-64

# in combination with:


su - root; # become root
# change into dir
cd /usr/share/fonts/;
# download font
wget https://www.futurafree.com/wp-content/uploads/2017/04/futura-bold.zip
# unpack
unzip futura-bold.zip;
# seems spaces in filename is no good
mv "futura bold" "futura-bold";
# so one got now this new dir:
ll /usr/share/fonts/futura-bold
total 248K
drwxr-xr-x. 2 root root 179 Dec 15 14:49 .
drwxr-xr-x. 45 root root 4.0K Dec 15 14:49 ..
-rwxr-xr-x. 1 root root 38K Aug 9 2015 Futura Bold.ttf
-rwxr-xr-x. 1 root root 41K Aug 5 2015 Futura Extra Bold.ttf
-rwxr-xr-x. 1 root root 49K Aug 5 2015 Futura Round Bold.ttf
-rwxr-xr-x. 1 root root 28K Aug 5 2015 FuturaStd Bold.ttf
-rwxr-xr-x. 1 root root 28K Aug 5 2015 Futura Std Extra Bold.ttf
-rwxr-xr-x. 1 root root 49K Aug 5 2015 Futura URW Extra Bold.ttf

# change permission rights
# VERY IMPORTANT OR LibreOffice will not be able to access the font
chmod -R ugo+rx futura-bold
# or on the whole directory
chmod -R ugo+rx /usr/share/fonts/
# now run this: # build font information cache files
fc-cache -f /usr/share/fonts/

result should look like this:

can ttf font files contain malicious code?

for Windows: yes?

https://sysadminconcombre.blogspot.com/2018/11/golem-malware-malware-hiding-in-your.html

for Appe Mac OSX: yes?

https://forum.glyphsapp.com/t/mac-font-book-validation-error-after-upgrading-to-10-11-5/4655

CVE-2016-1797 : “Apple Type Services (ATS) in Apple OS X before 10.11.5 allows attackers to bypass intended FontValidator sandbox-policy restrictions and execute arbitrary code in a privileged context via a crafted app.”

for linux? have no idea

https://superuser.com/questions/1202551/can-truetype-fonts-contain-malicious-code

manpages:

fc-cache.man.txt

while for Ubuntu / Debian a program exists called “font-manager”, no such thing seems to exist: yum search font-manager (nothing found)

Created with GIMP

src of inspiration: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/international_language_support_guide/add_fonts_all_users

 

admin