xtotroff(1)

πŸ’– xtotroff β€” NAME πŸ’–

okay bestie, so xtotroff is literally the glow-up artist that takes X font metrics and turns them into groff font metrics. it's giving translator, but make it fonts ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

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

xtotroff --help

xtotroff -v

xtotroff --version

🌸 DESCRIPTION 🌸

so here's the tea: xtotroff takes your font-map and uses it to create groff(1) font description files out of X11 fonts. iconic behavior fr fr.

every single line in font-map pairs a groff font name with an X font name, and that X font name is written as an X Logical Font Description (XLFD) pattern. the two members of the pair get separated by spaces and/or tabs β€” no cap. for example, if your input font-map file is just this one line:

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

then it maps the XLFD on the right to the groff font name TB, which is conventionally called β€œTimes bold”. periodt πŸ’…

xtotroff opens a connection to the running X server to go query its font catalog, and if it can't do that, it aborts. πŸ’€ if necessary, the wildcards in the XLFD patterns get populated with the arguments you passed to -r and -s. and if a font name is still ambiguous after all that? yeah, xtotroff aborts again. no vibes.

for each successful mapping, xtotroff creates a groff font description file named after each groff font, and drops it in the current working directory (or wherever -d tells it to go), then reports the mapping to the standard output stream. we love a queen who narrates her work 🫢


✨ OPTIONS ✨

  • --help β€” shows you a usage message. meanwhile -v and --version spill the version info. all of them exit right afterward, so they're like a lil one-and-done moment.
  • -d destination-directory β€” write the font descriptions to destination-directory instead of the current working directory. basically "not here, bestie, put it over there."
  • -r resolution β€” sets the resolution for all font patterns in font-map. the value gets used for both the horizontal and vertical motion quanta. if you don't specify it, a resolution of 75dpi is assumed. she's got a default and she's sticking to it.
  • -s type-size β€” sets the type size in points for all font patterns in font-map. if you don't specify it, a size of 10 points is assumed.

πŸ‘‘ EXIT STATUS πŸ‘‘

  • status 0 β€” successful operation, we ate and left no crumbs ✨
  • status 2 β€” the program cannot interpret its command-line arguments
  • status 1 β€” it encountered an error during operation 😭

πŸŽ€ FILES πŸŽ€

  • /usr/share/groff/1.24.2/font/FontMap-X11 β€” this 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. she's the blueprint, the main character reference sheet πŸ’œ

πŸ’€ BUGS πŸ’€

the only supported font encodings are β€œiso8859-1” and β€œadobe-fontspecific”. that's it. that's the whole list. don't come at her with anything else πŸ™ˆ


🌈 SEE ALSO 🌈


groff 1.24.2 β€” 2026-10-04 β€” yeah bestie this whole thing is from the groff 1.24.2 era, dated 2026-10-04, and that's the sign-off, mwah πŸ’‹ go convert some fonts, you got this πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from