Monospaced rendering as not monospaced on Windows

alan's picture

(I originally posted this in the FontLab support forum, but y'all are pretty active here, and I'm in a bit of a panic mode, so pardon the bad habit.)

Hi folks, I'm having a strange issue with a monospaced TrueType font on Windows, and I'm wondering if anyone will have seen something like this before.

The custom font in question is designed to match a different custom font, and the metrics are supposed to match exactly.

On Windows 7, the font renders as non-monospaced, with more space given to certain characters (o, L, P). Additionally, certain characters seem to be dramatically shifted within their bounding box, such that they run into their neighbors (particularly the uppercase i). There's also too much leading. On a Mac, everything shows up fine, properly monospaced.

The font has no TT instructions, but I tried a quick autohint and saw yet different metrics, both horizontal and vertical. But in spite of the hinting having a profound effect on the metrics, it doesn't seem like strictly a hinting issue, because the font renders with the same problems at all sizes.

To make matters worse, sometimes it doesn't render at all. In Final Draft, it appears correctly in the font and renders the expected font on screen. In Wordpad, it appears in the font menu, but renders as Arial.

I'm wondering if this is a FontLab bug, because if I just open the original custom font, rename it, and regenerate it, it exhibits the same problems, while the original font renders just fine.

Attached are two images, one for Mac and one for Windows. Has anyone seen anything like this before?

Thanks for your time,
Alan

AttachmentSize
tt-rendering-windows.png24.4 KB
tt-rendering-mac.png59 KB
John Hudson's picture

This sounds like a font cache corruption problem. Have you tried installing on a different Windows machine?

I suggest:

1. Uninstall the font.
2. Delete this file: C:\Windows\System32\FNTCACHE.DAT
3. Restart your system.
4. Re-install the font.

If the problem persists after that, then there may be some piece of information in the font that is causing the problem, but that would not be my first guess.

alan's picture

Thanks, John. I haven't tried your suggestion (I don't own a Windows machine, so it's hard for me to test quickly), but the same thing is happening on two different machines, neither of which have ever had any version of this font installed.

I'll try testing some unrelated fonts, and maybe do a fresh copy/paste into a new file to see if there's something corrupted in my VFB. Thanks for your quick response.

oldnick's picture

I have have occasionally run across similar problems with FontLab files: some of them seem to have acquired some voodoo bug, which are resistant to exorcism. In such instances, I usually generate a PS type 1 version of the fonts, then open that font in FontLab. So far, this workaround has worked for me...

alan's picture

Thanks, Nick. I'll give your suggestion a shot as soon as I can.

John Hudson's picture

A few more things to check:

a) Make sure that all glyphs in the font have exactly the same advance width, with no exceptions.

b) Ensure that the Panose value for monospaced is set in the Panose / Proportion font info.

c) Ensure that the TrueType Unique ID record in the font info identification settings is indeed unique to this font and can't be confused with anything else.

alan's picture

a) Make sure that all glyphs in the font have exactly the same advance width, with no exceptions.

Dang. I have some contextual alts to make nice emdashes and such, I'll have to look into replacing those with many-to-many substitutions. I did try a version on Windows with those extra-wide characters removed, but hadn't done most of these other suggestions, so it had no effect.

Thanks again for your time, I'm itching to get back on that PC and try these out.

alan's picture

Hi again, I've done some more testing, and haven't had any better luck. I converted all my double-wide characters to regular width, so all glyph widths are the same. Exporting as PS, opening in FontLab, exporting TT didn't work. Copy/paste into new VFB didn't work. I was careful to clear the Windows font cache and make sure everything had unique names and IDs.

It turns out I was wrong about it being consistent at all sizes. Different characters are wider or narrower at different sizes.

Stranger still, the italics work fine, mostly. I'm not getting any odd spacing with italics, though they don't match the metrics of the original custom font. I started with the regular, then used that as a basis for the italic, bold, and bold italic, so I'm not sure what's so special about the italics that they're less problematic.

I was just about to test various smoothing settings, but I've now run into an issue where installing any new fonts causes them to disappear, and can't be used in applications. This is apparently a Windows 7 bug, so I'm not sure what testing I can do next.

Does anyone have any more ideas?

Thanks,
Alan

alan's picture

Ok, I am, quite possibly, a horrible human being. I unknowingly had "autohint unhinted glyphs" on TT export turned on. And with it, "add link to right sidebearing point", which seems like it would do exactly the kind of damage I'm seeing. Will test tomorrow ...

alan's picture

Turns out that autohinting on the right sidebearing was the culprit. Well, now I know. Still wrestling with the vertical metrics, I'll start a separate thread if needed. Thanks again for all of your suggestions!

Syndicate content Syndicate content