New to Typophile? Accounts are free, and easy to set up.
Apologies for the nerdiness on a first post.
In the midst of some last checks before releasing my first real font, I noticed an unpleasant beating frequency effect on repeated characters at smallish ppems when testing on Windows 7 with the "Natural" mode of DirectWrite ClearType rendering (tested via Firefox with the Anti-aliasing Tuner add-on). The characters phase in and out of different degrees of bluriness.
With a bit of investigation, it looks like this is due to fractional advance widths. I was hoping to be able to control for this by slightly adjusting the advance width phantom point via TrueType hinting. However, it looks like Windows is ignoring that in this rendering mode and using only the designed width instead.
Attached is an extremely simple test case (TTX format, renamed to .txt) that shows this. In the lower case x glyph slot it has a pointed cross occupying a 1000 font unit square, with a width set to 1000 font units (no sidebearings). The glyph program is the following:
SVTCA[x-axis] PUSHB_2 17 // Advance width phantom point (16 points in curve) 0 // CVT 0 (2000 font units) MIAP[no-rnd]
The test font also has the following simple preprogram:
PUSHB_2 // New font with ClearType support 4 3 INSTCTRL PUSHW_1 // 64 pixel cut-in (i.e., not a factor) 4096 SCVTCI
Testing this out, I see that DirectWrite's GDI Classic and GDI Natural rendering modes correctly handle this; a string of xxxxx shows the expected double spacing between the glyphs. However, this is missing from the Natural and Natural Symmetric modes and they render with something closer to the designed widths instead:
So this brings me to the following questions:
1) Is there any voodoo that I can do to get it to honor hints that adjust the width? Or am I simply stuck with the beat pattern here?
2) I notice that in the documentation for
DWRITE_RENDERING_MODE for Windows 8 and later, the descriptions for Natural and Natural Symmetric mention that the glyph advances are rounded to whole pixels. However, no such mention is made of this in the corresponding documentation for earlier versions of Windows. Does Windows 8 therefore not have the same beat problem?