Controlling spacing with TT hints

Frode Bo Helland's picture

Hinting in the x-direction have a tendency to introduce a lot of problems (rounding errors?) with the spacing. Things turn out very uneven, and unfortunately also uneven between the Standard rendering and Cleartype.

From what Beat told me, the best method is to round the left sidebearing with a single link tied to the left edge of the first stem, and leave the right sidebearing free. This yields relatively good results in CT, but looks like horseshit in greyscaled or bitmapped rendering.

I could always go nuts with delta’s, but they have the same effect on all rendering outputs, so I’m left with no way to fix something in Standard and keep it as is in Cleartype.

Can anyone shed some light on this?

I’m hinting with Fontlab, yes. I realize VTT is the next logical step, but is FL really that bad?

Frode Bo Helland's picture

Standard example

Cleartype example

John Hudson's picture

In FontLab at least, I don't think there is a solution you could apply to the Standard rendering that wouldn't also have some affect on the ClearType. But it seems to me from your screenshots that the places where you have spacing problems in Standard rendering are also problematic in the ClearType.

As you note, you can delta the right sidebearing, but if you put x hints on the stem distances too, which I thought you would be doing for Standard rendering, then you have the option of putting a rounded link from the right side of the letter to the sidebearing.

So, for example, you could do something like this (greyscale rendering, font smoothing on at all sizes):

Frode Bo Helland's picture

The thing with the loose right edges (thank you db!) is not only a rendering that is more similar to the real weight in other environments (CT, Quartz), but also a counteract against the thinning you tend to see in rounds and circular glyphs with greyscale rendering.

Anyway, from how I understand the rounded single/double link logic in Truetype. I would get roughly the same results if I linked it to the right edge of the right stem, no? I’ll see if I can post examples of this later when I’m on the other PC, but it does not become any better. Just worse, for CT. Btw, most of my glyphs look like your n, only without the rounding on the stems. My n however looks just the same without them, and file size is crucial for web fonts.

If you for example look at the a’s and n’s at 14 ppm, you’ll see the unconsistent results.

John Hudson's picture

If you for example look at the a’s and n’s at 14 ppm, you’ll see the unconsistent results.

Actually, I think the inconsistency is in the h's and n's; the a's look comparable. Either your CT h and n counters are too wide or your greyscale h and n counters are too narrow. So one way to fix this would be to delta the right stem to make these counters wider in the greyscale, presuming these deltas are ignored by the CT renderers.

I would get roughly the same results if I linked it to the right edge of the right stem, no?

You probably want to avoid hinting inwards from both sides, because this will tend to squish letters at sizes where the sidebearings round inwards. This is why I always hint from left to right across the glyph. So if you link from the right edge of the right stem to the right sidebearing, you want the stem to be the origin of that link.

...a counteract against the thinning you tend to see in rounds and circular glyphs with greyscale rendering.

Your smaller sizes are much greyer than what I was achieving at those sizes by adding stem hints.

a rendering that is more similar to the real weight in other environments

I don't usually consider 'real weight' to be a hinting goal. Hinting is a means to adjust outlines to make them size specific in crude resolutions. Stem weight is one of the factors of type design that is properly size specific, so I use hints to try to achieve the best weight in terms of legibility, stem density and contrast for each size. Subpixel rendering environments take this ability away to a considerable extent (in the x direction in CT and in both directions in Quartz at most sizes), but so long as you are trying to target XP greyscale too, I would consider x stem hints important.

Syndicate content Syndicate content