To autohint, or NOT to autohint...

silas's picture

What are the benefits of hinting a font if you're not going to do it manually? I have found that even my more rigid, geometric typefaces end up rendering clunky or wobbly when autohinting comes into play. Decorative and detailed fonts... fugetaboudit!

I am of the opinion that an unhinted font generally looks better than an autohinted font on screen, leaving antialiasing to a quality engine (ie: Adobe or MacOS... especially Photoshop with the selection of antialiasing styles).

How do you all approach this conundrum? Does it bother you? What do you prefer... autohinting or no hints at all?

(PC/Windows centric opinions are most appreciated here.)

Down10's picture

I too am curious, as I've noticed the auto-hints tend to only hint horizontally and not vertically (in FontLab). Is there some special method of hinting a font that delivers great results, or is it more of a trial-and-error effort?

Mark Simonson's picture

Type 1 hinting is not that hard and you usually get better results than with autohinting. TrueType hinting is much more complex, and therefore more difficult to do. I also think that autohinting TrueType fonts does not work as well as autohinting Type 1 fonts. You can get the best results manually hinting TrueType fonts, but it's a lot of work.

yuri's picture

My recommendations are: hint t1 manually, put in (manually) some standard stems and zones, convert t1 hints to tt (automatically, but adjust conversion rules according to font design), apply delta-hinting to stems and zones (first - auto to stems, then adjust as needed). For most designs it will do 80% of the work.

eolson's picture

A combination of manual and auto hinting seems to do the trick for me on T1 fonts.
In FL go, Prefs > Type 1 > Type 1 Auothinting Options.
Adjusting these numbers based on the stem widths of your design can have a drastic
impact on the quality of the autohints you end up with. Really thin and really bold designs
usually need the most adjustment.

William Berkson's picture

Where does autohint on type 1 typically not work well, and need correction? How?

John Hudson's picture

William, T1 autohinting will typically add more hints than you really need, and some of these can conflict and result in messy rendering. Hint replacement can sometimes deal with these, but if you were hinting manually you probably wouldn't put so many hints in. Also note that FontLab's auto hint replacement function works most of the time, but we found some problems with it when working on a project for Adobe last year. FontLab was reporting correct hint replacement (green dot) but Adobe's test tools were finding faults where one hint sits directly on top of another hint. I went in to the manual hinting window and confirmed that the hints were overlapping, and had to manually create separate hint groups. I have not had an opportunity to test this with FL5.

Unless I am making a quick-and-dirty test font during development, I manually hint. It doesn't take long, and I like knowing what is going on in every glyph.

William Berkson's picture

>if you were hinting manually you probably wouldn’t put so many hints in

Thanks!

dezcom's picture

John,
Thanks very much for the info! If manual hinting is as easy as you say in FontLab, It makes me wonder why auto hinting seems to fail at it so often. I have yet to do an auto hinting which is better than no hinting. Sometimes it works better than others but most of the time, it is less than stellar. I hope Adam Twardoch can enlighten us on this function as well as let us in on FL5 for Mac OS-X release plans. He could give us a "hint" on hinting as well:-)
It has been a while, but I seem to remember Fontogrpher doing a better job at hinting.

ChrisL

PS: Thanks William for posing the question so concisely as well!

Thomas Phinney's picture

What John said.

Generally, I would start with FontLab autohinting, and add manual hinting on top of that.

Adobe's own Type 1 and OpenType CFF fonts are all autohinted, but with our own autohinter. We're looking at putting that into our OpenType SDK code so that folks like FontLab will be able to use it, and the need for manual hinting of PS outlines will be greatly reduced.

Regards,

T

dezcom's picture

"We’re looking at putting that into our OpenType SDK code so that folks like FontLab will be able to use it, and the need for manual hinting of PS outlines will be greatly reduced."

BRAVO! Kudos to Thomas and Adobe for sharing with the type design community.

ChrisL

Mark Simonson's picture

If manual hinting is as easy as you say in FontLab, It makes me wonder why auto hinting seems to fail at it so often.

The difference is that you know what the font is supposed to look like, FontLab doesn't. It's easy for you as a designer to look at a glyph and say, "This is an important part of this glyph; this isn't." There is a certain amount of judgement that no algorithm can completely replace.

If the hinting process was so easy to automate, there would be no need for hints; it could be built into the rasterizer.

Thomas Phinney's picture

One could indeed put the hinter into the rasterizer. I suspect there are two reasons that wasn't done long ago:

1) Performance. Even back in the early 90s, let alone the mid-80s, autohinting every font would have had a noticeable impact on output speed.

2) Until the last few years, Adobe considered the quality of its autohinter a proprietary advantage over other type foundries. This attitude has shifted as we have come to the realization that it is more valuable Adobe as a company to help others make better fonts so that our applications work better.

