[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6

xlsfonts Command


Displays the font list for X-Windows.


xlsfonts [ -display Host:Display ] [ -l [ l [ l ] ] ] [ -m ] [ -C ] [ -1 ] [ -w Width ] [ -n Columns ] [ -u ] [ -o ] [ -fn Pattern ]


The xlsfonts command lists the fonts that match a specified Pattern parameter. Use the wildcard character "*" (asterisk) to match any sequence of characters (including none), and the "?" (question mark) to match any single character. If no pattern is given, "*" is assumed.

Note: The "*" and "?" characters must be placed within quotation marks to prevent them from being expanded by the shell.

You can use flags to specify servers, number and width of columns to print, size of font listings, whether the output should be sorted, and whether to use OpenFont instead of ListFonts.


Note: Using the -l (lowercase L) flag of the xlsfonts command can tie up your server for a long time. This is typical of single-threaded non-preemptable servers, and not a program error.

-1 Indicates that listings should use a single column. This flag is the same as the -n 1 flag.
-C Indicates that listings should use multiple columns. This flag is the same as the -n 0 flag.
-display Host:Display Identifies the X Server to contact by specifying the host name and display number.
-fn Pattern Specifies the fontname Pattern that xlsfonts will list.
-l] ] (lowercase L) Indicates that medium, long, and very long listings, respectively, should be generated for each font.
-m Indicates that long listings should also print the minimum and maximum bounds of each font.
-n Columns Specifies the number of columns to use to display the output. By default, the xlsfonts command tries to fit as many columns of font names into the number of characters specified by the -w Width flag.
-o Instructs the xlsfonts command to perform OpenFont (and QueryFont, if appropriate) instead of ListFonts. The -o flag is useful if the ListFonts or ListFontsWithInfo fails to list a known font, as is the case with some scaled font systems.
-u Indicates that the output should remain unsorted.
-w Width Specifies the width in characters that should be used to determine how many columns to print. The default is 79.

Environment Variable

DISPLAY Gets the default host and display to use.


  1. To specify a medium-sized list of each font, use a lowercase L and enter:

    xlsfonts -l
  2. To specify a three-column list of each font, enter:

     xlsfonts -n 3
  3. To display all fonts with the string iso8859 within their names, enter:

     xlsfonts -ll "*"iso8859"*"
  4. To list all fonts with rom1 plus one following character in their names, enter:

     xlsfonts rom1"?"

    This obtains a listing similar to:

    rom10  rom11  rom14  rom16  rom17

Related Information

The X command, xset command.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]