home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / linux / extra / docs / maillist / text / archive.96 / text1397.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  1.5 KB  |  38 lines

  1. Scott Shuchart (shuchart@fas.harvard.edu) wrote:
  2. : THE PROBLEM:     I need to convert a Mac TrueType font to a Windows TrueType
  3. :              font.  I have a DOS program which does this.  Mac TT fonts
  4. :         are stored in resource forks.  If I take the Mac font
  5. :         and copy it to a FAT volume in Executor, I get a 0-byte
  6. :         data fork-file (fontname, we'll call it), and a good-sized
  7. :         %fontname file (~400k, say).  The problem is that
  8. :         the DOS program can't find the font info. in this file
  9. :         (usually it can detect what kind of info. is in a file),
  10. :         I think because the %fontname file has, in addition to
  11. :         the resources, the finder information.  I need a way of 
  12. :         getting JUST the resource fork, nothing else, into a
  13. :         DOS file.
  14.  
  15.  THE SOLUTION:
  16.  
  17.     The Executor resource forks have a 512 byte information header
  18. that you need to strip off.  Under linux, this can be done by doing:
  19.  
  20.     dd if=%filename of=filename.rsr bs=512 skip=1
  21.  
  22. I don't know how this can be done under DOS without writing a custom
  23. program.  If you need me to write one, I could probably do it in a
  24. few minutes, so let me know. :)
  25.  
  26. BTW, the executor header may of variable length, it has just been my 
  27. experience that 512 is the magic number.  Executor staff care to comment?
  28. Is there a variable length structure in the executor resource header?
  29. If so, how does one calculate the resource offset?
  30.  
  31. See ya!
  32.     -Sam Lantinga            (slouken@cs.ucdavis.edu)
  33.  
  34. ---
  35. Author of Maelstrom for Linux, and another happy Executor customer. :-)
  36. ---
  37.  
  38.