x11-ttf-fonts-install - indexes a set of exiting monospaced fonts into ~/.local/share/fonts
x11-ttf-fonts-anonymous-pro - downloads and indexes the Anonymous Pro fonts into ~/.local/share/fonts
x11-ttf-fonts-courier-prime - downloads and indexes the Courier Prime fonts into ~/.local/share/fonts
x11-ttf-fonts-dejavu-sans-mono - downloads and indexes the Dejavu Sans Mono fonts into ~/.local/share/fonts
x11-ttf-fonts-source-code-pro - downloads and indexes the Adobe Source Code Pro fonts into ~/.local/share/fonts
x11-ttf-fonts-ubuntu - downloads and indexes the Ubuntu Mono fonts into ~/.local/share/fonts
Platform Linux with X11 or Cygwin Windows with X11:
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-install | bash
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-anonymous-pro | bash
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-courier-prime | bash
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-dejavu-sans-mono | bash
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-source-code-pro | bash
curl -fsSL https://github.com/mittelmark/x11-ttf-fonts/releases/latest/download/x11-ttf-fonts-ubuntu | bash
Installs and/or indexes a set of monospaced true type fonts usuable for older X11 applications like the
Jasspa MicroEmacs text editor. TrueType fonts already installed on the current
machine are linked into ~/.local/share/fonts
using the x11-ttf-fonts-install
script. Other fonts like:
can be as well installed if the package manager does not support installing them using their own little shell scripts as can be seen in the SYNOPSIS section.
- Linux OS with X11 or XWayland
- MacOS with XQuartz (untested)
- Windows with Cygwin-X11 (untested)
- mkfontscale for font indexing
If you just like to link and index your local True Type fonts without executing code from the web, just copy the code below, which is a short version of the install script, into a running Bash session:
### create the font if neccessary
if [ ! -d ~/.local/share/fonts ] ; then
echo "creating directory ~/.local/share/fonts"
mkdir -p ~/.local/share/fonts
fi
### link existing ttf finds into the user folder
find /usr/ -iregex \
".*\\(Mono\\|Mono-?Bold\\|Mono-?Regular\\|Code-Regular\\|Code-Bold\\).ttf" 2>/dev/null \
| xargs ln -sf -t ~/.local/share/fonts/
### index the font directory
mkfontscale ~/.local/share/fonts/
mkfontdir ~/.local/share/fonts/
### check the fontpath and update it if required
res=$(xset q | grep -A 1 fontpath | grep .local/share/fonts)
if [[ "$res" == "" ]]; then
xset +fp ~/.local/share/fonts/
fi
xset fp rehash
The updated font path settings using the xset
command at the end should be
made permanent, how depends on your desktop and Window manager, on some
systems the folder ~/.config/local/fonts
is automatically added to your
font path.
One possibility which should work on all window managers or desktops is adding
the following line to your .bashrc
:
### end of .bashrc
alias mfontsel="xfontsel -pattern '*-r-*-m-*' -scaled"
if [ "$DISPLAY" != "" ]; then
if [ "`xset q | grep .local/share/fonts`" == "" ]; then
xset +fp ~/.local/share/fonts
set fp rehash
fi
fi
- FreeBSD handbook on X11 fonts
- https://github.com/ProgrammingFonts/ProgrammingFonts
- https://github.com/braver/programmingfonts
- https://www.programmingfonts.org/ - Preview
In case of problems, install suggestions for MacOS with XQuartz or suggestions for supporting other fonts use the Issues link at the Github project page.
@ Detlef Groth, University of Potsdam, Germany, 2024
The install scripts are licensed under the MIT license, the fonts comes with their own license which, in case you use the download scripts is as well downloaded in parallel to the ttf files.
Here the links to the font licenses of Anonymous Pro, Courier Prime, Dejavu Sans Mono, Adobe Source Code Pro and Ubuntu Mono.