font
Install fonts on the server for programs that draw text, such as PDF and image generators: the Microsoft core fonts on Debian and Ubuntu, and the system's "Fonts" package group on AlmaLinux, Rocky Linux, CentOS, Red Hat, and Fedora
- Command:
/go/font - Category: System packages
- Arguments: None
- Output: The package manager's output
- Last updated: 2026-11-21
On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · See also
Overview
A fresh server often has very few fonts. Programs that draw text, such as PHP code that makes images, PDF generators, and screenshot tools, then fall back to a plain font or fail. /go/font installs a set of common fonts so that text is drawn the way you expect.
What gets installed depends on the operating system:
| Operating system | What is installed |
|---|---|
| Debian, Ubuntu | The Microsoft core fonts package (msttcorefonts), which has fonts such as Arial and Times New Roman. |
| AlmaLinux, Rocky Linux, CentOS, Red Hat, Fedora | The system's Fonts package group, which holds open-source fonts. It does not include the Microsoft fonts, even though the command says it does. |
[!NOTE] The command prints
Installing Microsoft Fontson every system. On the Red Hat family that message is wrong. See Details.
Quick start
/go/font
Syntax
/go/font
The command takes no arguments. Anything you type after it is ignored, and is only written to /var/log/go/font.log with a timestamp. Run it as root.
[!WARNING] The script expects a variable named
OSbut never sets it. UnlessOSis already set in your environment, the command printsUnknown operating system.and does nothing. See Troubleshooting for the workaround.
Output
Installing Microsoft Fonts
followed by the output of the package manager (dnf or apt).
If the operating system is not recognized, it prints:
Unknown operating system.
and ends with exit status 1.
Examples
# Install the fonts (see the note above if it says "Unknown operating system.")
/go/font
# Run it with the OS name read from GoAdmio, as root
OS=$(</usr/local/goadmio/linux/os.db) /go/font
# Count the installed fonts
fc-list | wc -l
# Check for a font by name
fc-list | grep -i arial
# Review recent calls
tail /var/log/go/font.log
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Unknown operating system. on a supported system |
The script never reads the OS name, so the OS variable is empty. |
Run it as root with the name set: OS=$(</usr/local/goadmio/linux/os.db) /go/font. |
Unable to locate package msttcorefonts (Debian, Ubuntu) |
The package has a different name, or its repository is off. The Microsoft fonts package is usually called ttf-mscorefonts-installer and needs the contrib (Debian) or multiverse (Ubuntu) repository. |
Enable the repository and install ttf-mscorefonts-installer. |
| The install stops at a licence question, or fails to download | The Microsoft fonts come with a licence that you must accept, and they are downloaded during the install. | Accept the licence, and check that the server can reach the internet. |
| Arial or Times New Roman are not found on AlmaLinux, Rocky, CentOS, Red Hat, or Fedora | The "Fonts" group has open-source fonts, not Microsoft fonts. | Use Liberation fonts, which have the same sizes as Arial, Times New Roman, and Courier New. Install liberation-fonts if it is missing. |
| Fonts are installed, but a website or tool does not use them | The program has not reloaded the font list. | Run fc-cache -f, then restart the program. For PHP, run fpm. |
| Nothing is printed except the first line | The package manager found nothing to do, or dnf or apt printed no output. |
Check with fc-list. |
Details
What it does
- Records the call in
/var/log/go/font.log. - Prints
Installing Microsoft Fonts. - Depending on the operating system:
- AlmaLinux, Rocky Linux, CentOS, Red Hat, Fedora:
dnf groupinstall -y "fonts" - Debian, Ubuntu:
apt -y install msttcorefonts - Anything else: prints
Unknown operating system.and stops with status1
- AlmaLinux, Rocky Linux, CentOS, Red Hat, Fedora:
flowchart TD
A["font"] --> B["Print Installing Microsoft Fonts"]
B --> C{"OS"}
C -- "Red Hat family" --> D["dnf groupinstall Fonts"]
C -- "Debian or Ubuntu" --> E["apt install msttcorefonts"]
C -- "Other or not set" --> F["Unknown operating system, exit 1"]
Where the fonts go
Fonts are installed under /usr/share/fonts, where all programs on the server can use them. The font cache is not refreshed by the script. Package installs normally refresh it, and fc-cache -f does it by hand.
Licence
The Microsoft core fonts are free to download and use, but they come with Microsoft's own licence. Read it before you install them on a server that serves customers.
See also
| Command | Description |
|---|---|
package |
Install all base packages required by GoAdmio |
fpm |
Restart all installed PHP-FPM versions on your server |
extension |
List, install, or remove a PHP extension across every installed PHP version |
installphp |
Install a PHP version with its extensions and PHP-FPM service |
webp |
Convert images to WebP format |
img |
Shrink large images in place |
pdf |
Compress PDF files in a site directory |