LinuxCommandLibrary

fslsfonts

List fonts available to an X server

SYNOPSIS

fslsfonts [-server servername] [-l | -m] [-C] [-o] [-f] [-r] [-v] [-dir directory] [-fn pattern]

PARAMETERS

-server servername
    Specifies the X font server to query. The server name typically includes a hostname and port, e.g., myhost:7100, or unix/:7100 for a local socket.

-l
    Produces a long listing for each font, including detailed properties like Foundry, Family, Weight, Slant, Setwidth, Addstyle, Pixelsize, Pointsize, ResolutionX, ResolutionY, Spacing, AverageWidth, CharsetRegistry, and CharsetEncoding.

-m
    Produces a medium listing, which is more concise than the long listing but provides more details than the default short listing, often showing fewer properties than the -l option.

-C
    Shows character set names (e.g., ISO8859-1) rather than the internal encodings, which can be more human-readable.

-o
    Shows font server internal opcode information, which is primarily useful for debugging font server protocols or understanding font server operations at a low level.

-f
    Shows fonts that have been 'forced' by the font server's configuration, meaning they are always available regardless of whether they are explicitly requested or configured.

-r
    When used in conjunction with the -dir option, this flag causes fslsfonts to recursively search for fonts within the specified directory and its subdirectories.

-v
    Enables verbose output, providing more detailed information about the command's operation, such as connection attempts, configuration details, and encountered errors.

-dir directory
    Specifies a local directory to list fonts from, instead of querying a running font server. This option allows browsing font files directly on the filesystem.

-fn pattern
    Specifies a font name pattern to match. Only fonts whose names match the provided pattern (which can include wildcards like * and ?) will be listed. The pattern should typically conform to the XLFD (X Logical Font Description) naming convention.

DESCRIPTION

fslsfonts is a utility designed to list fonts available from an X font server (fs). It connects to the specified font server, or the default one, and queries it for a list of font names it serves. Users can specify patterns to filter the font list and choose different output formats, from simple names to detailed font properties. This command is particularly useful for system administrators managing X font servers and for users debugging font-related issues within an X environment. While its direct relevance has waned with the shift towards client-side font rendering, it remains a valuable tool for legacy X font server setups.

CAVEATS

fslsfonts relies on an active and accessible X font server (fs). If no font server is running or if connection cannot be established, the command will fail or report an error. Its utility has decreased significantly in modern Linux/X environments, which predominantly use client-side font rendering libraries (like Fontconfig and FreeType) that directly access font files on the local filesystem, bypassing the need for a separate font server. Therefore, it is less commonly used in contemporary desktop setups.

DEFAULT FONT SERVER

By default, fslsfonts attempts to connect to the font server specified by the FONTSERVER environment variable. If this variable is not set, it typically defaults to unix/:7100 for a local connection to the X font server's standard Unix domain socket, or a specified hostname and port for remote servers. The standard network port for an X font server is 7100.

FONT NAMING CONVENTION

Fonts listed by fslsfonts are typically identified using the XLFD (X Logical Font Description) naming convention. This is a very detailed, 14-field specification that describes various properties of a font, including foundry, family, weight, slant, pixel size, point size, and character set. Understanding XLFD is key to effectively using the -fn option with patterns.

HISTORY

fslsfonts is a part of the X.Org (and previously XFree86) distribution. It emerged in an era where centralized font servers (fs) were a common and efficient way to provide fonts to multiple X clients across a network, particularly in environments with limited local storage or shared resources. Its usage has diminished as modern X applications and desktop environments have largely transitioned to client-side font rendering, relying on libraries such as Fontconfig and FreeType to manage and render fonts directly from local font files, making centralized font servers less critical.

SEE ALSO

fs(1), font_util(7), xlsfonts(1), xset(1)

Copied to clipboard