New version 1.4 of TTFAutohint released

Richard FinkRichard Fink Posts: 165
edited October 2015 in Type Design Software
Werner posted about this new release at the tail end of another thread, but I think that's too hidden and that it rates it's own thread.
[  Cross posted from the Google Discuss Group:

Be advised that a new version - version 1.4 - of TTFA was released a few days ago.

This is substantial upgrade:

Version 1.4 (2015-Oct-04)

* Support for Thai and Lao scripts.

* Support for the Arabic script.

* Better support for scripts that contain superscript-like and
  subscript-like glyphs, e.g., the International Phonetic Alphabet (IPA).

* Accents and other `non-base' glyphs are now hinted without snapping to
  blue zones.

* A new control instruction syntax form was added to adjust the mapping
  between glyphs and styles.  Right now, its usage is quite limited; a
  forthcoming version will give much more flexibility.

* The `touch` keyword in a delta instructions file was buggy: If used for a
  point `P` at a ppem value `s`, it sometimes led to unwanted movements
  of `P` for ppem values unequal to `s`, thus causing outline distortions.


Note that the last bulleted item above is a rather nasty bug that got fixed and is documented in this previous thread on Typedrawers:

So if you use TTFA, downloading this version seems de rigeur.

Also, if you want to learn more about using TTFA, the Typedrawers thread begins with a link to a demonstration video showing how TTFA is used by designer Jasper de Waard. It was created by Jasper at Dave Crossland's request and it's very informative:

Much gratitude to TTFA's main developer Werner Lemberg.

And thanks also to Mike Duggan and Greg Hitchcock of Microsoft, as well as knowlegeable designers like David Berlow, who have all contributed their thoughts and ideas to make TTFA a better tool for all.


  • attarattar Posts: 209
    de rigeur.
    de rigueur
  • de rigueur
    ‘de rigueur’ is French and ‘de rigeur’ is Finks.
  • As Raymond Chandler once wrote:

    "The French have a phrase for it. The bastards have a phrase for everything and they are always right."

    I agree, but the spelling?  Mon dieu! My wife spent every summer in Switzerland - where her mom was from - from her early to late teens. I should have run it by her, dammit.

    (And for some reason, my Grammarly browser extension doesn't work in the text boxes on this forum. Don't know why. Bet it would have detected it, though. I'm gonna test that elsewhere.)

    Frank, Adrien -  I stand corrected!  Thanks. 

  • Hi Richard,

    My comment was purely pedantic. If I order a loaf of bread in France, I normally end up with a duck or a bucket with snails (it seems that one can eat these, well I don’t because I’m civilized) —if I’m lucky. Mon Dieu, mon amour, mon oncle! I don’t know what this all means anyway. 

  • Nguyen Mai AnNguyen Mai An Posts: 13
    edited October 2015

    I noticed that ttfautohint often have problems with the lowercase letters that have the accent tilde above. I have tried this version but it still there. I tried pretty many settings but the problem keep appearing.

    Anyone knows how to fix this?
  • I think you may be able to use this, to tweak the output

    --control-file=file, -m file (not in ttfautohintGUI)
    Specify the name of a control instructions file to manually tweak the hinting process. This feature can be used to correct glitches in ttfautohint’s hinting algorithm.
  • (If your letter+tilde are composites), Alternately you could hint the tilde in VTT and cut and paste that character's hints in using TTX. But it's a bit messy and you need to be careful. Easiest if you hint in VTT without referencing control values. 
  • Is it possible - well, it's always possible but it can be prohibitively problematic - to rescale the font so the glyphs take up more space within the em and so there are more pixels available for rendering?

    It looks very cramped at those small sizes.

    Might I ask what the x-height of the font is?

    Also, from where did you take the screen shot? What browser and OS version?

  • "Anyone knows how to fix this?"

    Well, the problem looks like incorrect minimum distances. You can fix it in the hints, of someone can fix it in the "memes" being used to define the hints. There are white or grey distances here that are wrong to have zero minimum distances.
  • David highlights some of the benefits of using a hint tool like VTT which can control the positioning of of pixels down to a very fine level. TTFautohint does a great job of getting the font 90% there, but to resolve these small (but not insignificant) problems a manual approach is usually the solution.

    Now what would be cool would be to autohint with TTFautohint then open the font into VTT to resolve these small problems using the functions that VTT has. I know there are incompatibilities but we can dream!
  • [BTW, version 1.4.1 of ttfautohint is out, fixing a serious bug w.r.t. control instructions if applied to accent-like characters.]

    The very problem with shapes like the tilde accent is that ttfautohint vertically modifies glyph shapes only (if at all) by a very small amount to avoid distortions. If you activate strong hinting (this is, integer point positions along the vertical axis, as necessary for GDI ClearType), chances are very high that small vertical differences are rounded to the same vertical position, essentially making the tilde display as a horizontal bar – the above images neatly demonstrates that. With a few short delta instruction commands in a control instructions file you can easily fix that.

    Just to clarify Mike Duggan's comment: While option -m exists only in ttfautohint, there is a field 'Control Instructions File' in ttfautohintGUI which does the same.

    And replying to David Berlow: ttfautohint doesn't have a concept of minimum distances – its built-in algorithms cannot automatically decide whether a certain wiggle in a glyph is something to be retained even at small sizes. You need manual intervention for that – for ttfautohint this means some lines in a control instructions file.
  • Werner, besides thanks for all your great work, I am not so much looking for a certain wiggle. A minimum y distance of two, for all Tilde kind, regardless of actual or relative height, would be useful.
    Type Designers wishing tilde to work at small sizes, might not want to make their Tilde the same height as the circumflex, or another non-collapsing accent of the same pixel range, but others might.
  • Fernando DíazFernando Díaz Posts: 133
    edited October 2015
    Thanks for fixing it  :)

    Question: Is there any way to autohint several ttf files all at once?
    Or I have to autohint one by one?
  • Ray LarabieRay Larabie Posts: 1,335
    edited October 2015
    I use a DOS batch files in Windows to autohint multiple ttfs.

    autohint.bat contains whatever settings you prefer:

    ttfautohint -W -c -n -i -w G "..\_output\%~1" "autohint_output\%~1"

    autohint-batch.bat contains:

    call autohint.bat "fontname1.ttf"
    call autohint.bat "fontname2.ttf"
    call autohint.bat "fontname3.ttf"

  • attarattar Posts: 209
    You can use a for loop with globs to do the command to all files in a directory.
  • I have no idea what you are talking about, I'm not a coder hehe... is there a manual for newbies? Thank you!
  • [grrr, I don't get notifications of this thread sent to my mailbox]

    Handling multiple input files for the GUI is on my (much too long) TODO list.
  • Werner LembergWerner Lemberg Posts: 33
    edited October 2015
     I am not so much looking for a certain wiggle. A minimum y distance of two, for all Tilde kind, regardless of actual or relative height, would be useful.
    Type Designers wishing tilde to work at small sizes, might not want to make their Tilde the same height as the circumflex, or another non-collapsing accent of the same pixel range, but others might.
    David, right now ttfautohint is completely agnostic of specific glyph properties like a minimum y distance for tilde-like characters. And honestly, I don't know how I could ttfautohint teach to handle such features automatically.

    On the manual side, however, the current interface for control instructions is not that complicated. Let's assume that you want to make the `tilde' glyph of NotoSans-Regular-TA.ttf (auto-hinted with ttfautohint -w gGD) work for 6-9PPEM also (all larger sizes are just fine).  Note that the Noto font doesn't contain glyph names; the tilde (also used in composite glyphs) has glyph index 338.
    1. Load the font into your favourite font editor and display the tilde glyph with its point numbers. Here two snapshots from the FreeType demo program ftgrid.

    2. It's quite obvious that you have to shift up points 4-6, 11-13 and 20-21 by one pixel (the other, intermediate points are weak and get interpolated automatically). The corresponding line in a control instructions file is

      338 touch 4-6, 11-13, 20-21 yshift 1 @ 6-9
    3. Put this line into a file NotoSans-Regular-TA.txt and callttfautohint -m NotoSans-Regular-TA.txt -wgGD NotoSans-Regular.ttf NotoSans-Regular-TAx.ttf(on one line) and voilà.
  • and voilà.
    What does this look like? :)
  • Werner LembergWerner Lemberg Posts: 33
    edited October 2015
    Uh, for some reasons the image `tilde-9-new.png' isn't shown in the post – I tried to edit it twice, but it still doesn't work.  Strange.  Here it is again.

    And the command line for ttfautohint is scrambled also:

    ttfautohint -m NotoSans-Regular-TA.txt -w gGD NotoSans-Regular.ttf NotoSans-Regular-TAx.ttf
  • A minimum y distance of two, for all Tilde kind, regardless of actual or relative height, would be useful. 

    I agree, and I think there is much room for improvement in the fully automatic results by applying simple heuristics based on the unicode value of a glyph.
Sign In or Register to comment.