Postscript OSX rendered problems, but good in Adobe apps?

peterbruhn's picture

Is sthere anyone else who have problems with some of you PS1 fonts loses the spacing in OSX rendered apps, but see no problem in Adobe apps?
This can be random fonts in a typefaces family.

Anyone who's knows anything about this.

Grant Hutchinson's picture

I have been discussing this same issue with Peter and can duplicate the problem on a fresh OS X installation - so it doesn't appear to be related to any font management utilities or other system extensions. The same fonts work perfectly under OS 9. The problem exists in several other libraries as well, just not every face is affected. Regenerated the font does not always fix the problem.

Here are a couple of screen captures illustrating what we are seeing.

The first image shows Fountain's Eric Sans and Udo families as they appear in Apple's TextEdit. Note that the space character appears to be complete missing from the italic weight of Eric Sans, while the word spacing is double what it should be in the Udo weight.

The second image shows the same faces displaying with the proper spacing within Adobe InDesign 2.0.2 ... in fact any Adobe application under OS X (including CS versions) displays the fonts correctly. I am assuming that this is due to Adobe applications using CoolType to render text, rather then Apple's OS-based services.

Eric Sans and Udo in TextEdit

Eric Sans and Udo in InDesign

Thoughts on this, anyone?

peterbruhn's picture

Is it a bug in OSX? If so, then it's pretty big bug!

Grant Hutchinson's picture

I can't see how it could be not be related to something in the way OS X renders PostScript typefaces. Like I mentioned before, the same fonts work perfectly well in OS 9. The same fonts work in Adobe applications which do not use the same method of rendering text. The fact that these odd spacing issues follow through to the printer indicates something dreadfully wrong with the way the operating system is handling the fonts.

Mark Simonson's picture

Have you tried clearing the font cache? You can do it with a utility such as Font Finagler.

peterbruhn's picture

Yes, tried that. I've checked the Apple forums & people have experienced problems with PS1 fonts on regular Apple applications.

twardoch's picture

Grant, Peter,

Mac OS 9 and Adobe applications use Adobe software (ATM/CoolType) to render the Type 1 fonts. Mac OS X uses Apple's own ATSUI renderer. The most obvious differences are visible with hinting. Mac OS X displays some extreme deterioration of screen display of Type 1 font, which is "ironed over" a bit when the type is antialiased. But it's thoroughly possible that other aspects of the fonts, e.g. metrics, kerning, or special treatment of particular characters, is realized differently in the ATSUI model by Apple than in the ATM/CoolType model by Adobe.

Regards,
Adam

Mark Simonson's picture

I think I may have figured out what's going on.

It seems to have to do with the HT character in the low ASCII range. If a font has a character defined there, the Apple rasterizer seems to display that instead of the usual space character when you type a space. Most T1 fonts don't have an HT character defined, which is probably why most T1 fonts don't have this problem. I wonder if this is some UNIX/Next thing from way back?

I've found a few on my system (including some of my own) which do have the HT character and they all exhibit this behavior. I don't remember adding this character to the fonts in question, but I do recall that it's easy to inadvertently define a character in FOG simply by selecting the character cell.

peterbruhn's picture

Mark, that makes sense, at least too why the spacing is so wide in Udo & the very narrow in EricSans Italic. But the other fonts in those 2 families have the same width in the HT slot.
What would be a "defined character"? There's no vector points in that slot.
And what would be a solution? copying the "Space" width to "HT"?

Mark Simonson's picture

I think the solution would be to delete the HT character from the font. There's no reason to include it anyway.

You can tell if it's been defined by opening the Type 1 font in FontLab. If the glyph cell is white, then it has been defined. It's not necessary for it to have any vector points to be defined. For instance, double-clicking on an empty (gray) cell in FontLab will define a new glyph 1 em wide with no outline data.

The reason I know it's the HT character that's causing the trouble is because one of the fonts I tested is an old font I made which has a particluar character in that slot, and that character showed up instead of the expected space character in TextEdit and FontBook. I have a hunch there may be other low-ASCII characters causing problems as well in some cases.

I think the rule here is: Don't define any low ASCII characters except for the ones which are part of the MacOS Roman character set (e.g., Eth, eth, etc.). It didn't used to be a problem because the Adobe rasterizer ignored them, but apparently Apple's OS X rasterizer doesn't.

Mark Simonson's picture

BTW, in FOG you can tell if a character has been defined by the bold outline on the top of the character cell. Also, in FOG the HT character is labeled "TAB".

peterbruhn's picture

I checked & yes

Grant Hutchinson's picture

Thanks for the clues Mark. Great sleuthing.

This is all making much more sense now. The difficulty I was having was determining whether some component of the fonts themselves were the trigger. Up until now, I wasn't able to see anything obviously different between faces that worked and those that displayed the spacing problem.

I am going to regenerate a few of the Test Pilot Collective and Virus faces that I have source files for and try to confirm that this is the case.

Mark Simonson's picture

In FontLab: Select the glyph cell and then hit delete on your keyboard.

In FOG: Select the character cell and choose "Clear" from the Edit menu.

Mark Simonson's picture

>The strange thing is that so are the slots in the Regular, which doesn't show the same problem as the italic.

I'm not sure why that would be, but it's obviously unintended behavior and may not always happen for some reason we haven't figured out yet.

No doubt those slots were really meant to be left undefined, but since it didn't used to cause problems, it didn't used to matter. I bet programmers have a name for this sort of thing.

Grant Hutchinson's picture

> I bet programmers have a name for this sort of thing.

It's called 'somebody fucked up'.

Pardon my French.

Mark Simonson's picture

Hey, Grant, I think you found a bug in the Typophile Censor-O-Matic™. :-)

Grant Hutchinson's picture

Say, you're right.... I wouldn't have cussed verbatim if I'd known it wouldn't be obscured.

Mark Simonson's picture

There's probably a word for that, too, but it might be better to keep it to yourself. :-)

Grant Hutchinson's picture

Ok, I'm back...

I successfully regenerated the PostScript versions of one of the font families that we had discovered this problem in. Clearing the HT glyph slot in FontLab and spitting out fresh files seems to do the trick. I cleared the font cache files with Cocktail prior to installing the new fonts and viewed/printed them using TextEdit.

Here are some screendumps and additional commentary documenting what happened.

1. Original Unactivated Fonts in FontAgent
http://www.flickr.com/photos/splorp/4424322/

2. Same Fonts Activated
http://www.flickr.com/photos/splorp/4424324/

3. FontLab Showing Occupied HT Glyph Slots
http://www.flickr.com/photos/splorp/4424326/

4. Regenerated Fonts Activated in FontAgent Pro
http://www.flickr.com/photos/splorp/4424323/

Thanks again Mark. I don't know how you managed to track this bug down, but it's appreciated. I suppose one or more of us should report this to Apple...

Mark Simonson's picture

Glad to be of service. I remember noticing this once but forgot to look into it. I'm glad it came up.

As I mentioned briefly above, I have a font I made which has a glyph in the HT slot (don't ask) and as I went font by font through FontBook to see if any of my installed fonts had this wierd spacing problem, it stuck out like a sore thumb. Instead of a space it displayed the glyph the I had stuck in the HT slot. Mystery solved.

Grant Hutchinson's picture

I think I have enough information here, so I am going to try to submit a bug report specific to ATSUI and this reproducible problem. I can access the Apple Developer Connection bug reporting site through my developer account . I think this might be a better way to get this addressed than through the normal consumer-level bug reporting channels.

Syndicate content Syndicate content