Problem with font when printing Office (PowerPoint/Word) to PDF

Nick Job's picture

I have a technical problem. I am working on Windows 7. I am designing a font in FontLab Studio 5.

I have generated a font and installed the latest version of it (an *.otf file) into my Fonts folder. All good so far.

The font is there and works in every package. Still all good.

The only problem I have is that when I come to print to PDF a Word document (or PowerPoint presentation) with the font in it, the output shows a PREVIOUS version of the font, not the current version in the Fonts folder (even though the documents themselves show the correct fonts and also print correctly to hard printers).

Corruptness somewhere...

Is there such a thing as a Microsoft Office font cache and how do I clear it?

Cheers,
Nick.

HVB's picture

The font cache file is located here: C:\Windows\System32\FNTCACHE.DAT
Delete the file and restart your system.
THEN delete the installed font.
For general testing purposes, you don't have to install the font in order to use it. Just open it (by double clicking). It will then be available to any application that you start AFTER opening the font.

Nick Job's picture

Thanks HVB but I have tried that already (deleting FNTCACHE.dat and restarting) and the problem is persisting. It's like the wrong font gets used in the PDF output.

When I print to PDF, the font used in the output is not the most up-to-date version that is installed.

Any other ideas..?

HVB's picture

A basic one - is the embedding flag correct and are you embedding the font properly?

J. Tillman's picture

Are you saving the PDF file as a different name to avoid any weird PDF-cache?

Nick Job's picture

@HVB
Not doing anything different from six other weights. It is just the one weight that is misbehaving and substituting a rogue earlier version but only when I print from Office applications to PDF.

@J. Tillman
Is there a place where any PDF cache is saved as far as fonts are concerned. I'm thinking of reinstalling Acrobat to see if that fixes the problem.

Any thoughts?

HVB's picture

Nick - this is the first time that you mentioned that more than one font file is involved. A very common problem with a group of fonts in the same family is their names. In Windows and Microsoft applications in particular, multiple font files with the same family name can be problematic. Such products can consistently recognize only four members of any given font family - regular, bold, italic, and bold-italic. Other varieties, whether Heavy, Outline, or anything else, require separate font family names. Otherwise, what you see and what gets used can vary, and can depend on which font is opened first.

