Fontconfig: Difference between revisions
WhyNotHugo (talk | contribs) (Add category desktop) |
Prabuanand (talk | contribs) (changed category, added wikilinks, headings, wikitags) |
||
Line 1: | Line 1: | ||
[https://www.freedesktop.org/wiki/Software/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 {{Pkg|fontconfig}} package. | ||
<?xml version='1.0'?> | |||
== Configuration == | |||
A list of installed can be obtained with fonts with the command:{{Cmd|fc-list}} | |||
The below example changes the default fonts for <code>sans-serif</code>, <code>serif</code> and <code>monospace</code> fonts to [https://dejavu-fonts.github.io/ dejavu-fonts], a font family based on the Bitstream Vera Fonts with a wider range of characters. So [[Install]] the {{Pkg|font-dejavu}} package, if not available already. | |||
To change default font selection for a single user, create a file {{Path|$HOME/.config/fontconfig/conf.d/52-my-default-fonts.conf}} as shown:{{Cat|$HOME/.config/fontconfig/conf.d/52-my-default-fonts.conf|<nowiki><?xml version='1.0'?> | |||
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'> | <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'> | ||
<fontconfig> | <fontconfig> | ||
Line 26: | Line 33: | ||
</prefer> | </prefer> | ||
</alias> | </alias> | ||
</fontconfig> | </fontconfig></nowiki>}} | ||
</ | |||
To change default font selection for system wide, copy the above contents to the file {{Path|/etc/fonts/conf.d/52-my-default-fonts.conf}}. | |||
See <code>man 5 fonts-conf</code> for more details. | |||
==See also== | |||
[[Fonts]] | |||
[[Category: | [[Category:Infographics]] |
Latest revision as of 05:51, 19 March 2025
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.