Actually, it's a particularly fun aspect to working in the Adobe type group in recent years: we can legitimately say that altruism towards other type foundries is good business, too. :)

Cheers,

T

Mark Simonson's picture

Thomas, if that's the case, I really hope it happens soon. As you can tell from my argument, I was making the assumption that if quality autohinting was possible, we would have it by now, and I speculated as to the reason why we don't have it. Here I thought Adobe had a team of expert hinters on staff to do the grunt work. So it turns out it does exist, but you guys were just keeping it to yourselves. Thanks in advance.

hrant's picture

> We’re looking at putting that into our OpenType SDK code

Yes, that would indeed be very nice of you.

> autohinting every font would have had a noticeable impact on output speed.

Even if you consider that it only has to be done once per character? Just like you cache a rasterization of a glyph at a given size for better performance.

Also: When it comes to really small PPEMs (like onscreen) no T1 autohinter can match TTs manual hints. It's like Mark said about "true" intelligence.

hhp

dezcom's picture

"The difference is that you know what the font is supposed to look like, FontLab doesn’t. It’s easy for you as a designer to look at a glyph and say, 'This is an important part of this glyph; this isn’t.' "

The difference is that I don't know jack about hinting. I know how my font is supposed to look but I don't know what to do with the hinting to make it work. I look at the hints auto-hinting creates in my fonts and I look at hints from other fonts to try to figure out how they work but I am too naive to make it work. Is there some source for hinting (Hinting for Dummies) that you might recommend? When people on this forum say it is so simple to do manually, I keep looking for the "Easy" button but I am too much of a dufus to find it. I have managed to teach myself pretty much the rest of what I need to know about using the software but hinting...well I need a hint.

ChrisL

Mark Simonson's picture

The way I think about Type 1 hinting is this:

Any important horizontal stroke (like the crossbar of a T) gets a hint. When you do this, you are defining a horizontal stem. Any important vertical stroke (like the middle of the T) gets a hint. This is called a vertical stem. Some things, like the top of an A and the bottom of a V, also get a sort of one-sided-horizontal-stem hint, even though there's not a horizontal stroke. Forget about diagonal strokes (including italics). They have to fend for themselves. Don't worry too much about serifs.

Alignment zones are like horizontal ruts. The edges of horizontal stems that fall into them will magically line up with each other at lower resolutions. You normally put alignment zones at the baseline, cap height, x-height, and so on. You make them thick enough to catch any edges that are nearby (including the tops and bottoms of rounded glyphs). This is what keeps things lined up horizontally at low resolutions.

Standard stems are a bit like alignment zones, but define recurring dimensions in the font, such as thin strokes and thick strokes. The rasterizer decides how many pixels each of these standard stems should be at a given resolution. Then, when it encounters one of your stem hints, it picks the closest match from the standard stems and uses that to decide how many pixels wide it should be.

Adding hints also imposes some symmetry to the shapes in the glyphs. For instance, a round bullet with no hinting will not necessarily come out symmetrical when it's rasterized. By adding a horizontal and a vertical hint, the rasterizer will magically make it symmetrical in both directions at low resolutions.

There's obviously more to it than this, but it should be enough to get you started.

I found David Lemon's introduction helpful when I started doing my own hinting:

www.pyrus.com/downloads/hinting.pdf

Between that and the Hinting chapter in the FontLab manual, it's not too difficult to figure out the important stuff.

Another thing that helps is to turn on the Type 1 Hinting Preview in FontLab. This allows you to see interactively how hinting works. (Note: If you're on a Mac, this won't work in OS X or Classic running under OS X. You have to run FontLab in OS 9 with ATM for it to work. Reportedly, this will be fixed in FontLab Studio 5.)

elliot100's picture

I am of the opinion that an unhinted font generally looks better than an autohinted font on screen, leaving antialiasing to a quality engine (ie: Adobe or MacOS… especially Photoshop with the selection of antialiasing styles).

Got two questions which may have obvious answers, but would be grateful if someone could clarify:

- for an unhinted font, does any screen renderer (either OS or application) do any of its own autohinting? Don't have an unhinted font to test with, but would Photoshop's crisp/strong/smooth text rendering modes give exactly the same results without any hints?

- does hinting, or indeed anti-aliasing have any relevance to printing at all? (I'm thinking desktop printers rather than press here)

dezcom's picture

Mark,
Thank you very much for taking the time to get me started on hinting. I am sure others who are hinting-challenged will appreciate your efforts as well. You are one of the people on this board who make it valuable.

ChrisL

dezcom's picture

"autohinting is for girls!"

But Vincent, I like girls AND chocolate--what do I do? :-)
(What would this forum be like sans a Comic :-)

ChrisL

Thomas Phinney's picture

I think I've heard that the FreeType rasterizer on Unix may do auto-hinting. But other than that, I've not heard of a rasterizer doing autohinting.

