Previous Entry Share Next Entry
OS X 10.5 font woes
dead mac

Since moving to a Mac a bit over a year ago, I've had only a few reasons to look back (the business with the HP LJ1022 printer being one of them). I'm now rather close to the end of my tether, and the reason is fonts.

As an academic and a computer scientist, I end up writing quite a lot of papers and presentations with maths in them. Like any sensible person, I use LaTeX for typesetting the maths; it's a lot easier to type $\sum_{i=0}^{i=n-1} i^2$ than to wrestle with the equation editor in Word. I've also been using LaTeX for rendering mathematical expressions in lecture slides; there are two tools - LaTeXit and LaTeX Equation Editor - which make putting maths in Powerpoint or KeyNote a drag-and-drop operation.

However, I've spent quite a lot of time over the last week trying to debug a problem with the font rendering of TeX-generated PDF files on OS X. If I wrote a LaTeX file containing the following:

\section{This is a test}
\[e = mc^2 \rightarrow \chi \pi \ldots r^2 \]

then I'd expect it to render something like this:

Preview renders it like that, but not reliably - perhaps one time in eight. The rest of the time, it randomly substitutes a sans serif font for the various Computer Modern fonts. Sometimes it looks like this (missing the italic font):

Sometimes it looks like this (missing the bold and italic fonts):

And sometimes it looks like this (missing the bold and symbol fonts):

It isn't predictable which rendering I get. The problem also isn't limited to CM, but appears whenever you have a subset of a Type1 font embedded in PDF (on my machine, at least); TeX isn't the problem. The problem didn't exist on 10.4. The best guess from the Mac communities is that it's a cache corruption problem with the OS X PDF-rendering component on 10.5 (which would explain why I see the same problem in LaTeXit, LEE and Papers, but not in Acrobat).

I really don't see how Apple could have let a release out of the door with a bug like this - this is surely a critical bug for anyone in publishing.

Edited to add links:

  • 1
Yes, looks like this one:

>> I really don't see how Apple could have let a release out of the door with a bug like this - this is surely a critical bug for anyone in publishing.

Perhaps they didn't see it?

It isn't just there for LaTeX users, though.

There's a chance that it may be an artifact of a frotzed upgrade to 10.5; I've not yet found anyone with the bug who did a clean install, or an archive and reinstall.

Have you tried asking osx-users? That's got a mixture.

Tell me what I need to install and do to try and reproduce it and I'll give it a go; I did an archive & install on both machines. At least that might tell you if doing an archive & install now (not too harmful, surely?) would likely cure the problem...

Which latex version are you using? Have you had a look at their help pages?

I've not moved to leopard yet so can't test this for you, but if it's real it might make me wait a bit longer for a fix...

I'm using MacTeX, which is a largely repackaged version of TeXlive. It's the most recent version, so it's based on TeXLive 2007.

Regardless, I believe that this *isn't* a TeX problem; one of my colleagues reported similar behaviour with the PDF guidelines for our new corporate identity (don't ask). This too contained embedded Type1 fonts, and shows similar behaviour.

Here's the extreme case I mentioned.

(P.S. Do you think I should make my minithesis more readable?)

Some interesting related videos are showing up next to your YouTube video about LaTeX...

See, this just proves that we need the Semantic Web, not the text-scraping web of Google.

Hmmm. Do you want to pass your transfer viva? :)

kpathsea (the library TeX uses to find fonts) is pretty horrific. It works, sort of. I'd guess at problems with that.

It isn't kpathsea. TeX produces a working DVI file without problems, and dvips produces a working PostScript file from that DVI which a) renders correctly in ghostscript and b) when translated to PDF via ps2pdf (or pstopdf), renders correctly in Acrobat.

I see the same problem with other PDF files (not produced by TeX) that contain embedded Type1 fonts, so I'm guessing that it's an issue with the font cache maintained by Apple Type Services.

Best font cache bug I saw was something subtler, where the glyph for 7 was replaced by the glyph for 9. Write 1234567879 in one font, select, change to something else and it became 123456989. 9+9=16; 3+4=9. (via comp.risks)

the hatter

Sadly I've caught this thread too late to help. However It is nice to know that people are still using LaTeX. When I was back at DCT we used to create all our documentation in LaTeX. It was good to get away from Microsoft and I thought the resulting docs just looked nicer. Oh well halcyon days..

  • 1

Log in

No account? Create an account