Adam Twardoch (in the fontlab forum) and Tom Phinney (I'm pretty sure) have posted specific font naming methods that ae said to allow different style names to be properly recognized. The one time I tried it I probably did something wrong.

- Herb

Nick Job's picture

Sorry Herb, I should have explained.

All 7 font weights are named differently (for the time being at least!), i.e. not with family naming conventions.

They are called NameThin, NameLight, NameRegular, NameMedium, NameBold, NameHeavy, NameBlack.

They are all saved as regulars (in spite of being different weights); there is no linking within them whatsoever. I figured that way nothing would go wrong...for now!

It is only the Regular that is causing me the problem and only from Office to PDF.

I have renamed it and the problem has gone away. It's like there is a NameRegular ghost in the machine from a previous version that was installed a while ago and no amount of reinstalling the font into my Fonts folder is making it go away.

Boohoo :(

eliason's picture

How long is the name (I assume "n a m e" in your post is actually a different font name in the font settings)? I've run into problems if the name is too long, and I notice that "regular" has more letters than any of the other style names. Just a thought.

Nick Job's picture

That's intriguing, Craig. It is 7 letters long so the whole name is 14 characters... too long? Surely not.

Plus, the problem isn't the name but the fact that there is this ghost from a previous version that is refusing to be shifted from the PDF output, even when the latest version (with 14 characters) is installed.

Cheers,
Nick.

eliason's picture

No, that's definitely not too long.

Nick Job's picture

So, anyone else got any ideas?

I'm about to uninstall Acrobat and reinstall it.

Nick Job's picture

So uninstalling and reinstalling Acrobat made no difference, the old font is still showing up when I print from Word to Acrobat, which suggests the problem is with Microsoft Office.

So I ask the question, does Office have a Fonts cache somewhere that can be deleted?

Please don't say C:\Windows\System32\FNTCACHE.DAT ...I've tried that already and it did nothing.

HVB's picture

No, neither Word nor Office has anything like a font cache.

Now clutching at straws, but ...

What Windows and Office do have, though, are font substitution tables. These usually say to use font B if font A isn't available, which doesn't seem to be your case, but one never knows. You've never said what the font name itself is. There is one hidden truetype font, Marlett, as well as over 150 hidden .fon (bitmap screen display) files in the windows folder. As unlikely as a name conflict would be, who knows!

Run Start/Run/Regedit and look in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
and
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

to see if there's anything there that resembles your problem font or file name.

If not, you could search (edit/find) for some recognizable portion of your font name and/or its file name to see if it's already in there somewhere

And, of course, DOUBLE-CHECK your font and file names - it's possible that somewhere along the line you've named the 'old' and 'new' versions slightly differently. Something almost invisible like two spaces instead of one, or a zero instead of an oh.

As I said, clutching at straws! At some point someone (probably you) will find the problem and its solution and will be something extremely simple and obvious!

kentlew's picture

Nick — This is also clutching at straws, but . . . As a diagnostic step, have you taken the resulting PDF and moved it to another machine to see if it still displays the old version of the font?

My thought is to determine whether the old font is embedded in and travels with the PDF, or whether perhaps it’s an issue just within your specific system displaying the old font.

This might help sort out whether it’s Office that is accessing the old font and putting it into the PDF, or whether it’s something about the system and Acrobat that is calling the old font for display.

Does that make sense?

Nick Job's picture

Kent, the pdf travels to other machines with the glitch file embedded in it. Thanks for the suggestion though.

Herb, I have looked in the registry as you suggest and it turns out that every re-install of the font results in the font file having a new name...

It does it on the basis of hexidecimal numbers (FontnamRegular.otf, FontnamRegular_1.otf, FontnamRegular_2.otf ... FontnamRegular_F.otf, FontnamRegular_10.otf... etc.) so I reckon when I got to FontnamRegular_F.otf is was fine but I think the minute I went for a sixteenth version install, it took the name above 16 characters (i.e. FontnamRegular_10.otf) and maybe 17 characters is just too many for it to manage?

All my other names were shorter than Regular (Thin, Light, Medium, Bold, Heavy, Black) and so maybe the others were not affected.

Anyway, somewhere in the registry must be a place where the computer knows it has had a font with the same name installed before and therefore makes a new name for it in the registry. The question is, where is this information stored? Must be a simple text file I would have thought.

Intriguing. Any thoughts on where the computer stores the previous font names that have been installed in the past?

I feel like I may be making some progress.

Cheers,
Nick.

Nick Job's picture

Having said that about 16 characters, there are loads of fonts in my fonts folder whose filenames are bigger than 16 characters. The plot thickens.

Nick Job's picture

Turns out that the additional hexidecimal number that the system adds to the font name is only activated if you are replacing a font that is already installed. If you delete the old font first, the name remains unaffected. However, if you delete subsequent versions and install again, the system adds the hexidecimal number whatever happens. It cannot seem to cope with going back to the original name once a replacement version has been installed without deleting the previous version.

New question then, where does the computer store the names of fonts that have been previous installed? It must store the names somewhere or how would it know to add '1' to the last name used in the registry.

Nick Job's picture

I'm thinking the moral here is to delete the font prior to reinstalling another version of it. Don't ever replace the existing font as it will change the name of the font in the registry by adding a version number of sorts.

HVB's picture

You cannot install a font that's already installed. You must first uninstall. But there's still something peculiar going on - if you try to install a font that's already installed, you would ordinarily get a diagnostic message saying exactly that. I have never heard of multiple registry entries such as you've found.

How are you installing the font, and how are you installing new versions of your other font variants?

Nick Job's picture

So in Windows 7, in Windows Explorer, I go to the font I want to explore and right click. In the dialog box there is an option to Install (because it's an .otf file). I click install and it tells me that there is already a font installed with that name, do I want to replace it? I hit 'Yes' and it overwrites the old font with the new one (but also changes the name in the registry by adding a hexadecimal version number after an underscore). My Fonts folder does not show this additional version number in the name. I have to go to the registry to see that the name of the latest version installed also has a version number in hex.

Either way there is still an old version of the font knocking about whenever I print to pdf/Acrobat from Office.

Si_Daniels's picture

Nick can you contact me off-thread... simonda@...

Office is interested in repro steps.

Cheers, Si

HVB's picture

In XP and Vista, if a font is in use (which means that it has been opened during the current boot session) you can neither replace it nor delete it. You get an error diagnostic message saying something to that effect.

Syndicate content Syndicate content