xtotroff(1)

xtotroff1

Convert x font metrics into groff font metrics

Usage

xtotroff [-d destination-directory] [-r resolution] [-s type-size] font-map

xtotroff --help

xtotroff -v

xtotroff --version

Overview

xtotroff uses font-map to create groff(1) font description files from X11 fonts. Each line in font-map pairs a groff font name with an X font name as an X Logical Font Description (XLFD) pattern. The pair's members are separated by spaces and/or tabs. For example, an input font-map file consisting of the line

TB -adobe-times-bold-r-normal--*-*-*-*-p-*-iso8859-1

maps the XLFD on the right to the groff font name TB, conventionally “Times bold”.

xtotroff opens a connection to the running X server to query its font catalog, and aborts if it cannot. If necessary, the wildcards in the XLFD patterns are populated with the arguments to the -r and -s options. If a font name is still ambiguous, xtotroff aborts. For each successful mapping, xtotroff creates a groff font description file in the current working directory (or that specified by the -d option) named for each groff font, and reports the mapping to the standard output stream.

Options

--help displays a usage message, while -v and --version show version information; all exit afterward.

-d destination-directory

Write font descriptions to destination-directory rather than the current working directory.

-r resolution

Set the resolution for all font patterns in font-map. The value is used for both the horizontal and vertical motion quanta. If not specified, a resolution of 75dpi is assumed.

-s type-size

Set the type size in points for all font patterns in font-map. If not specified, a size of 10 points is assumed.

Exit status

xtotroff exits with status 0 on successful operation, status 2 if the program cannot interpret its command-line arguments, and status 1 if it encounters an error during operation.

Files

/usr/share/groff/1.24.2/font/FontMap-X11

is the font mapping file used to produce the pre-generated font description files, supplied with groff, of X11 core fonts corresponding to the 13 base Type 1 fonts for PostScript level 1.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 8 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

-d since Debian 13 (Trixie).

--help until Debian 12 (Bookworm); --version until Debian 12 (Bookworm); -v until Debian 12 (Bookworm).

Bugs

The only supported font encodings are “iso8859-1” and “adobe-fontspecific”.

From groff 1.24.2-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.