OS Manuals

/usr/bin/ttfautohint

ttfautohint provides a 99% automated hinting process and a platform for finely hand-hinting the last 1%.

From ttfautohint 1.8.4-r5 (os), captured 2026-11-05 by running ttfautohint --help (exit 0). permalink

Usage: ttfautohint [OPTION]... [IN-FILE [OUT-FILE]]
Replace hints in TrueType font IN-FILE and write output to OUT-FILE.
If OUT-FILE is missing, standard output is used instead;
if IN-FILE is missing also, standard input and output are used.

The new hints are based on FreeType's auto-hinter.

This program is a simple front-end to the `ttfautohint' library.

Long options can be given with one or two dashes,
and with and without equal sign between option and argument.
This means that the following forms are acceptable:
`-foo=bar', `--foo=bar', `-foo bar', `--foo bar'.

Mandatory arguments to long options are mandatory for short options too.

Options:
      --debug                print debugging information
  -a, --stem-width-mode=S    select stem width mode for grayscale, GDI
                             ClearType, and DW ClearType, where S is a
                             string of three letters with possible values
                             `n' for natural, `q' for quantized, and `s'
                             for strong (default: qsq)
  -c, --composites           hint glyph composites also
  -d, --dehint               remove all hints
  -D, --default-script=S     set default OpenType script (default: latn)
  -f, --fallback-script=S    set fallback script (default: none)
  -F, --family-suffix=S      append suffix to the family name string(s)
                             in the `name' table
  -G, --hinting-limit=N      switch off hinting above this PPEM value
                             (default: 200); value 0 means no limit
  -h, --help                 display this help and exit
  -H, --fallback-stem-width=N
                             set fallback stem width
                             (default: 50 font units at 2048 UPEM)
  -i, --ignore-restrictions  override font license restrictions
  -I, --detailed-info        add detailed ttfautohint info
                             to the version string(s) in the `name' table
  -l, --hinting-range-min=N  the minimum PPEM value for hint sets
                             (default: 8)
  -m, --control-file=FILE    get control instructions from FILE
  -n, --no-info              don't add ttfautohint info
                             to the version string(s) in the `name' table
  -p, --adjust-subglyphs     handle subglyph adjustments in exotic fonts
  -r, --hinting-range-max=N  the maximum PPEM value for hint sets
                             (default: 50)
  -R, --reference=FILE       derive blue zones from reference font FILE
  -s, --symbol               input is symbol font
  -S, --fallback-scaling     use fallback scaling, not hinting
  -t, --ttfa-table           add TTFA information table
  -T, --ttfa-info            display TTFA table in IN-FILE and exit
  -v, --verbose              show progress information
  -V, --version              print version information and exit
  -W, --windows-compatibility
                             add blue zones for `usWinAscent' and
                             `usWinDescent' to avoid clipping
  -x, --increase-x-height=N  increase x height for sizes in the range
                             6<=PPEM<=N; value 0 switches off this feature
                             (default: 14)
  -X, --x-height-snapping-exceptions=STRING
                             specify a comma-separated list of
                             x-height snapping exceptions, for example
                             "-9, 13-17, 19" (default: "")
  -Z, --reference-index=N    face index of reference font (default: 0)

The program accepts both TTF and TTC files as input.
Use option -i only if you have a legal permission to modify the font.
The used PPEM value for option -p is FUnits per em, normally 2048.
With option -s, use default values for standard stem width and height,
otherwise they are derived from script-specific characters
resembling the shape of character `o'.

A hint set contains the optimal hinting for a certain PPEM value;
the larger the hint set range (as given by options -l and -r),
the more hint sets get computed, usually increasing the output font size.
The `gasp' table of the output file always enables grayscale hinting
for all sizes (limited by option -G, which is handled in the bytecode).
Increasing the value of -G does not increase the output font size.

Options -f and -D take a four-letter string that identifies a script.
Option -f sets the script used as a fallback for glyphs that can't be
associated with a known script.  By default, such glyphs are hinted;
if option -S is set, they are scaled only instead.  Option -D sets the
default script for handling OpenType features.

Possible four-letter string values are

  adlm (Adlam),
  arab (Arabic),
  armn (Armenian),
  avst (Avestan),
  bamu (Bamum),
  beng (Bengali),
  buhd (Buhid),
  cakm (Chakma),
  cans (Canadian Syllabics),
  cari (Carian),
  cher (Cherokee),
  copt (Coptic),
  cprt (Cypriot),
  cyrl (Cyrillic),
  deva (Devanagari),
  dsrt (Deseret),
  ethi (Ethiopic),
  geor (Georgian (Mkhedruli)),
  geok (Georgian (Khutsuri)),
  glag (Glagolitic),
  goth (Gothic),
  grek (Greek),
  gujr (Gujarati),
  guru (Gurmukhi),
  hebr (Hebrew),
  hmnp (Nyiakeng Puachue Hmong),
  kali (Kayah Li),
  khmr (Khmer),
  khms (Khmer Symbols),
  knda (Kannada),
  lao (Lao),
  latn (Latin),
  latb (Latin Subscript Fallback),
  latp (Latin Superscript Fallback),
  lisu (Lisu),
  mlym (Malayalam),
  medf (Medefaidrin),
  mong (Mongolian),
  mymr (Myanmar),
  nkoo (N'Ko),
  olck (Ol Chiki),
  orkh (Old Turkic),
  osge (Osage),
  osma (Osmanya),
  rohg (Hanifi Rohingya),
  saur (Saurashtra),
  shaw (Shavian),
  sinh (Sinhala),
  sund (Sundanese),
  taml (Tamil),
  tavt (Tai Viet),
  telu (Telugu),
  tfng (Tifinagh),
  thai (Thai),
  vaii (Vai),
  yezi (Yezidi),
  none (no script).

A control instructions file contains entries of the form

  [<font idx>] <script> <feature> @ <glyph ids>

  [<font idx>] <script> <feature> w <stem widths>

  [<font idx>] <glyph id> l|r <points> [(<left offset>,<right offset>)]

  [<font idx>] <glyph id> n <points>

  [<font idx>] <glyph id> t|p <points> [x <shift>] [y <shift>] @ <ppems>

<font idx> is the current subfont, <glyph id> is a glyph name or index,
<glyph ids> is a set of <glyph id>s, <stem widths> is an unordered set of
integer stem widths in font units, <shift> is a real number in px,
<points> and <ppems> are integer ranges as with option `-X'.

