MFTRACE(1)

πŸ“¦
version 1.2.20+git20250330.c94ecaa Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MFTRACE(1) β€” like, the manual page, bestie πŸ’–

okay so you found mftrace in the General Commands Manual and you're like "what is this" β€” don't worry, I got you. sit down, grab a strawberry πŸ“, we're doing this.


✨ NAME ✨

mftrace β€” it converts METAFONT format fonts into Type1 outline fonts. that's it. that's the whole job. iconic honestly πŸ‘‘


🌸 SYNOPSIS 🌸

mftrace [options] fontname

πŸ¦‹ DESCRIPTION πŸ¦‹

so mftrace is a program that can convert a METAFONT font into a Type1 font. you literally just call it with the name of the font (and bestie, without a .mf suffix, ok? don't do that) and it produces a Type1 font file called either fontname.pfa or fontname.pfb depending on the command line options. and with the help of fontforge(1) it can produce other font formats too. versatile queen πŸ’…

for tracing the bitmap, mftrace either uses potrace(1) or autotrace(1) β€” and it prefers potrace, the former, if it's available. this can be overridden with the --autotrace and --potrace command line options. slay, choices ✨


πŸŽ€ OPTIONS πŸŽ€

this program follows the usual GNU command line syntax, with long options starting with two dashes (-). yes only two. one dash is for short options, we're not animals.

  • -k, --keep β€” Keep all output in directory mftrace.dir. (yes that's the literal directory name, it's giving hoarder but make it organized 🫢)
  • --magnification=MAG β€” The magnification to use for the PFA file. The default is 1000. the tea here: the larger the magnification, the more precise the PFA file will be. but β€” and this is the important part β€” if the magnification is too large METAFONT can crash with overflow errors. πŸ’€

Sadly, many MF fonts contain resolution checks like

if dots_per_inch * design_size > 1500:

This check is susceptible to overflow errors. Such code should be reported as a bug, and changed to

if dots_per_inch > (1500 / design_size):

like, write it down, screenshot it, send it to the font author, it's a whole thing 😭

  • --formats=FMT1,FMT2,... β€” Specify which formats to generate (default is pfa). Choices are: afm, pfa, pfb, ttf, svg. Note that fontforge must be installed to generate any format except pfa or pfb. And for generating afm you need either fontforge or ghostscript. so like, plan accordingly bestie 🌈
  • --simplify β€” This passes the created Type1 font to fontforge to simplify and autohint it. glow-up service, essentially πŸ’…
  • --gffile=FILE β€” Use generic font file FILE instead of running Metafont. (GF is the default output format of Metafont, iykyk.)
  • -I DIR, --include=DIR β€” Add DIR to the current path for searching files.
  • --glyphs=LIST β€” Process only these glyphs. LIST is a comma separated list of decimal numbers or ranges, for example 1-10,50,55,90-100. cherry-picking, we love to see it πŸ“
  • --tfmfile=FILE β€” Use FILE for the TFM file. (The default is to use fontname.tfm.)
  • -e ENC, --encoding=ENC β€” Use encoding file ENC. Encoding files used by mftrace are basically in the GhostScript/dvips format, but you may use a special .notavail glyph name in order to tell mftrace not to process a specific glyph. If this option is not specified, mftrace tries to determine the encoding file automatically, from the encoding specified in the TFM file, the default being tex256.enc. so chill of it to figure it out itself 🧚
  • --keep-trying β€” Try to continue if external programs called by mftrace fail. If METAFONT crashes with overflow errors, but nevertheless outputs a GF file, try to process its output as is (useful for some buggy fonts, see above πŸ‘€). If potrace or autotrace fail to trace a specific character, first try it with a less smoothed curve, and if that fails, skip the character. By default, mftrace leaves a file trace-bug-font-char.pbm and stops the process with a request to file a bugreport. so like, it's the "we don't give up" mode, main character energy πŸ”₯
  • --dos-kpath β€” Try to use MikTeX's version of kpsewhich.
  • --potrace β€” Use potrace for tracing bitmaps. The default is to use potrace if it is found, otherwise to use autotrace.
  • --autotrace β€” Use autotrace for tracing bitmaps.
  • --no-afm β€” Don't read the AFM file to find font information.
  • --noround β€” Do not round coordinates of control points to integer values (use with --grid). Disabled by default.
  • --grid=GRID β€” Set reciprocal grid size in em units multiplied by ratio magnification/1000. For example, --grid 10 --magnification 1000 rounds coordinates of control points to 1/10th of the em unit. Useful simultaneously with the --noround option. Default GRID value is 1, i.e., round to integer. This option is only used with potrace.
  • -D, --define=SYMBOL=VALUE β€” Set the font info SYMBOL to the given VALUE. For example, -DFamilyName=Foo sets the font family name to Foo. mftrace tries to fill in sensible default values for the FontName, FamilyName, FullName and Weight fields. it's out here doing your homework for you 🫢
  • -V, --verbose β€” Be verbose. talk to me, tell me everything πŸ—£οΈ
  • -h, --help β€” Show summary of options.
  • -v, --version β€” Show version of program.
  • -w, --warranty β€” Show warranty and copyright.

You may redistribute copies of mftrace under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. (yes, all caps, they meant it, no cap.)

This manual page is copyright Β© 2005,2006,2007 Julian Gilbey and is distributed under the GNU General Public License too.


🌈 SEE ALSO 🌈

mf(1), autotrace(1), potrace(1), fontforge(1).


πŸ’œ AUTHOR πŸ’œ

mftrace was written by Han-Wen Nienhuys <hanwen@xs4all.nl>. This manual page was originally written by Julian Gilbey <jdg@debian.org> and has been revised by Werner Lemberg <wl@gnu.org>.


and that's the whole page bestie!! ✨ this was the MFTRACE(1) page from January 23, 2007 β€” yeah it's an elder but it's still serving πŸ’… go trace some fonts, you got this πŸŽ€πŸ¦‹πŸ’–