Sent Fonts have lost some metrical information

Eluard's picture

Hi Folks — I have a very strange problem that I'm hoping someone might have seen before and know the answer to.

I've been sent some fonts on a CD and some of the fonts have lost their word spaces! Apparently they were designed on a Windows machine, but the sent files were intended for the Mac. There are the post script outline files and the bitmaps, as there should be. The files themselves were not sent compressed on the CD. My Mac is running 10.4.11. Some fonts seem fine; others have lost their word spaces and so appear as an unbroken string of letters.

Does anyone have any idea what has happened here?

best

El.

twardoch's picture

How do you know that the word spaces were ever there? Do you have some sort of before-after comparison? What applications?

A.

Eluard's picture

Hi Adam - The fonts were sent to me by the type designer and he assures me that they were there. In his own uses of the typefaces I can see that they are there as well.

The programs in which the spaces didn't show up were Word and Text Edit. He (the type designer) is as baffled by this as I am.

best

El.

cerulean's picture

The only thing I can think of is if he somehow created a space of zero width that only works by positive kerning with the set of all other characters. Or vice versa, a space with correct sidebearings but kerning that makes it disappear. I don't know how one would do either of those things by accident, but see if there's a difference if you turn kerning on or off.

Nick Shinn's picture

It seems like a font name conflict, with the metrics coming from a different font.
Some applications (eg Adobe) other than Word and Text edit may use different name info--there's certainly lots to choose from in a font!

charles ellertson's picture

The thing is, if the application program uses the space from a font, it isn't "metrical data" but a character. A TeX dvi file is the only thing I know of where a space is "metrical data."

My wife had something similar happen with InDesign and a job that mixed OpenType and Type 1 fonts. When they made a PDF, the spaces went away. They finally got them back, don't remember how.

I would suggest that as a start, the fonts be resent, but zipped or stuffed. Second, would be to remake the Mac fonts from the Windows format. Of course, all this assumes you're not violating a license; couldn't recommend that.

Eluard's picture

Hmmm thanks guys. Curiouser and curiouser. I'll have to put it in the hands of the type designer and see if he can see if there was a problem with the initial conversion. I guess that's the most likely thing.

Mark Simonson's picture

One thing your type designer friend should check for is whether the font has an "HT" (horizontal tab) character--it shouldn't. I seem to recall a problem with some Type 1 fonts that cropped up with OS X wherein, if there was an HT character in the font, OS X would use it instead of the "space" character in TextEdit and some other apps. It seems that Fontographer would (sometimes? always? not sure) add the HT character automatically, giving it a width of zero. Hence, it would look like the space character was missing.

Eluard's picture

Well I've checked and the space "character" is certainly there in the font, so the problem must be that it isn't being read. Mark, what slot does this HT character typically occupy. If I can find it I could probably just delete it to make everything work fine — or give it the same width as the space character.

charles ellertson's picture

The horizontal tab is 0009. The space is 0020 hex (or 32 decimal). The HT character may well be in the files where you see no spaces, if it is, just take a look at the hex.

Nick Shinn's picture

What I meant by name conflict is that the characters from one font will be crammed onto the metrics of a narrower font, making it look like there are no spaces -- and also tight tracking.

Can you post a visual so we can see what the problem looks like?

Eluard's picture

I think the problem is this horizontal tab character. It is indeed present and does indeed have zero width. I have the slightly clunky fix of first giving that character the same width as the space character. Then I save the entire thing as otf rather than ps 1. Now the spaces are in the font as they should be — and I needn't care where the word spaces are coming from.

But is it possible in Font Forge to simply delete the horizontal tab character? I suppose that would require undefining that slot. Is that possible? Clearing the slot doesn't do it since it is already clear.

As to name conflict: yes the names are really all over the place on this, but no amount of editing them is making the problem go away. And the problem is occurring where there are no condensed fonts.

One last bit of info: the fonts were made on Mac 8.6 and I don't think they've previously been tested on OSX.

A very intriguing puzzle though!

charles ellertson's picture

I have the slightly clunky fix of first giving that character the same width as the space character. Then I save the entire thing as otf rather than ps 1. Now the spaces are in the font as they should be

Maybe. I don't mess with Macs, so I can't test this. But if the presence of the HT character in the font causes the "space" in text file to be hex 0009, all you have done is leave a time-bomb. Consider justified copy . . . Consider an XML file made from a Word document where the "spaces" are really a HT . . .

Eluard's picture

Hi Charles — yes, I agree. I'm still looking for the better solution.

But here is an update: this problem seems to be fixed in OSX 10.5.2, because the fonts that show up in the menu actually work properly. (The downside: not every weight shows up in the menu!)

Mark Simonson's picture

Charles, the bug doesn't change spaces to HTs in the text file, it just affects how spaces are displayed on-screen in some fonts. It's still encoded as a space when saved to disk. So El's workaround shouldn't cause any problems. The better solution, however, is to remove the HT character from the font. There is no reason for it to be present.

charles ellertson's picture

Thanks, Mark

And really off topic, are you another graduate of the Triangle Bar (& Koerner, Ray, & Glover)?

Mark Simonson's picture

Ah, yes. The West Bank. I know the bar, but I don't think I've ever been there. Or maybe once a long time ago. I seem to recall seeing 2/3 of Koerner, Ray & Glover one time back in the eighties. Probably at the 400 Bar.

Eluard's picture

Thanks for your help guys — it's been invaluable. I said above that this bug seems to have been fixed in 10.5.2. I'm not 100% sure of that. I had a case crop up, but now I can't reproduce it. So Leopard may still have a little way to go before it irons out this problem.

Font Forge doesn't have an obvious way of simply undefining a slot — not that I have been able to find — so I've done the next best thing and changed the slot to .not def. Actually I suspect that just saving the outline file to OTF makes this problem go away because I think OSX.4 understands where to get the space character with open type fonts. At any rate, I have been able to get the font to work reliably now so thanks. (I've even added extremal points, corrected directions, and added autohints.)

Nick — sorry, I couldn't post an image as it would have been breaking a confidence.

Cheers to you and thanks again

El.

Syndicate content Syndicate content