From 985ae74260fe8794c9c35d4c77da435c18dc9e30 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 13 Aug 2024 06:38:18 +0200 Subject: [PATCH] linux/font configuration: added ttf font installation --- wiki/linux/font_configuration.md | 36 +++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/wiki/linux/font_configuration.md b/wiki/linux/font_configuration.md index ca3d567..0bdb9b4 100644 --- a/wiki/linux/font_configuration.md +++ b/wiki/linux/font_configuration.md @@ -45,7 +45,7 @@ A configuration typically looks like the following lines. This configuration requires some fonts that are not necessarily present in any Linux installation so they may have to be installed. -Follow the section on [adding new fonts](#adding-new-font) and +Follow the section on [adding new fonts](#adding-new-font-to-configuration) and [recommended fonts](#recommended-fonts) as needed. ## Usage @@ -53,6 +53,24 @@ Follow the section on [adding new fonts](#adding-new-font) and This section addresses important commands and packages for the configuration of fonts. +### Add TTF Font + +A font can be added to the local users fonts using a `.ttf` file. +The file has to be copied into the local fonts directory `~/.local/share/fonts`. +Afterwards the [cache should be reloaded](#reload-the-cache). +Finally the font can be [found](#list-or-find-font-family). + +### Reload the Cache + +The cache needs to be reloaded in certain situations like after a new font +has been added. +This can be achieved by the following command. + + +```sh +fc-cache -f -c +``` + ### List or Find Font Family A list of all fonts can be displayed using the command `fc-match -a`. @@ -63,17 +81,18 @@ For matching the command `fc-match -s ` is be used. This will display a list of font families that match best with the given search term. -### Adding New Font +### Adding New Font to Configuration A new font can be added by placing its name inside ``/``-tags. Make sure to place it inside the correct [font family](/wiki/font.md#typefaces). If you want to add a font into the configuration make sure its name [matches](#list-or-find-font-family) correctly. + ### Recommended Fonts In this section various fonts are listed for the different typefaces. -Make sure to follow [the adding new fonts section](#adding-new-font) after +Make sure to follow [the adding new fonts section](#adding-new-font-to-configuration) after installing new fonts. #### Monospace @@ -119,3 +138,14 @@ displayed properly. [JoyPixels](https://joypixels.com) feature many emoji icons. The fonts can be obtained from their [website](https://joypixels.com/download) or for most distributions from the `ttf-joypixels` package. + +#### Special Fonts + +This section lists some fonts that are good in certain situations but are not +intended to be used as day-to-day font. + +- [MagicMedieval & MagicSymbols](http://www.thealmightyguru.com/GameFonts/Series-MagicTheGathering.html) + are fonts that are similar to the font used in the game + [Magic: The Gathering](/wiki/games/magic%3A_the_gathering.md). + An overview of the glyphs can be found in a + [StackExchange post by Cicada](https://tex.stackexchange.com/questions/570890/how-can-i-typeset-magic-the-gathering-symbols-using-the-pifont-package-in-latex).