Wingdings (or, Can YOU crack the code?)

Conrad Knauer atheoi at gmail.com
Sat Aug 9 22:41:19 UTC 2008


A bit of a follow-up to the Tahoma thread; as I've chronicled on
https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/50529
I've discovered that MS Word allows you to embed certain fonts (based
on a 4-tier licensing scheme) inside files it creates; what's even
more interesting is that for the most 'permissive' embedibility, a
font "may be embedded in documents and permanently installed on the
remote system" :-)

When the Word97 viewer (what I tested, with Wine) opens the file, if
the font isn't already installed, it automatically extracts and
installs the font onto that computer in C:\windows\Fonts (yes, that
sounds like a security risk to me, but hey, its Microsoft, ne? :) So
here's the puzzle:

I created a RTF file with Wingdings embedded into it:
http://launchpadlibrarian.net/16679172/Wingdings.rtf
(with a legit copy of Word 97 I bought at a thrift shop for $2!  Take
*that* Microsoft! ;)

The Word 97 Viewer:
http://downloads.sourceforge.net/corefonts/wd97vwr32.exe
Outputs a TTF the exact same size as the orignal Windings font (though
not the same MD5SUM, curiously).

Now, inside the RTF is a very long batch of what looks like
hexadecimal which is the font in some sort of encoded/compressed
manner; the text itself is almost exactly the same filesize as the
font, so the conversion is hopefully not hugely complicated.  Indeed,
it seems that OO.o is working on this:

"Currently we do nothing with these (fairly rare) embedded fonts,
though if you are a developer you can examine
sw/source/filter/ww8/ww8par.cxx SwWW8ImplReader::CoreLoad and search
for the comment "experimental embedded ttf dumper" which shows how to
enable dumping the embedded font data."

http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=59931

But what would be really handy would be a little app to go something like:

$ rtf2ttf Wingdings.rtf

and out would pop the file :)  It would not be long then until
msttcorefonts could add Arial Narrow and Wingdings (maybe a new
package 'msttmorefonts' ;)

Can anyone here create such a thing?  As software libre, of course ;)

Sincerely,
Conrad Knauer




More information about the Ubuntu-devel-discuss mailing list