Linux Fonts: Difference between revisions
From wikinotes
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
| <code>/etc/locale.conf</code> || the character-set used by the system | | <code>/etc/locale.conf</code> || the character-set used by the system | ||
|} | |} | ||
= Fonts = | |||
<blockquote> | |||
For a list of fonts, see [[Fonts]] . | |||
</blockquote><!-- Fonts --> | |||
= Font System = | = Font System = | ||
Line 17: | Line 23: | ||
* rendered by your Xserver directly (/etc/X11/xorg.conf.d/*.conf FontPath entries) | * rendered by your Xserver directly (/etc/X11/xorg.conf.d/*.conf FontPath entries) | ||
* rendered by a font-renderer (fc-cache accessible fonts) | * rendered by a font-renderer (fc-cache accessible fonts) | ||
<syntaxhighlight lang="bash"> | |||
font-manager # gui program to select fonts | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
# ============================================ | |||
# font-renderer font-cache (non Xserver fonts) | |||
# ============================================ | |||
fc-cache -vfs # rebuild font-cache | |||
fc-match "helvetica" # find fonts containing this string | |||
fc-list | grep iosevka # list all fonts | |||
</syntaxhighlight> | |||
<source lang="bash"> | <source lang="bash"> | ||
# ================================================== | # ================================================== | ||
# GUI program to create font-matches | # GUI program to create font-matches | ||
# from your installed X11 fonts (Xserver fonts only) | # from your installed X11 fonts (Xserver fonts only) | ||
# ================================================== | # ================================================== | ||
xfontsel | xfontsel | ||
# ============================== | # ============================== | ||
# check for a font-match on your | # check for a font-match on your | ||
# system (Xserver fonts only) | # system (Xserver fonts only) | ||
# ============================== | # ============================== | ||
xlsfonts -fn '-*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-1' | xlsfonts -fn '-*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-1' | ||
</source> | </source> | ||
</blockquote><!-- Managing Fonts --> | </blockquote><!-- Managing Fonts --> | ||
Latest revision as of 16:06, 7 April 2024
Locations
/usr/share/fonts |
location fonts are installed to |
/etc/fonts/conf.d/*.conf |
systemwide font-aliases |
/etc/locale.conf |
the character-set used by the system |
Fonts
For a list of fonts, see Fonts .
Font System
Fonts can be accessed in 2x ways:
- rendered by your Xserver directly (/etc/X11/xorg.conf.d/*.conf FontPath entries)
- rendered by a font-renderer (fc-cache accessible fonts)
font-manager # gui program to select fonts# ============================================ # font-renderer font-cache (non Xserver fonts) # ============================================ fc-cache -vfs # rebuild font-cache fc-match "helvetica" # find fonts containing this string fc-list | grep iosevka # list all fonts# ================================================== # GUI program to create font-matches # from your installed X11 fonts (Xserver fonts only) # ================================================== xfontsel # ============================== # check for a font-match on your # system (Xserver fonts only) # ============================== xlsfonts -fn '-*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-1'
Manually Installing Fonts
- Move your font's directory to ``/usr/share/fonts``
- make sure it is readable by all users
font-renderer fonts
# update the fontcache fc-cache -vfsX11 fonts
# /etc/X11/xorg.conf.d/50-fontpath.conf Section "Files" FontPath "/usr/share/fonts,/usr/share/otherfonts/" # <- the path MUST end in '/' EndSection# restart Xorg server or reboot xset q # all font-paths will be listed xset +fp /usr/share/fonts/100dpi/ # add fontpath to beginning of font list
Font Aliases/Overrides
/etc/fonts/conf.d
location for font aliases/overrides Check which font will answer to a font-family (when used in something like a web browser).
fc-match Helvetica
See Also:
- https://wiki.archlinux.org/index.php/Font_configuration (see under heading Fontconfig Configuration)
Locale
Your locale determines your character encoding. This is important for example for rendering UTF8-characters.
# /etc/locale.conf LANG=en_US.UTF-8