IT lexicon › Infra & Ops › xlsfonts

xlsfonts

Infra & Ops På svenska → Updated: 2026-10-10

The command-line tool that asks the X server which core fonts it has and prints their full XLFD names, one per line.

In classic X the fonts lived on the server, so the only way to know what was available was to ask. xlsfonts sends a ListFonts request with a pattern and prints the reply: xlsfonts -fn '-*-courier-*-r-*--12-*' returns every upright twelve-pixel Courier the server can find on its font path, aliases from fonts.alias included. The -l, -ll and -lll flags add progressively longer listings with metrics and properties for each font.

The asterisks have to be quoted, or the shell expands them against the current directory before X ever sees them — a mistake nearly every user made exactly once. An unfiltered xlsfonts on a well-stocked workstation produced thousands of lines, which mostly proved that fourteen-field XLFD names were easier to search than to read. Fonts managed by Fontconfig don't show up at all; fc-list is the equivalent there.

← Back to the lexicon