LinuxCommandLibrary

t1ascii

Convert Type 1 font to ASCII

SYNOPSIS

t1ascii [options] [input_file]

PARAMETERS

input_file
    The Type 1 font file to process. If omitted, t1ascii reads from standard input.

-a
    Adds font statistics as PostScript comments to the output.

-p
    Outputs a font header suitable for a bare font program.

-c
    Outputs currentfile PostScript statements for a bare font program, useful for embedding.

-m
    Outputs PostScript for a bare font program, mapping all characters to the notdef glyph.

-u
    Updates the /CharStrings dictionary for an existing PFA font.

-e encoding_file
    Writes the encoding array from the specified encoding_file into the font.

-r
    Writes currentfile PostScript statements for a resident font program.

-s
    Strips font statistics from the output.

-x
    Extracts just the font program (the binary part) from the font file.

-o output_file
    Directs the output to output_file instead of standard output.

--help
    Displays a help message and exits.

--version
    Displays version information and exits.

DESCRIPTION

t1ascii is a utility from the t1utils package designed to convert Adobe Type 1 font files from binary (PFB) format or an existing ASCII (PFA) format into a clean ASCII (PFA) format. This conversion makes the font data human-readable and suitable for editing, analysis, or use with tools that specifically require ASCII font descriptions. It primarily focuses on decompressing the binary font program part of a PFB file and presenting it as an ASCII PFA file. It also offers options to extract specific parts of the font or add/strip metadata, making it a valuable tool for font developers and system administrators working with Type 1 fonts.

CAVEATS

t1ascii primarily processes the font data itself and does not extensively parse or validate the surrounding PostScript code within the font file. It's focused on the font program's binary-to-ASCII conversion. Issues might arise with malformed PostScript wrappers, though the core font data conversion should generally be robust.

PURPOSE OF PFA/PFB FORMATS

PostScript Type 1 fonts can be stored in two main formats: PFB (Printer Font Binary), which is compressed and binary, and PFA (Printer Font ASCII), which is an ASCII representation. t1ascii's primary role is to convert PFB to PFA, making the font definition human-readable and editable.

FONT EDITING AND ANALYSIS

The ASCII PFA format produced by t1ascii is invaluable for inspecting the font's internal structure, character outlines, metrics, and PostScript code. This facilitates debugging, manual adjustments, or generating reports about a font's properties, especially for those involved in font development or customization.

HISTORY

t1ascii is a component of the t1utils software package, which was developed by I. Lee Hetherington. The t1utils suite provides a set of command-line tools for manipulating Adobe Type 1 fonts, which were a prevalent font format in PostScript and desktop publishing environments. These utilities, including t1ascii, were essential for font developers, system administrators, and users who needed to convert, inspect, or modify Type 1 fonts, especially for use with systems like TeX/LaTeX or PostScript printers. Its development stems from the need to manage these fonts in a Unix-like environment.

SEE ALSO

t1utils(1), t1asm(1), t1binary(1), t1disasm(1), t1mac(1), t1unmac(1), gs(1)

Copied to clipboard