LinuxCommandLibrary

t1disasm

Disassemble Type 1 font files

SYNOPSIS

t1disasm [-a | -b] [-d] [-h] [-u | -U] [-g glyphs] [-o outfile] [fontfile ...]

PARAMETERS

-a
    Disassemble the font programs into a PostScript ASCII (PFA) format, even if the input is PFB. This is the default if neither -a nor -b is specified for a PFB input.

-b
    Disassemble the font programs into a PostScript binary (PFB) format, primarily for binary PostScript data sections. Mutually exclusive with -a.

-d
    Disassemble charstrings. This option provides a detailed breakdown of the drawing commands for each glyph.

-h
    Display a brief help message and exit.

-u
    Undefine all PostScript commands before disassembly. This can simplify the output by showing raw PostScript instructions.

-U
    Undefine all PostScript commands and operators before disassembly. A more aggressive version of -u, yielding even more primitive output. Mutually exclusive with -u.

-g glyphs
    Disassemble only the specified glyphs. glyphs should be a comma-separated list of glyph names (e.g., 'A,B,C').

-o outfile
    Write the disassembled output to outfile instead of standard output (stdout).

fontfile ...
    One or more input Type 1 font files to be disassembled. If no fontfile is specified, t1disasm reads from standard input (stdin).

DESCRIPTION

t1disasm is a command-line utility from the t1utils suite designed to decompile or disassemble Adobe Type 1 font programs. It takes one or more Type 1 font files, typically in PFA (PostScript Font ASCII) or PFB (PostScript Font Binary) format, and outputs a human-readable representation of the font's internal structure and character drawing commands (charstrings).

This tool is invaluable for font developers, typographers, or anyone needing to inspect the low-level PostScript instructions that define glyph shapes within Type 1 fonts. It helps in debugging font rendering issues, understanding font metrics, or reverse-engineering font construction for analysis, although the output is for inspection and not directly reconstructible into an editable font file.

CAVEATS

This command specifically targets Adobe Type 1 fonts. It is not designed for and will not work with other font formats like TrueType (.ttf), OpenType (.otf), or web fonts (.woff, .woff2).

The output is a low-level PostScript representation, which requires familiarity with PostScript language and Type 1 font structure to fully interpret. It is primarily for analysis and debugging, not for direct font editing or conversion to other formats without further processing.

INPUT/OUTPUT FLEXIBILITY

t1disasm can read font data from one or multiple specified files. If no input file is given, it gracefully reads from standard input, allowing it to be used in pipes for more complex command sequences. By default, output is sent to standard output, making it easy to pipe to other commands (e.g., less, grep) or redirect to a file using the -o option.

PURPOSE AND USAGE

The primary purpose of t1disasm is to aid in the analysis and debugging of Type 1 fonts. Font developers might use it to verify charstring definitions, debug incorrect glyph rendering, or understand how hinting instructions are applied. Users encountering issues with Type 1 fonts in PostScript-based workflows might use it to diagnose problems by inspecting the font's internal structure.

HISTORY

t1disasm is part of the t1utils package, a collection of utilities for manipulating Adobe Type 1 fonts. These tools originated from Adobe Systems and were later released as open-source software, becoming a staple in the Unix/Linux font toolchain. Developed during a period when Type 1 fonts were dominant in desktop publishing, t1disasm has provided essential capabilities for inspecting and understanding these complex font structures for decades. While the importance of Type 1 fonts has waned with the rise of OpenType, t1disasm remains valuable for working with legacy projects or specific PostScript workflows.

SEE ALSO

t1ascii(1), t1binary(1), t1testpage(1), fontforge(1), gs(1)

Copied to clipboard