]> granicus.if.org Git - file/commitdiff
Fix PostScript Font Metrics (Joerg Jenderek)
authorChristos Zoulas <christos@zoulas.com>
Wed, 14 Sep 2016 01:26:26 +0000 (01:26 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 14 Sep 2016 01:26:26 +0000 (01:26 +0000)
magic/Magdir/fonts
magic/Magdir/msdos

index a509f24b3824d690115a94edc0a52c8be258d115..dc110de1f0da6124d56c9d6aa3440e998bbd3f41 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: fonts,v 1.31 2016/07/01 23:27:28 christos Exp $
+# $File: fonts,v 1.32 2016/07/03 14:13:11 christos Exp $
 # fonts:  file(1) magic for font data
 #
 0      search/1        FONT            ASCII vfont text
 6      string          %!FontType1     PostScript Type 1 font program data
 0      string          %!PS-Adobe-3.0\ Resource-Font   PostScript Type 1 font text
 
+# Summary:     PostScript Type 1 Printer Font Metrics
+# URL:         https://en.wikipedia.org/wiki/PostScript_fonts
+# Reference:   http://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
+# Modified by: Joerg Jenderek
+# Note:                moved from ./msdos magic 
+# dfVersion 256=0100h 
+0              uleshort        0x0100          
+# GRR: line above is too general as it catches also TrueType font,
+# raw G3 data FAX, WhatsApp encrypted and Panorama database
+# dfType 129=0081h
+>66            uleshort        0x0081          
+# dfVertRes 300=012Ch not needed as additional test
+#>>70          uleshort        0x012c          
+# dfHorizRes 300=012Ch
+#>>>72         uleshort        0x012c          
+# dfDriverInfo points to postscript information section
+>>(101.l)      string/c        Postscript      Printer Font Metrics
+# above labeled "PFM data" by ./msdos (version 5.28) or "Adobe Printer Font Metrics" by TrID
+!:mime application/x-font-pfm
+# AppleShare Print Server
+#!:apple       ASPS????
+!:ext  pfm
+# dfCopyright 60 byte null padded Copyright string. uncomment it to get old looking
+#>>>6          string          >\060           - %-.60s
+# dfDriverInfo
+>>>139         ulelong         >0              
+# often abbreviated and same as filename
+>>>>(139.l)    string          x               %s
+# dfSize
+>>>2           ulelong         x               \b, %d bytes
+# dfFace 210=D2h 9Eh
+>>>105         ulelong         >0              
+# Windows font name
+>>>>(105.l)    string          x               \b, %s
+# dfItalic
+>>>80          ubyte           1               italic
+# dfUnderline
+>>>81          ubyte           1               underline
+# dfStrikeOut
+>>>82          ubyte           1               strikeout
+# dfWeight 400=0x0190 300=0x012c 500=0x01f4 600=0x0258 700=0x02bc
+>>>83          uleshort        >699            bold
+# dfPitchAndFamily 16 17 48 49 64 65
+>>>90          ubyte           16              serif
+>>>90          ubyte           17              serif proportional
+#>>>90         ubyte           48              other
+>>>90          ubyte           49              proportional
+>>>90          ubyte           64              script
+>>>90          ubyte           65              script proportional
+
 # X11 font files in SNF (Server Natural Format) format
 # updated by Joerg Jenderek at Feb 2013
 # http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
index a9c47971423527527f92047673b7998785e966c2..b4bf64359b390bfd1d36fcc9307b8af8590cab74 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: msdos,v 1.109 2016/07/20 11:28:40 christos Exp $
+# $File: msdos,v 1.110 2016/09/11 14:49:54 christos Exp $
 # msdos:  file(1) magic for MS-DOS files
 #
 
 0      lelong          0x00000005
 >12    lelong          0x00000320      Windows Recycle Bin INFO2 file (Win2k - WinXP)
 
-
-##### put in Either Magic/font or Magic/news
-# Acroread or something         files wrongly identified as G3  .pfm
-# these have the form \000 \001 any? \002 \000 \000
-# or \000 \001 any? \022 \000 \000
-0      belong&0xffff00ff       0x00010012      PFM data
->4     string                  \000\000
->6     string                  >\060           - %s
-
-0      belong&0xffff00ff       0x00010002      PFM data
->4     string                  \000\000
->6     string                  >\060           - %s
-#0     string  \000\001 pfm?
-#>3    string  \022\000\000Copyright\  yes
-#>3    string  \002\000\000Copyright\  yes
-#>3    string  >\0     oops, not a font file. Cancel that.
-#it clashes with ttf files so put it lower down.
-
 # From Doug Lee via a FreeBSD pr
 9      string          GERBILDOC       First Choice document
 9      string          GERBILDB        First Choice database