TrueType hinting in 2020

I would like to ask about the “modern” TrueType hinting workflow.
Over the last few years I have been using ttfautohint --control-file.
However, manual hinting must be introduced to meet the detailed requirements of my customers.

The information I want is the following points
・Tool options
・Handling of TrueType hint when updating fonts. How can I set the TrueType instruction in the previous version of font to the next version of font?

I have no knowledge of Hinting export/import.
Are there any teaching materials to learn about the recent Hintig workflow?
I would be happy if you could give me any information.

Comments

  • In Glyphs.app, you hint the multiple master source on postscript outlines. You hint one master and they will be distributed to all (compatible) instances. So your second points is not relevant as you hints are in your master source file: https://glyphsapp.com/tutorials/hinting-manual-truetype-hinting

    And if our export as variable font, the hints work there, too.
  • Mike DugganMike Duggan Posts: 192
    VTT (Visual TrueType) is another professional tool for Hinting. 

    https://www.microsoft.com/en-us/download/details.aspx?id=100438

    VTT has a built in Autohinter. Depending on your hinting requirements, this will get you some way. The output from the Autohinter does require touchup, and VTT has quite a steep learning curve. When I worked at MS, I wrote a number of posts on using VTT to hint, unfortunately the blog has not been maintained. This post might be useful. There is also some built in help in VTT that may be useful to you.

    https://docs.microsoft.com/en-us/archive/blogs/fontblog/a-graphical-guide-to-vtt-6-10-light-latin-autohinting

    if VTT is something you think you might want to use, I may be able to give you some basic pointers and or help on that, although I am not in a position to give any extensive training or technical support. 

  • In FontLab 7: 

    1. If your source has multiple masters, you can hint the main master, and FontLab will distribute the hints to instances. 

    2. You can attach TTH commands to PostScript or TrueType contours, with overlaps. FontLab will retain the hints after you remove the overlaps. 

    3. When you create TTH commands in FontLab, the app adds names to nodes, and attaches the commands to the names. In FontLab Studio 5, TTH was based on node numbers, so it was very fragile. In FontLab 7, it’s more independent. 

    4. You can hint some key glyphs, then copy a glyph layer e.g. in "O" and then use Paste Special > TrueType hinting on "Q" or other similar glyphs, and FontLab will "magically" paste the TTH commands on the "correct" nodes. Even more — you can copy from one FontLab TTH-hinted font, and then Paste Special > TrueType hinting on glyphs from a different font, as long as the node structure is fairly similar. The same goes for copying TTH from, say, uppercase to small caps or to lowercase. 

    5. The videos by Monika Bartels and  explain the principles of FontLab TTH. The videos use FontLab Studio 5, but the visual commands are the same in FontLab 7.

    6. Of course, FontLab 7 has a powerful TT autohinter. It can use existing PostScript hints, or build TTH commands from scratch, and in Preferences you can control which types of commands it should generate. You may want to turn off middle delta generation. 
  • Adam TwardochAdam Twardoch Posts: 452
    edited August 19
    Here’s an example video that shows how you can copy visual TTH commands from one font to another: 

    https://www.dropbox.com/s/esib0lemtebko8g/fl7-pastespecial-truetypehinting.mp4?dl=0

    It’s important that both glyphs have the same basic contour structure and the same contour direction — but they don’t need to be point compatible.
  • This shows how copy-paste of visual TTH commands works in FontLab 7 even in quite complex glyphs: 

    https://www.dropbox.com/s/9l5wqcb40xdz622/fl7-pastespecial-truetypehinting2.mp4?dl=0

    When one glyph has no overlaps and the other does, then it does not work (since matching of the topology fails), but when the topology roughly matches, then it works. 
  • I use Visual TrueType for manual hinting. I don't use the autohinter in Visual TrueType because I find it insufficient for my purposes and does not help very much, and also replaces the cvt list.

    TrueType hinting involves writing a list of cvt values. Example (for DMCA Sans Serif 10.0 Bold in development that I'm hinting right now)



    The InstructionsOn is what range the hinting are enabled, and in this case is set
    to the maximum. However it is also possible to specify sizes for hinting (as well as anti-aliasing) in the gasp table.

    The DropOutControlOff specifies at what size and up the dropout control (forces rasterization of lines that would otherwise go right past the pixel centers) turns off. In my case I have it disabled all the way because it can also restrict possibilities of hinting geometrical glyphs or something.

    The CvtCutIn specifies how far the snapping to cvt can go (otherwise it resets to default rounding) starting at each size.

    The ClearTypeCtrl makes various deltas also apply to ClearType rendering that would otherwise get disabled by ClearType hacks. However, as I'm doing full hinting with the deltas optimized for fully hinted rendering, the ClearType hacks are necessary so I have ClearTypeCtrl disabled.

    The LinearAdvanceWidths makes it possible to use fractional ppem sizes in some renderers or something, however as it is impossible to separate deltas of multiple sizes that round to the same ppem I find no use for it in full hinting.

    So I set the first eight cvts to zero because for some reason any attempt to use them glitches the hinting. The 255 is also set to zero because otherwise there would be out of range errors.

    The cvts are for specifying feature sizes that should remain consistent throughout the font. In my case:
    • 8 for the baseline
    • 9 for the x-height
    • 10 for the overshoot baseline
    • 11 for the overshoot x-height
    • 12 for the stem height
    • 13 for the stem width
    • 14 for the cap-height
    • 15 for the ascender-height
    • 16 for the overshoot cap-height
    • 17 for the overshoot ascender-height
    • 18 for the descender-height
    • 19 for the overshoot descender-height
    • 20 for the comma stem width
    • 21 for the dot width and height

    As the character set goes beyond ASCII, more cvts would be necessary. The font top and font bottom for box drawing characters as well as their stem weights come to mind immediately.

    Font hinting instructions include the link, the interpolate and the delta.

    The link: For creating a direct dependence on vertical or horizontal distance from one point to another. It is usually rounded to integer, and may be snapped to a cvt. It may for instance be used for linking from the origin to the baseline or x-height, etc. or for linking one side of a stem to the other. Horizontally it may be used to link from one vertical stem to another.

    The interpolate: For creating a dependence on positioning of a point horizontally or vertically between two points. It may be rounded to integer, but does not use cvt. Example uses are for positioning of a middle horizontal stem in 3569BEGae{} for instance. I've seen examples of interpolating from the bottom and the top but instead I find it the best to interpolate from the tops of two stems to the top of the middle stem, or the bottoms of two stems to the bottom of the middle stem. In case of FPR in place of the bottom of the bottom stem it is possible to use the bottom of the letterform due to the same vertical position, and in H it is possible to create a point within a vertical edge to simulate a top or bottom horizontal stem. @g require multiple interpolations due to multiple middle stems, and $&08Ss involve diagonal middle stems that I find the best to interpolate both ways for top and bottom side with no rounding (similarly the diagonal in the middle of ~ horizontally).

    The delta: There are multiple types of delta available, what they do is at a specific point size they move a single point horizontally or vertically. The types are: the inline delta, which moves the point after the instruction linking to it but before the next instructions depending on it, the pre-IUP delta, which moves the point after the linking and interpolate instructions but before the final interpolation of untouched points (IUP), and the post-IUP delta, which moves the point after the links, interpolates and IUP meaning the delta would not affect any other point whatsoever. The inline delta is generally used to position font features at a different pixel, while the post-IUP delta is generally used to correct pixel patterns.

    There are also other instructions like Shift, Align, Stroke, Move but I haven't used them in hinting, they might be of some use to some hinters out there.
  • Thank you so much for all the information.
    It's the information I need and treasures. It seems that the timing of using each tool will differ depending on the work environment and the desired quality. I'm learning while working.
  • A hinted font would look like something like this:


  • what font is it? looks like Consolas? 
  • Piotr GrochowskiPiotr Grochowski Posts: 57
    edited September 6
    what font is it? looks like Consolas? 
    It's a development version of DMCA Sans Serif 10.0. https://typedesign.netlify.app/DMCAsansserifv1000dev2.zip (contains Visual TrueType source code)

  • I took a look at the files. The outlines are the same as or modifications of the Consolas font? anyway.... not sure why you are doing that.
  • I took a look at the files. The outlines are the same as or modifications of the Consolas font? anyway.... not sure why you are doing that.
    It can be seen from the outline point arrangement that this is a different digitization than Microsoft Consolas. See https://typedesign.netlify.app/dmcasansserif.html for information on DMCA Sans Serif. I am doing full hinting because full hinting is a fundamental part of a TrueType font.
  • Out of interest why are type designers still working in TrueType given we have OpenType now? I've seen it pop up a few times since browsing TypeDrawers.
  • see discussion on that here 
  • to Piotr , there might be different point placements, but its more or less the same as the Consolas design. odd. 
  • to Piotr , there might be different point placements, but its more or less the same as the Consolas design. odd. 
    Font designs aren't copyrighted, so I was able to use this design in DMCA Sans Serif. Microsoft Consolas is a commercial font so many people do not have legal access to it, and even if they do it could be an outdated version. DMCA Sans Serif is public domain, making it legal to use it for any purpose. Type Design only makes public domain fonts. The ability to make derivative works is a very important part of free fonts, which public domain fonts are. Type Design fonts are my fonts, and they belong to anyone who downloads it as well. The hinting being open-source is very significant as well because it means it is possible for type designers to explore and modify the hinting more easily than with raw TrueType code.
  • Even if this is legal (debatable), it isn't ethical.
  • Piotr GrochowskiPiotr Grochowski Posts: 57
    edited September 11
    Even if this is legal (debatable), it isn't ethical.
    Since when is public domain unethical? Many type designers get to use and modify the resulting hinting. I consider commercial fonts unethical.
  • > Many type designers get to use and modify the resulting hinting

    I think you overestimate the number of type designers interested in touching hinting tools. 
  • Even if this is legal (debatable), it isn't ethical.
    Since when is public domain unethical? Many type designers get to use and modify the resulting hinting. I consider commercial fonts unethical.
    As far as I can tell, copying the glyphs would be unlawful for, generally, at least five years in the United Kingdom, and require royalty payments for the next five - though perhaps they would be zero in this case.

  • John HudsonJohn Hudson Posts: 1,901
    Since when is public domain unethical?
    When it pretends there is no protectable creative value in something at the same time as wanting to exploit that value. Consolas didn't exist before Luc did the work of creating it: not just the particular digital representation of the design, but the design itself. The fact that people want to use that design and copy that design is attestation of the creative value of that design. Which is why law that fails to protect typeface design like other creative work is incoherent, and why type design as a professional field mostly operates on the basis of ethical consideration of each other's work, not on jurisdictional legalism.
Sign In or Register to comment.