LinuxCommandLibrary

figlist

List available figlet fonts

TLDR

List all available fonts using the default font directory

$ figlist
copy

List fonts from a custom directory
$ figlist -d [path/to/directory]
copy

Search for a font by keyword
$ figlist -d [path/to/directory] | grep [keyword]
copy

Count the total number of available fonts in a specified directory
$ figlist -d [path/to/directory] | wc [[-l|--lines]]
copy

SYNOPSIS

figlist [-h] [-v] [-p] [file.fig]

PARAMETERS

-h
    Display help message and exit.

-v
    Print version information and exit.

-p
    Print only the page size from the Fig header.

file.fig
    Input Fig file; reads from stdin if omitted.

DESCRIPTION

The figlist command is a utility from the transfig package used to display the internal structure of Fig files in a human-readable format. Fig files (.fig) are the native format for xfig, a popular vector graphics editor for creating technical diagrams, schematics, and illustrations on Unix-like systems.

Running figlist on a Fig file parses its binary or text content and outputs details such as the file header (#FIG identifier, version, page size), followed by a list of drawing objects. Each object includes attributes like subtype (e.g., ellipse, line, spline), line style, thickness, color, depth, area fill, style, pen color, fill color, number of points, and coordinates for each point.

This is invaluable for debugging Fig files, inspecting object hierarchies, or scripting modifications without opening xfig. Output mimics the Fig file format but with added readability, making it easier to understand complex drawings. If no file is specified, it reads from standard input, supporting piping from other tools.

Common use cases include verifying exported diagrams, analyzing legacy Fig archives, or integrating with conversion workflows via fig2dev.

CAVEATS

Output is verbose for complex drawings; Fig files must be valid or parsing may fail silently. Limited to Fig format versions supported by transfig (primarily 3.0 and 4.0). Not suitable for editing, use xfig or fig2dev instead.

EXAMPLE USAGE

figlist example.fig
Outputs full structure.

figlist -p example.fig
Shows only: Landscape 800 600 (page size).

OUTPUT FORMAT

Starts with #FIG <version>
Papersize: <width> <height>
Then per-object lines like:
2 1 0 1 0 7 50 -1 -1 0 0 4 100 100 200 200 300 300 400 400

HISTORY

Developed as part of the transfig suite in the early 1990s by Micah Beck and others to support Fig file manipulation. Evolved with xfig releases; current versions in transfig 3.2.x handle modern Fig specs. Widely used in academic and engineering environments for Unix graphics workflows.

SEE ALSO

xfig(1), fig2dev(1), transfig(1)

Copied to clipboard