X11 XQuartz 1.20.11 (xorg-server 1.20.11) on Big Sur fonts not recognized
I have xset +fp the_directory
with TTF fonts, I have mkfontdir
and mkfontscale
the same directory, I have fc-cache -fv
and verified the directory is listed and cached and font count correct, but xlsfonts
continues to not list the TTF fonts I want added. Fonts I want are included in in the files fonts.dir
, fonts.scale
and fonts.list
. I've verified the fonts I want are in Font Book in User.
I think I'm missing something pretty obvious, but can't seem to find it. How can I get TTF fonts made available for use by X11?
So it turns out that xlsfonts does not list all fonts known, but rather either only the X server's fonts, or the fonts that are dealt with “classically”. fc-list
will list the fonts that are dealt with in a more modern fashion (or that are on the X client?).
In the case of xterm, use the -fa
flag to use TTF (and other non-bitmapped?) fonts. For example, if xset q
shows directory X in the font path, and directory X has a fonts.dir file (made by running, e.g., mkfontdir X
) and a fonts.scale file (made by running, e.g., mkfontscale X
), and you've run fc-cache -v
, you should be able to run (e.g.) fc-list someFontName
and see all the styles that font contains, and be able to xterm -fa 'Input Mono:style=Regular'
, assuming Input Mono
is a known font.