Hinting has some relevance to 600 dpi, but not a ton at normal text sizes. Very small type at 600 dpi benefits quite a bit from good hinting (think 5-8 pt). At 300 dpi hinting matters a lot. At imagesetter resolutions, it matters very little.

>> autohinting every font would have had a noticeable impact on output speed.

> Even if you consider that it only has to be done once per character? Just like you cache a rasterization of a glyph at a given size for better performance.

Even so. I don't think most people realize how slow RIPs were back when. I remember waiting up to an hour for a single page of text for me newsletter to output....

> Also: When it comes to really small PPEMs (like onscreen) no T1 autohinter can match TTs manual hints. It’s like Mark said about “true” intelligence.

This is only sort of true. I agree that manual hinting can always be better than auto-hinting. I am dubious about whether manual hinting is always or even usually worthwhile. Manual hinting of TrueType is a particularly troublesome cost/benefit equation because hinting of TT always assumes some particular rendering system: one does it differently for ClearType than without, for example.

I think it will be very interesting for people to do in-depth comparisons of ClearType on OpenType CFF versus TrueType outlines. It will be especially fun with cases where we have essentially the same typeface design fully realized in multiple formats.

Cheers,

T

edeverett's picture

There is (limited) information on Freetypes autohinting here.

I bumped into it the other day when I was making a greyscale pixel font to use on my website that would be dynamically rastered by freetype. Freetype kept autohinting the middle 'crossbar' on my B to align with the pixel grid which was not what I wanted. I've put an example here The top left B is how freetype rendered it and the top right B is how I wanted—and finally got— it. Their outlines are in red bellow.

Ed.

dezcom's picture

Vincent,
Now that I have follwed everyone's links and done some more research, I find that you are a Zen Master Hinter with a Black Belt in Delta:-) So when you say, "Autohinting is for Girls," you speak with master authority.
Here I am, not even yet worthy of a "Yes Grasshopper" yet :-)

ChrisL

twardoch's picture

One tip: if you experiment with hinting in FontLab/FontLab Studio, try the following:
1. In Font Info / Hinting Settings, do "Auto zones".
2. Autohint your font.
3. In Font Info / Hinting Settings / Standard Stems, do "Auto stems".
4. Remove the hinting.

The bottom line is that sometimes, having an OpenType PS font without hinting is OK if you have defined standard stems and alignment zones.

Alignment zones are most important. Standard stems are the second-most important. Individual glyph hints follow in priority.

A.

dezcom's picture

Thanks Adam!

ChrisL

dezcom's picture

Also: There are several Hinting links at this MyFonts site.

ChrisL

Si_Daniels's picture

I don't think anyone mentioned the fact that TrueType hints are not used natively on Mac OS X.

Cheers, Si

dezcom's picture

I didn't know that Si, thanks. Does this mean the OS rasteriser does all the work or does the app chime in? I guess I am just saying, how does it work? Truetype fonts look great on my Mac.

ChrisL

twardoch's picture

The Mac OS X rasterizer uses a very advanced antialiasing mechanism so the fonts look good on screen without using hinting. Apple put a lot of research into scaling: the doc icons and other graphical items are also scaled using a very smart algorithm.

hrant's picture

> the fonts look good on screen without using hinting.

But not good enough, or at least not as good as they could.
Their algorithm might be the best of its kind (although I think
the MS stuff is better) but sadly that's not saying much at all.

hhp

Vladimir Tamari's picture

Fast forward to late 2008. What should one do, using FLS for a font family of six weights: to auto-hint or not to autohint that is the question. Is there now specialized hinting software that is easy to use and does a better job? Many thanks for helpful suggestions from the experts.

Michael Jarboe's picture

Any update with releasing Adobe's own autohinter to the public?

blank's picture

Any update with releasing Adobe's own autohinter to the public?

It’s been part of the free Adobe FDK for a couple years now.

twardoch's picture

Fontographer 5 is the first FontLab product that includes the Adobe autohinter. FontLab Studio 6 will also include it.

hrant's picture

When is FL6 coming out?

hhp

Michael Jarboe's picture

Nice… I thought it was something separate than the FL5 autohinter.

When is FL6 coming out? Is it going to be incredible or what? : )

Mark Simonson's picture

It is (sort of) separate in FL(S)5. You need to install the AFDKO, which will add a bunch of Python scripts to FLS5, including the autohinter, which you can run as a macro (Python script). You can also run it from the command line (e.g., via Terminal in OS X). What Adam is saying (I think) is that when you use the "autohint" facility in FLS6, it will be the Adobe autohinter, as it is in Fontographer 5.

twardoch's picture

Mark,

indeed, the Adobe autohinter will be natively included in FontLab Studio 6. We're currently working on it (with double energy since Fontographer 5 is out), but we don't have a release date yet.

A.

Michael Jarboe's picture

Nice, I'll look into that… thanks for the clarification.

Syndicate content Syndicate content