TTFAutohint: Making Hinting Fast, Easy, and Global (TypeCon 2016)

65c68dcaace6962cd1353c270eb0801b?s=47 Dave Crossland
August 27, 2016

TTFAutohint: Making Hinting Fast, Easy, and Global (TypeCon 2016)

TypeCon 2016 Program Summary:

Hinting TrueType fonts can be a slow and expensive process, especially for multiscript projects with 1,000s of glyphs, but it is required by Windows. Sadly, many TTFs completely lack hinting after a simple conversion from OTF. TTFAutohint provides reasonable quality hinting in an instant, and sets a foundation for hand adjusting for ultimate hinting quality.

In 2010 Dave Crossland suggested to Werner Lemberg, the primary developer of FreeType, the idea of extending FreeType’s rendering system into a TTF autohinter, so that all fonts could look good on Windows.

Werner made a prototype that had promising results, and he since raised over $100,000 from individual professional type designers and with support from Adobe, Microsoft, Google, Extensis WebInk (RIP), FontLab, RoboFont and Glyphs.

In this session you will see the quality of hinting that TTFAutohint can produce for various scripts, learn tips on using it with your favorite font editor, and hear about the project’s future.

Presentation reported at LWN:


Dave Crossland

August 27, 2016


  1. TTFAutohint Makes Hinting Fast + Easy + Global Dave Crossland
  2. Disclaimer

  3. 2011

  4. Google Fonts

  5. Vernon Adams

  6. “1 font per week, sure.”

  7. TrueType Hinting is hard.

  8. FreeType

  9. 1999 Apple Patents

  10. David Turner’s FreeType Autofit

  11. None

  13. Werner Lemberg

  14. Werner Lemberg “It works!”

  15. Kickstarter

  16. Kickstarter

  17. Kickstarter Pledgie

  18. None
  19. None
  20. 2012 Göran Söderström (Letters from Sweden) reviewed v0.6

  21. None
  22. None
  23. “Look at all the i letters, they have become l

    letters. Look at the f letters, they are not very readable. Some letters (like u) have two pixels in the bottom stem instead of one which similar letters have.”
  24. None
  25. None
  26. “With not too much more effort, autohinting directly in FontLab

    can produce the same kind of result as ttfautohint, but with the major advantage that the hints are editable directly after the autohinting process, so I can’t really see the point of using ttfautohint at all.” – Göran Söderström
  27. $ ./ttfautohint 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. Options: --debug print debugging information -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 ...
  28. -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) -s, --symbol input is symbol font -t, --ttfa-table add TTFA information table -v, --verbose show progress information -V, --version print version information and exit -w, --strong-stem-width=S use strong stem width routine for modes S, where S is a string of up to three letters with possible values `g' for grayscale, `G' for GDI ClearType, and `D' for DirectWrite ClearType (default: G) -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: "") 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'.
  29. 2012

  30. GUI

  31. GUI Frederik Berlaen TypeMyType, RoboFont

  32. From: Frederik Berlaen <> Date: August 16, 2012 7:58:23 AM

    EDT To: Eben Sorkin <> Subject: ttfautohint UI He Eben quickly sketched out a UI that is fitting the human guidelines look at the aligment of various UI elements and I guess it makes more sense and very straight forward and clear to users I can provide you some quides how to built and app but only for mac with python - vanilla - py2app I know that is a big restriction but I dont have time to learn and test other frameworks, languages and OSs hope this helps good luck
  33. None
  34. None
  35. 2013

  36. “It works!”

  37. None
  38. None
  39. 2014

  40. v1.0 It works!

  41. “With not too much more effort, autohinting directly in FontLab

    can produce the same kind of result as ttfautohint, but with the major advantage that the hints are editable directly after the autohinting process, so I can’t really see the point of using ttfautohint at all.” – Göran Söderström
  42. A control instructions file contains entries of the form [<font

    idx>] <script> <feature> @ <glyph ids> [<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, <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). `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', `x', and `y' have the verbose aliases `left', `right', `nodir', `point', `touch', `xshift', and `yshift'.
  43. None
  44. None
  45. None
  46. None
  47. Halant-Regular.txt: Q left 38 $ ttfautohint -m Halant-Regular.txt \ Halant-Regular.ttf

    \ Halant-Regular-ah.ttf;
  48. None
  49. None
  50. tatus/719086898065600512

  51. One Small Trick

  52. None
  53. None
  54. One Small Trick Create a one-point segment at the bowl’s

    base to position it at the baseline
  55. None
  56. 2015

  57. None
  58. None
  59. None
  60. Google Fonts

  61. “15 writing systems, sure.”


  63. None
  64. None
  65. None
  66. 22 Latin, Arabic, Armenian, Bengali, Cherokee, Cyrillic, Devanagari, Ethiopic, Georgian,

    Greek, Gujarati, Gurmukhi, Hebrew, Kannada, Khmer, Lao, Malayalam, Myanmar, Sinhala, Tamil, Telugu, Thai
  67. 2016

  68. None
  69. None
  70. None
  71. Proza Libre Process

  72. None
  73. None
  74. None
  75. 2017?

  76. Family Harmony

  77. How to harmonize styles within a font family (eg, Regular

    and Bold)? Maybe, increase glyph height by one pixel
  78. But heights should be at crisp whole pixels, and be

    the same for each style in a family If we scale the whole glyph to increase x height by one pixel, then, the glyph overall grows by 1.1 – 2.0 pixels :(
  79. So, we will use *two* scaling values to distort the

    glyph non-linearly -z LIST_OF_SIZES increase the x height by one pixel for given PPEM values -Z LIST_OF_SIZES increase the glyph height by one pixel for given PPEM values
  80. -z = the lower part of a glyph gets scaled

    up, while the upper part gets scaled down to stay at the same height. -Z = the lower part stays the same, while the upper part gets scaled up to increase the size by one pixel -z & -Z = uniformly scale the whole glyph up by two pixels
  81. CJK

  82. CJK Belleve Invis’ sfd han autohint



  85. Help us

  86. Help us with the websites

  87. Thanks to...

  88. Werner Lemberg David Turner

  89. Google Fonts Android Google i18n FontLab Extensis

  90. Dave Arnold, Vernon Adams, Frederik Berlaen, Frank E. Blokland, James

    Cloos, Girish Dalvi, Erwin Denissen, Ralf S. Engelschall, Greg Hitchcock, Hirwen Harendal, Khaled Hosny, Wei Huang, Denis Jacquerye, Daniel Johnson, David Lemon, Karsten Lücke, Thomas Phinney, Thomas Rutter, Alexandre Saumier Demers, Marc Schönefeld, Eben Sorkin, Adam Twardoch, Jasper de Waard, Zack Weinberg, Benjamin Yang
  91. In memory of Vernon Adams 1967-2016


  93. Thanks