I’ve been studying Truetype fonts and hinting.

Knowing the difference between raster and vector graphics I’m wondering: Why is hinting still necessary? Aren’t there rendering engines for vector fonts?

Why do I still need to do hinting (which is a slow, boring and prone to imprecision process) for a font?

  • Yes in general you need hinting if you want windows users to use your font. As for can you skip this step, sure. Just understand that vectors do not allways scale perfectly. And by the way hinting is developped for vector fonts.
    – joojaa
    Sep 14 '15 at 13:23
  • In general, the lower the resolution, the more hinting can help. That's becoming less and less of an issue with today's technology, so it comes down to a decision you need to make on a font-by-font basis given time, budget, audience, etc.
    – DA01
    Sep 14 '15 at 16:04

TL; DR: Unless your font contains the highest level of hinting (bitmaps), it is subject to a vector renderer, but one that is specialised to rendering type and that can take into account other information than classical vector data.

The answer somewhat depends on what exactly you call hinting. In fact, there are many stages of hinting, each of which requires more work than the former:

  1. Live hinting that is done on-the-fly by your font renderer. This is can be regarded as a rendering engine for vector data that uses the information that it is rendering type (and not a diagram, for example), which may lead to different choices in some respects.

  2. Automatic hinting of the font. This is either done by the font-creation software or an external program that just runs over the font. It may produce better results than the above as there are no runtime constraints and some live hinters just suck.

  3. Automatic hinting of the font with font-wide parameters, such as dominant stem widths or position of the baseline and midline. This may either happen when creating the font (as in point 2) or live (as in point 1). Which one is used depends on several factors such as the font renderer, the font size and so on. This can be a huge improvement and is not much work.

  4. Automatic hinting using glyph-specific hints. Like the above, but you individually specify where the vertical, horizontal and diagonal stems in a glyph lie. Depending on the font, this may be little work and just means correcting the results of an automatic stem detector. It may also be a lot of work, however.

  5. Manual bitmap hinting. You draw or correct the bitmaps for each glyph and font size separately. This is obviously a lot of work.

All methods except the last are employing “rendering engines for vector fonts” at some point.

For demonstration, I take my own illustration and description from here. The text reads Luftfeuchtigkeit. Left: As it would be rendered, assuming that you are viewing the image at its original size. Right: 400 % zoom for illustration.

enter image description here

Without any hinting (pure vector rendering, point 0, if you so wish), the rendering seems grainy and distorted, e.g., look at the L or the first e. Also, the counter of the first u can hardly be seen. The automatic hinting (point 2) is better but the letters are not well aligned anymore, e.g., both u are hovering above the baseline. At the bottom you can see the results of point 4, which still have flaws, which could be removed with manual hinting (point 4), such as the smeared-out i dots. Note that displaying this font at this size is particularly difficult and due to being blackletter, most hinting routines are not aimed at it.

All hinting is mainly needed if the glyphs are to be rendered a small amount of pixels high. You would not render regular vector graphics at that size without paying attention to pixels either, e.g., here is a sketch for Academia’s badges, once with (left) and once without (right) aligning to pixels:

enter image description here enter image description here

  • So base point: even vector fonts require hinting to look as good as possible. It's not just a "resizing" matter, right?
    – Dean
    Sep 15 '15 at 23:19
  • @Dean: Depends on what you mean by resizing. Regular vector images aren’t just resized either. Anyway, I added a TL;DR that may answer your comment.
    – Wrzlprmft
    Sep 16 '15 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.