<script> and <feature> are four-letter tags that define a style
the <glyph ids> are assigned to; possible values for <script> are the same
as with option -D, possible values for <feature> are

  c2cp (petite capitals from capitals),
  c2sc (small capitals from capitals),
  ordn (ordinals),
  pcap (petite capitals),
  ruby (ruby),
  sinf (scientific inferiors),
  smcp (small capitals),
  subs (subscript),
  sups (superscript),
  titl (titling).

`w' assigns stem widths to a style; the first value sets the default.
`l' (`r') creates one-point segments with direction left (right).
<left offset> and <right offset> specify offsets (in font units)
relative to the corresponding points to give the segments a length.
`n' removes points from horizontal segments, making them `weak' points.
`t' (`p') applies delta exceptions to the given points before (after) IUP.

`#' starts a line comment, which gets ignored.
Empty lines are ignored, too.

Key letters `l', `r', `n', `p', `t', `w', `x', and `y'
have the verbose aliases `left', `right', `nodir', `point', `touch',
`width', `xshift', and `yshift', respectively.

A GUI version of this program is called `ttfautohintGUI'.

Report bugs to: freetype-devel@nongnu.org

ttfautohint home page: <https://www.freetype.org/ttfautohint>
Options (28)
OptionDescriptionSource
--debugprint debugging informationhelp
-a, --stem-width-mode Sselect stem width mode for grayscale, GDI ClearType, and DW ClearType, where S is a string of three letters with possible values `n' for natural, `q' for quantized, and `s' for strong (default: qsq)help
-c, --compositeshint glyph composites alsohelp
-d, --dehintremove all hintshelp
-D, --default-script Sset default OpenType script (default: latn)help
-f, --fallback-script Sset fallback script (default: none)help
-F, --family-suffix Sappend suffix to the family name string(s) in the `name' tablehelp
-G, --hinting-limit Nswitch off hinting above this PPEM value (default: 200);help
-h, --helpdisplay this help and exithelp
-H, --fallback-stem-width Nset fallback stem width (default: 50 font units at 2048 UPEM)help
-i, --ignore-restrictionsoverride font license restrictionshelp
-I, --detailed-infoadd detailed ttfautohint info to the version string(s) in the `name' tablehelp
-l, --hinting-range-min Nthe minimum PPEM value for hint sets (default: 8)help
-m, --control-file FILEget control instructions from FILEhelp
-n, --no-infodon't add ttfautohint info to the version string(s) in the `name' tablehelp
-p, --adjust-subglyphshandle subglyph adjustments in exotic fontshelp
-r, --hinting-range-max Nthe maximum PPEM value for hint sets (default: 50)help
-R, --reference FILEderive blue zones from reference font FILEhelp
-s, --symbolinput is symbol fonthelp
-S, --fallback-scalinguse fallback scaling, not hintinghelp
-t, --ttfa-tableadd TTFA information tablehelp
-T, --ttfa-infodisplay TTFA table in IN-FILE and exithelp
-v, --verboseshow progress informationhelp
-V, --versionprint version information and exithelp
-W, --windows-compatibilityadd blue zones for `usWinAscent' and `usWinDescent' to avoid clippinghelp
-x, --increase-x-height Nincrease x height for sizes in the range 6<=PPEM<=N;help
-X, --x-height-snapping-exceptions STRINGspecify a comma-separated list of x-height snapping exceptions, for example "-9, 13-17, 19" (default: "")help
-Z, --reference-index Nface index of reference font (default: 0)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.