Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using fallback font with xterm

Tags:

fonts

xterm

I've been trying to get xterm to display fallback fonts with no success.

This feature was apparently added in patch #338 since 2018, and yet with latest release of Debian it does not appear to be working.

Things I've tried:

  1. Listing multiple fonts separated by a comma for "xterm*faceName" in ~/.Xresources

  2. Adding font.conf in ~/.config/fontconfig/ as shown here:

https://wiki.archlinux.org/index.php/Fonts#Fallback_font_order

Defining the fallback font in font.conf seems to work fine for other terminals, such as st and konsole, but has no effect when using xterm.

The goal with this is to use a bitmap font as a primary font, and have TTF icon font as fallback for any glyphs not defined by the bitmap font.

Anyone have any suggestions?

Thanks.

like image 476
cdarkly Avatar asked Jun 09 '26 08:06

cdarkly


1 Answers

Fallback fonts in xterm apply only to the TrueType fonts, and are not specified explicitly (xterm uses fontconfig to ask for comparable fallback fonts starting with the faceName and faceSize resources). Because fontconfig is not efficient, xterm limits the number of fonts that it may use with the limitFontsets resource.

like image 163
Thomas Dickey Avatar answered Jun 12 '26 11:06

Thomas Dickey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!