A: 

Look at the pdf in Adobe Reader under the document properties. If you have Type 3 (?) bitmap fonts for the math, you need to tell the driver to embed the proper Type 1 vector fonts into the resulting document.

I use latex with dvips then pdf on linux. It used to be I had to tell it to do this, but now it seems at least the package on ubuntu has the proper font setting.

Look on the web to tell you how to embed the proper fonts into the document.

On second thought, maybe you don't have any of the fonts installed on your system or none of your fonts are being embedded into the document.

Smart, although this turned out not to be the problem. See the answer I added.
dreeves
A: 

I'm a bit surprised by your problem with MacTeX. I recently installed the 2008 version and it is working like a charm, be it pdftex/latex or xetex/latex. Even with the previous teTeX installed I had, fonts were not a problem. Can you put your foo.tex somewhere for us to test?

Keltia
It's definitely not the fault of the tex file. See the answer I just added. It seems to be the combination of TeXniscope and Leopard. If anyone can confirm or deny that, please do let me know!
dreeves
Confirmed. See the answer I added.
dreeves
+1  A: 

It seems I found the answer, from http://www.stat.duke.edu/~dmm36/tech.php, pasted below. Alas, it appears I have to give up TeXniscope. I like TeXniscope much better than Skim because it's much simpler, has better keyboard shorcuts for paging, and Skim makes you manually refresh the pdf every time there's a latex error (otherwise Skim auto-refreshes).

Quoted from http://www.stat.duke.edu/~dmm36/tech.php:

After recently upgrading to Leopard, something very strange and terrible began happening with pdf files created by latex (MacTeX 2007 distribution). The punchline is that fonts were not being displayed correctly by any application that used Apple's native pdf engine (e.g. preview.app, skim.app, Texniscope.app, LaTeXit.app, but not adobe reader 8). More mysterious was the fact that the same document could render differently on multiple openings.

Much googling ensued, until I found a thread on the mac tex newsgroup which suggested that the problem lay in corrupted font caches. Another search brought about this hint on how to delete all font caches in Leopard. From the terminal, issue the following commands:

sudo rm -rf `lsof | grep com.apple.ATS/annex.aux | grep Finder | cut -c 66-139`

(replace lsof with /usr/sbin/lsof if /usr/sbin is not in your path)

sudo rm -rf /private/var/folders/*/*/-Caches-/com.apple.ATS

And then reboot. This fixed the font problem for me.

NB: part of this problem appears to be the result of TeXniscope.app screwing up the font cache. For example, if you delete the font cache, reboot, and open something in preview it will look fine, but as soon as you open something in TeXniscope again, back to the drawing board. If you are experiencing this problem and using TeXniscope as your pdf previewer, (as in aquamacs), you should switch to Skim as your pdf previewer. It's pretty nice, and the Skim wiki has instructions for how to integrate it with Aquamacs. TeXniscope isn't under active development anyway.

dreeves
I have occasionally had that kind of problems on Leopard even though I have never used Texniscope. It just seems to happen randomly. I have used OnyX from http://www.titanium.free.fr/pgs/english.html to clear my font caches.
Jouni K. Seppänen
+3  A: 

Apple knows about the problem and isn't planning to fix it (I had a faculty member spend a lot of time testing and submit a bug to Apple). Their claim is that PDFTeX is embedding the fonts incorrectly, and they have fixed the Apple PDF library to be more strict about what it will and won't accept, which means that you will continue to see problems with PDF documents created with PDFTeX in Preview, TeXShop, or other tools that display PDF using Apple's PDF engine. Unfortunately, they weren't at all clear about exactly what it is that PDFTeX is doing wrong, which makes fixing it or even reporting the bug to the PDFTeX developers problematic. Note that Adobe's Acrobat or Reader applications can often display these documents without any problems; presumably Adobe's error-checking is more liberal than Apple's.

You can actually recover from this problem without rebooting, although you may see it recur with the same document in the same session. You need to run

atsutil server -shutdown

which will kill the Apple Type Services server daemon (ATSServer) and spawn a new instance, coincidentally rebuilding its cache files.

Claire
"claim is that PDFTeX is embedding the fonts incorrectly" I would be *very* surprised if this is true. Acrobat 8 has no trouble working with pdfTeX files, and pdfTeX with microtype uses per-line font scaling with transformation matrices; if the fonts are embedded wrongly, that shouldn't work at all.
kquinn
See my answer, the bug was indeed in pdftex :) Doesn't excuse Apple not helping pinpoint the bug though.
Damien Pollet
+2  A: 

TUG recently released updated binaries fixing the bug that triggers the font cache corruption : http://www.tug.org/mactex/fontcache/

Damien Pollet
Oh! Does this mean I can use texniscope again? Skim is driving me nuts. See: http://stackoverflow.com/questions/738755/dont-make-me-man
dreeves
I don't know, texniscope apparently hasn't been maintained since 2004... About Skim, that behavior is indeed annoying, I'd submit a bug/feature report to the developers about that.
Damien Pollet
There are a number of ways that a font can be embedded incorrectly that can generate "renderable" documents. This can include, incorrect font metrics, incorrect outlines, incorrect subsetting, incorrect hints, incorrect licensing (ie, embedding a font that forbids embedding). Further, Acrobat may look at the font and decide "oh yeah, I know that font" and ignore it or if the font generates errors, Acrobat may say, "hey, the embedded font is wrong, but I have a database of metrics I can use to create a faux equivalent".
plinth
+1  A: 

This bug has driven me nuts. Inspired by this hint, here is the best way I found to cope with it, namely executing the following sequence in a shell:

atsutil databases -removeUser
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping

You may add it this sequence in a shell function in your shell config file (mine is .zshrc):

function atsrm()
{
  atsutil databases -removeUser
  sudo atsutil databases -remove
  atsutil server -shutdown
  atsutil server -ping
}

...and simply call atsrm in a terminal to purge the font cache. Be aware that Skim will crash if it was open, and some application may display some characters improperly, so you will have to restart them.

Olivier