TrueType autohinting in x-direction?

Just getting started with the TrueType Instructor. I have to say, great work! Looks very powerful and convenient.

When I am in the TrueType Instructor, I can select Autohint from the context menu to automatically add instructions in y-direction. Is this possible in x-direction as well? It would be very helpful! For desktop TT fonts (i.e. “Office” versions), I believe we still need x-instructions for printing text sizes (say, 10pt on a 600dpi printer = 83 ppem). In that scenario, the ppem is usually in that range where hints/instructions are still necessary to avoid irregular appearance through inconsistent stems, but excessive manual tweaks do not make much sense. Auto-hinting/instructioning would be perfect.

Also, I found out by chance that you can autohint multiple glyphs in the Font tab (through the context menu) if the TrueType Instructor was selected in the Edit tab. Seems almost like a hidden feature? A bit strange mechanism, UI-wise. I am glad I was lucky to find it – maybe it should be promoted in the tutorials or the command should be put in the main menu somewhere?

I would not like to add x-hints automatically as I don’t thing it is so important. But it could be done in edit view when x-direction is active.

The font view TT-autohint is a hack, I know.

As I explained above, I believe it would be very important.

I wouldn’t mind if at least it was possible via Python script.

Another related request: When exporting TTF (or TT-based webfonts), it would be good to have an option to omit x-direction instructions. Right now, I am doing this via Fonttools in the last step of my (OTF, Office and web) font production pipeline but it would be handy if Glyphs allowed that as a built-in feature.

That way, one could have one source .glyphs file and then export Office fonts with x and y instructions, as well webfonts with only y instructions.

And then you can simply add x-hints automatically without creating any additional unwanted data in the final, exported web fonts.

I see what I can do.

1 Like

I just realised this does not autohint all selected glyphs.

Is there a way to TT-autohint all glyphs in the font?

By script. Look in my repo, Hinting > TT Autoinstruct. Have not tried it in a while, hope it still works :slight_smile:

1 Like

Sorry, I could not find it. Could you point me to the exact URL?

I importes the TT autohinting. Now it will actually use the selected layers in font view and it will also add x-hints if there are any x-stems.

1 Like

And if you want to run it from a script:

layers = [Layer]
1 Like

Sounds excellent, thanks!