There are a variety of situations in which, when you start iWork tools, for example Keynote, you get a bunch of whining about missing fonts. This can be fixed by hand.
Here’s an example of the kind of message I’m talking about:
Here’s the dialog text so search engines can find it:
Missing Font TimesNewRomanMS (Master slides:...)
The problem is that someone worked on this presentation on a system that had those fonts available and they got sucked into the preso somehow. The current system doesn’t have them. In the particular case shown above, someone managed to pull in some Microsoft Office fonts, and I no longer have Office on this computer.
What You Can Do · Well, in many cases, if you hunt around you may be able to find the fonts and download them. For example, you can go and get the Microsoft Office “Test Drive” which as a side-effect installs the font.
On the other hand, you may not want to do this, or maybe you can’t find the fonts. You can still fix the problem, via The Awesome Power Of XML.
Suppose your presentation is named Foo.key
. It turns out that
Foo.key
is a directory, and in that directory there is a file
named index.apxl.gz
. This is a very large gzipped XML file with
no line breaks, containing most
of your presentation. What you want to do is edit it, find the places where
the names of the missing fonts appear, and replace them with the names of
similar fonts that you actually have.
I achieve this effect by simply opening index.apxl.gz
with
Emacs, which can handle multi-megabyte gzipped XML files sans
newlines. (Not happily, it groans almost audibly.) Then I did a
global-replace of, in the case above, "TimesNewRomanMS"
by
"TimesNewRomanPSMT"
. Ah, you ask, how did you find out the
right name to use? That trailing “PSMT” isn’t obvious, and indeed, I got it
wrong first time. So I created another scratch presentation, put in some text
in Times New Roman and peeked in its index.apxl.gz
.
I’d been putting up with this for a couple of years. Everything opens faster now.
Comment feed for ongoing:
From: stuart yeates (Nov 14 2008, at 13:47)
Just for the record, this was the use case for which sed(1) in the POSIX suite was designed. While it's gone out of favour recently, it's still widely used.
The real question is when we'll see a version of these tools that's 8bit clean can safely be used with XML/Unicode.
[link]
From: ncodding (Nov 14 2008, at 14:40)
If you upgrade to iWork '08, the warnings dialog will have an option to replace uses of the missing font with a font of your choice: http://nate.codding.org/images/random/kn4-fontreplacement.png
[link]
From: Ed Davies (Nov 14 2008, at 15:57)
XProc?
Dunno, but I wonder if it does .gz. Hark, is that the sound of Norm coding?
[link]
From: Bob Aman (Nov 15 2008, at 07:33)
I was going to say that this seems like something that should be automated, but I like Nate's solution better. :-D
[link]