The attached patch adds detection, based on the file format used in the 'fondu' utility.
I'm not on an OSX system, so I tested it thusly: $ ufond -dfont /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf $ file -m macintosh Verdana.fam.dfont Verdana.fam.dfont: Mac OSX datafork font, TrueType Note that the patch won't work with file 4.24-4; the relevant data is at the end of the file, and it returns only nulls if I try to seek that far. This also means that the originally-attached testcase doesn't work with this patch, since the file is truncated. The patch does work with file-5.00 (the upstream version), and the patch is provided against the magic there. Please let me know if you run into any trouble with the patch, or have any questions in general. Adam Buchbinder
Author: Adam Buchbinder <adam.buchbin...@gmail.com> Description: Add support for Mac OSX datafork fonts. (Closes: #291908) diff -Naurp file.orig/magic/Magdir/macintosh file/magic/Magdir/macintosh --- file.orig/magic/Magdir/macintosh 2009-02-20 10:40:47.000000000 -0500 +++ file/magic/Magdir/macintosh 2009-03-04 12:19:45.000000000 -0500 @@ -372,3 +372,15 @@ # From: Remi Mommsen <momm...@slac.stanford.edu> 0 string BOMStore Mac OS X bill of materials (BOM) file + +# From: Adam Buchbinder <adam.buchbin...@gmail.com> +# URL: http://en.wikipedia.org/wiki/Datafork_TrueType +# Derived from the 'fondu' and 'ufond' source code (fondu.sf.net). 'sfnt' is +# TrueType; 'POST' is PostScript. 'FONT' and 'NFNT' sometimes appear, but I +# don't know what they mean. +0 belong 0x100 +>(0x4.L+24) beshort x +>>&4 belong 0x73666e74 Mac OSX datafork font, TrueType +>>&4 belong 0x464f4e54 Mac OSX datafork font, 'FONT' +>>&4 belong 0x4e464e54 Mac OSX datafork font, 'NFNT' +>>&4 belong 0x504f5354 Mac OSX datafork font, PostScript