[Prev][Next][Index][Thread]
Re: Resource -> Data fork help
Scott Shuchart (shuchart@fas.harvard.edu) wrote:
: THE PROBLEM: I need to convert a Mac TrueType font to a Windows TrueType
: font. I have a DOS program which does this. Mac TT fonts
: are stored in resource forks. If I take the Mac font
: and copy it to a FAT volume in Executor, I get a 0-byte
: data fork-file (fontname, we'll call it), and a good-sized
: %fontname file (~400k, say). The problem is that
: the DOS program can't find the font info. in this file
: (usually it can detect what kind of info. is in a file),
: I think because the %fontname file has, in addition to
: the resources, the finder information. I need a way of
: getting JUST the resource fork, nothing else, into a
: DOS file.
THE SOLUTION:
The Executor resource forks have a 512 byte information header
that you need to strip off. Under linux, this can be done by doing:
dd if=%filename of=filename.rsr bs=512 skip=1
I don't know how this can be done under DOS without writing a custom
program. If you need me to write one, I could probably do it in a
few minutes, so let me know. :)
BTW, the executor header may of variable length, it has just been my
experience that 512 is the magic number. Executor staff care to comment?
Is there a variable length structure in the executor resource header?
If so, how does one calculate the resource offset?
See ya!
-Sam Lantinga (slouken@cs.ucdavis.edu)
---
Author of Maelstrom for Linux, and another happy Executor customer. :-)
---
References: