107 lines
2.2 KiB
Markdown
107 lines
2.2 KiB
Markdown
---
|
|
publish: true
|
|
permalink: /os/fonts
|
|
title: Fonts
|
|
created: 2026-01-29T15:24:42.068-07:00
|
|
modified: 2026-02-05T12:18:02.154-07:00
|
|
tags:
|
|
- fonts
|
|
- rendering
|
|
- appearance
|
|
cssclasses: ""
|
|
---
|
|
|
|
Font installation and rendering improvements for Arch Linux.
|
|
|
|
## Essential Fonts
|
|
|
|
```bash
|
|
sudo pacman -S \
|
|
ttf-dejavu ttf-liberation ttf-roboto \
|
|
noto-fonts noto-fonts-cjk noto-fonts-emoji \
|
|
ttf-jetbrains-mono ttf-fira-code \
|
|
ttf-font-awesome
|
|
```
|
|
|
|
### Nerd Fonts (icons in terminal)
|
|
|
|
```bash
|
|
paru -S ttf-jetbrains-mono-nerd
|
|
# or download from https://www.nerdfonts.com/
|
|
```
|
|
|
|
## Font Rendering
|
|
|
|
Arch's default font rendering can look rough. These tweaks improve it significantly.
|
|
|
|
### Enable good defaults
|
|
|
|
```bash
|
|
sudo ln -s /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/
|
|
sudo ln -s /usr/share/fontconfig/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d/
|
|
sudo ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/
|
|
```
|
|
|
|
### User fontconfig
|
|
|
|
Create `~/.config/fontconfig/fonts.conf`:
|
|
```xml
|
|
<?xml version="1.0"?>
|
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
|
<fontconfig>
|
|
<match target="font">
|
|
<edit name="antialias" mode="assign">
|
|
<bool>true</bool>
|
|
</edit>
|
|
<edit name="hinting" mode="assign">
|
|
<bool>true</bool>
|
|
</edit>
|
|
<edit name="hintstyle" mode="assign">
|
|
<const>hintslight</const>
|
|
</edit>
|
|
<edit name="lcdfilter" mode="assign">
|
|
<const>lcddefault</const>
|
|
</edit>
|
|
<edit name="rgba" mode="assign">
|
|
<const>rgb</const>
|
|
</edit>
|
|
</match>
|
|
</fontconfig>
|
|
```
|
|
|
|
### Rebuild font cache
|
|
|
|
```bash
|
|
fc-cache -fv
|
|
```
|
|
|
|
## Verify Settings
|
|
|
|
```bash
|
|
fc-match -v sans | grep -E "antialias|hinting|hintstyle|rgba"
|
|
```
|
|
|
|
## Default Fonts
|
|
|
|
Set preferred defaults:
|
|
```xml
|
|
<!-- Add to fonts.conf -->
|
|
<alias>
|
|
<family>sans-serif</family>
|
|
<prefer><family>Noto Sans</family></prefer>
|
|
</alias>
|
|
<alias>
|
|
<family>serif</family>
|
|
<prefer><family>Noto Serif</family></prefer>
|
|
</alias>
|
|
<alias>
|
|
<family>monospace</family>
|
|
<prefer><family>JetBrains Mono</family></prefer>
|
|
</alias>
|
|
```
|
|
|
|
## Resources
|
|
|
|
- Detailed guide: https://github.com/davgar99/arch-linux-font-improvement-guide
|
|
- Arch Wiki: https://wiki.archlinux.org/title/Font_configuration
|