questions on some TTF hinting programs I programmed...

Primary tabs

10 posts / 0 new
Last post
Daekwon Kim's picture
Joined: 26 Apr 2010 - 5:38am
questions on some TTF hinting programs I programmed...

I developed some python script programs in FL.

the module is for TTF hinting and is like below.

1. auto-hinting in FL(differs from FL generating auto-Hinting)
2. copy & paste of FL hinting instructions(by searching similar pattern)
3. export FL hinting to VTT(except 'double link' instructions;;)
4. import VTT hinting to FL(convertable instructions only;;)

for Korean Hangul, module #1, #2 is very useful.
module #3, #4 is good for semi-autoHinted fonts for VTT.
especially #2 reduces working time by 50 ~ 70% of whole hinting work.(lots of Hangul designers agree with that.)
I think it is due to similarities of lots of consonants(elements) in hangul glyphs.
usually, hangul fonts have more than 2350(sometimes 11172) hangul glyphs.

But, I don't know whether it is useful for English or other fonts..
is it useful for usual hinting for FL hinting?
if so, is it worth selling?

how do you think??

Adam Twardoch's picture
Joined: 3 Dec 2002 - 7:36pm


please contact me at adam at fontlab dot com, we might be interested in this :)

Adam Twardoch
Fontlab Ltd.

Daekwon Kim's picture
Joined: 26 Apr 2010 - 5:38am

adam, I sent you e-mail.

Adam Twardoch's picture
Joined: 3 Dec 2002 - 7:36pm

Did you already? I did not receive it. Could you please try again?


Andy Clymer's picture
Joined: 9 Jun 2002 - 11:00am

Hi Nanife, I think this Python module sounds pretty interesting and useful, could you email me about it too? clymer [at] typography [dot] com


Dr. Ken Lunde's picture
Joined: 17 Sep 2006 - 8:31pm

When we build OpenType Korean fonts, which are CID-keyed, we calculate hinting parameters on a per hint dictionary basis. Specifically, all of the glyphs are used in the calculation, which is done by post-processing the output of the AFDKO "stemHist" tool.

Hint dictionaries are assigned based on glyph class. The largest hint dictionary in our Korean fonts is for the glyphs for the 11,172 hangul. We apply the same stem width parameters to all of these glyphs through the use of rather simple techniques. One is to simply edit the hinting parameters in the appropriate hint dictionaries of the CIDFont resource, then run the AFDKO "autohint" tool to apply the hinting parameters to the glyphs.

Of course, what you are describing is done within the context of FontLab Studio.

Daekwon Kim's picture
Joined: 26 Apr 2010 - 5:38am

adam and andy, I sent you an e-mail.
I sent you with the address nanife [at] live [dot] com

I forgot one thing.
It was only for TTF, not for CID or Type1 based fonts.
I changed the title right now;;
I already mentioned 'VTT' and it means it was for TTF.

Of course, I already checked the module 'autohint' in AFDKO.
If it was for Type1 based font, I wasn't need to develop it.
anyway, thank you for your comments~

Tim Ahrens's picture
Joined: 28 Sep 2004 - 9:15am

This all sounds very interesting.

Maybe #2 could be used to copy FL Hinting between weights of a font?

How does the VTT<>FL work? Is the VTT hinting scheme public?

John Hudson's picture
Joined: 21 Dec 2002 - 11:00am

export FL hinting to VTT(except 'double link' instructions)

We've also developed FL-to-VTT conversion tools, but we took a slightly different approach: we convert FL PostScript stem hints to VTT visual links, rather than FL TTF hinting, because of the mismatch between FL and VTT TTF hint representation.

Daekwon Kim's picture
Joined: 26 Apr 2010 - 5:38am

If it has similar pattern, it can be done well I think.
I didn't think of pasting in different weight. :-)
But I think it will be okay, too.

VTT <-> FL isn't suitable for those who wants the same result between FL and VTT.
In fact, it is only for VTT work, not for FL work.
I thought the process like below for VTT users.
1)auto-hint -> ( 2)copy & paste ) -> 3)export to VTT -> 4)detailed work in VTT -> 5)import to FL -> 6)copy & paste the result of process #4 -> 7)export to VTT -> 8) detailed work which isn't supported by FL

this is more detailed explanations about the program
1. auto-hinting in FL
- do auto-hinting in FL
- almost similar algorithm with FL, I think
- little bit better than that of FL I think(but, it takes so long time : for hangul 6,400 glyphs, it takes almost 10 minutes)
- now update and debug is proceeding

2. copy & paste of FL hinting instructions
- copy and paste(include delete) some instructions
- search similar pattern with each node's pattern
- uses pywin32 extension for clipboard copy(for saving 'copy' glyph's index, nodes' index)
- some search option needs to be set(there can be default option, too)

3. export FL hinting to VTT
- exports link, interpolate, delta, align to VTT(vtttalk)
- stem width, stem height, zone values are exported to cvt program
- due to prep, fpgm setting, the result can't be the same
- double link can't be exported (I think it can cause more 'delta' instructions, so I don't make, export it at all)
- easy work in VTT(auto hinting -> export => semi-autohinting for VTT)
- with function #2, #4, it can be very useful for VTT

4. import VTT hinting to FL
- VTT hinting can be much easier than before with function #2, #3 like below process
=> export FL hinting -> do minute manual hinting with importable instructions -> import VTT hinting -> copy & paste -> export
- only single link, interpolate, align, middle delta, final delta can be imported
=> minimum distance, delta size(not x/8, but x/16, x/32, x/64), can be imported to g.note as a string
- due to prep, fpgm setting, the result can't be the same between FL and VTT
- cvt, zone values can't be imported(manual input, but if the values are the same, it needs no manual input)
- other instructions can't be imported(in fact, it can be imported as a string, but I think it's not so good way)