Fontconfig
Fontconfig is a library for configuring and customizing font access. This page documents how to change default font for most applications using fontconfig. Fonts page lists all the font packages available in Alpine Linux.
Installation
Install the fontconfig package.
Configuration
A list of installed can be obtained with fonts with the command:
fc-list
The below example changes the default fonts for sans-serif
, serif
and monospace
fonts to dejavu-fonts, a font family based on the Bitstream Vera Fonts with a wider range of characters. So Install the font-dejavu package, if not available already.
To change default font selection for a single user, create a file $HOME/.config/fontconfig/conf.d/52-my-default-fonts.conf as shown:
Contents of $HOME/.config/fontconfig/conf.d/52-my-default-fonts.conf
To change default font selection for system wide, copy the above contents to the file /etc/fonts/conf.d/52-my-default-fonts.conf.
See man 5 fonts-conf
for more details.