![](https://secure.gravatar.com/avatar/e3b872c29e07171f8cccdbd6462573f9.jpg?s=120&d=mm&r=g)
On Oct 30, 2009, Oliver Buerschaper wrote:
I seem to have spoken too soon. The very next document I prepared had the same boxes-rather-than-letters problem.
That said, I cleared the font caches again and, after restarting, the document looked correct. Perhaps this is a coincidence. Or perhaps there is something amiss with the way my computers are caching fonts. Sigh.
Well, if your engine is pdftex (from an unpatched TeXLive 2008) then chances are you're running into the nasty (TM) font cache bug:
http://www.tug.org/mactex/fontcache/
Oliver
The symptoms seem right: strange, unpredictable display problems with Apple's pdf software but not Adobe's. And it's not just pdftex, apparently. They say that luatex is affected too. That's primarily what I use. So we have both known symptoms (sort of - they're vague) and an allegedly known cause. Perhaps we have a diagnosis. Here is Dick Koch, "A Fix for the Corrupt Font Cache Bug" http://www.tug.org/mactex/fontcache/Font-Cache-Bugfix.pdf
The “corrupt font cache bug” on OS X has been traced by Melissa O’Neill to a bug in pdftex, present in that program since 2004. The incorrect code is also used in other programs, notably dvips, luatex, and metapost. …
The code containing the pdftex bug was used with little change in modern versions of dvips, so fixing the bug in dvips was not difficult. However, it wasn’t so easy to find the corresponding code in luatex and metapost. Instead of waiting for decisive fixes in these programs, we decided to just release the fixed pdftex and dvips. This should fix the bug for most users. Notice that pdftex is used when typesetting in “pdftex” mode and dvips is used when typesetting in “TeX and DVI” mode. XeTeX does not have the bug.
And in another document, "Looking over the Debugger’s Shoulders ", Koch summarizes what they discovered this way: http://www.tug.org/mactex/fontcache/Debugging.pdf
Two bugs contributed to the problem. First, pdftex, dvips, luatex, and metapost were not correctly subsetting certain fonts. And second, a large number of fonts contained subroutines which did not conclude with a RETURN command. Many of these were created with the utility mmpfb, which has been patched.
Question: is this still a problem for luatex 0.44? (Please say no). If not, perhaps I should clean my caches and use only MkII/XeTeX. Even then, I gather that old documents created with luatex will still be little time bombs (see Appendix, below). I guess I have to delete all pdfs made by luatex and regenerate them as needed. That's a lot of documents. "Nasty" is right. Oy. mjg Appendix: Koch's explanation of why the font cache might become corrupt seemingly for no reason at all. http://www.tug.org/mactex/fontcache/Font-Cache-Bugfix.pdf
When GUI programs display pdf files, they call Apple’s internal pdf routines. In turn, these routines call Apple’s font routines to construct bitmaps for the outline fonts. These Apple routines store the bitmaps in a font cache to speed up future display. For reasons unknown until recently, this font cache can become corrupt; this is “triggered” by displaying a defective pdf file. After that trigger, display problems persist for all files. To fix the problem, the font cache needs to be rebuilt, as happens when the machine is rebooted. Adobe Acrobat does not use Apple’s pdf display routines, so it is immune to the bug. ...
Once you install the repaired pdftex and dvips binaries, pdf files created by these programs will not contain damaged fonts and thus won’t trigger the bug. But unfortunately, your old pdf files may still be damaged. In addition, users on other platforms won’t have the repaired binaries for some time, so pdf files sent by colleagues may still be damaged and trigger the bug. That is why you may still experience the bug from time to time until the TeX world catches up.
It isn’t even necessary to display an old damaged pdf file to trigger the bug, because Apple’s QuickLook software and the software in Finder which gives a miniature version of the first page in the file browser can trigger it. If you keep experiencing the bug after applying the fix, you may need to retypeset files which you often open.