TTFAUTOHINT(1)

πŸ“¦
version 1.8.4 Β· 2 versions
  • 1.8.4 Β· debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.8.3 Β· debian bookworm, ubuntu jammy
, in debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

ttfautohint β€” bestie, it slaps brand-new, auto-generated hints onto a TrueType font πŸ’…

(also hi, this is from the User Commands part of the manual, in case you were wondering where you wandered into 🫢)


🌸 SYNOPSIS 🌸

ttfautohint [OPTION]... [IN-FILE [OUT-FILE]]

πŸ’– DESCRIPTION πŸ’–

okay so here's the whole vibe: this thing takes the hints in a TrueType font called IN-FILE, throws them out, and writes the result to OUT-FILE. no cap.

and if OUT-FILE isn't there? standard output gets it instead, periodt. and if IN-FILE isn't there either? then it's standard input AND standard output, both, together, iconic behavior honestly.

the new hints are based on FreeType's auto-hinter. that's the whole secret sauce.

this program is basically a simple front-end to the ttfautohint library. like, the library does the heavy lifting, this is the little outfit it wears to go out ✨

oh and speaking of outfits β€” long options can be given with one OR two dashes, and with OR without the equal sign between the option and its argument. so all of these forms are acceptable: -foo=bar, --foo=bar, -foo bar, --foo bar. it's giving flexible 🌈

also: mandatory arguments to long options are mandatory for short options too. no shortcuts on the shortcuts, sorry bestie 😭


πŸ’… OPTIONS πŸ’…

  • --debug β€” prints out debugging information, for when you need to see the behind-the-scenes drama 🎬
  • -a, --stem-width-mode=S β€” picks the stem width mode for grayscale, GDI ClearType, and DW ClearType. here S is a string of three letters, and the possible values are n for natural, q for quantized, and s for strong (default: qsq)
  • -c, --composites β€” hints glyph composites too, not just the regular ones 🧚
  • -d, --dehint β€” removes all hints. all of them. gone. bye πŸ’€
  • -D, --default-script=S β€” sets the default OpenType script (default: latn)
  • -f, --fallback-script=S β€” sets the fallback script (default: none)
  • -F, --family-suffix=S β€” appends a suffix to the family name string(s) in the name table
  • -G, --hinting-limit=N β€” switches hinting off above this PPEM value (default: 200); a value of 0 means no limit at all, go wild
  • -h, --help β€” displays this help and exits, the classic
  • -H, --fallback-stem-width=N β€” sets the fallback stem width (default: 50 font units at 2048 UPEM)
  • -i, --ignore-restrictions β€” overrides font license restrictions ⚠️ (read the notes below before you even think about it)
  • -I, --detailed-info β€” adds 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 β€” gets control instructions from FILE
  • -n, --no-info β€” does NOT add ttfautohint info to the version string(s) in the name table
  • -p, --adjust-subglyphs β€” handles subglyph adjustments in exotic fonts πŸ¦‹
  • -r, --hinting-range-max=N β€” the maximum PPEM value for hint sets (default: 50)
  • -R, --reference=FILE β€” derives blue zones from the reference font FILE
  • -s, --symbol β€” the input is a symbol font
  • -S, --fallback-scaling β€” uses fallback scaling, not hinting
  • -t, --ttfa-table β€” adds a TTFA information table
  • -T, --ttfa-info β€” displays the TTFA table in IN-FILE and exits
  • -v, --verbose β€” shows progress information, so you're not just staring at a silent cursor 🫢
  • -V, --version β€” prints version information and exits
  • -W, --windows-compatibility β€” adds blue zones for usWinAscent and usWinDescent so nothing gets clipped βœ‚οΈ
  • -x, --increase-x-height=N β€” increases x height for sizes in the range 6<=PPEM<=N; a value of 0 switches this feature off (default: 14)
  • -X, --x-height-snapping-exceptions=STRING β€” specifies a comma-separated list of x-height snapping exceptions, for example "-9, 13-17, 19" (default: "")
  • -Z, --reference-index=N β€” face index of the 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, fr fr. the PPEM value used for option -p is FUnits per em, normally 2048. and with option -s, use default values for standard stem width and height β€” otherwise they get derived from script-specific characters that resemble the shape of the character o. cute, right?

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, which usually increases 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). and increasing the value of -G does NOT increase the output font size β€” so that one's free, bestie πŸ’…

πŸŽ€ the scripts situation πŸŽ€

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, those glyphs get hinted; but if option -S is set, they're 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)

🧚 the control instructions file 🧚

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, and <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, and 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. (so you can vibe-format your file however you want 🫢)

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.

oh also β€” there's a GUI version of this program and it's called ttfautohintGUI πŸŽ€


🫢 REPORTING BUGS 🫢

found a bug? tell the devs, they wanna know:

report bugs to: freetype-devel@nongnu.org

ttfautohint home page: https://www.freetype.org/ttfautohint


Copyright Β© 2011-2021 Werner Lemberg <wl@gnu.org>. License: FreeType License (FTL) or GNU GPLv2.

this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law. πŸ’€


okay bestie that's the whole page, you're officially a ttfautohint girlie now πŸ’–βœ¨

this was ttfautohint 1.8.4, from August 2021 β€” mwah, go hint something gorgeous πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from