summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllison Reid <root@cooltrainer.org>2022-06-02 21:23:20 -0700
committerDavid Faure <faure@kde.org>2023-09-04 18:40:02 +0000
commit33c54b0875db8ff46b9f2e8551daf81e1fb44833 (patch)
treefda221c05d704b07e98d9d92a7ff420f87ff4614
parentd59bc4a4292fd1075db4e4ef3659e72ad796681d (diff)
Add Portable Font Resource `application/font-tdpfr`.
Bitstream's TrueDoc Portable Font Resource format is part of several digital TV broadcast specifications and is documented as RFC 3073: https://datatracker.ietf.org/doc/html/rfc3073 ``` Magic number(s): 50 46 52 30 hex File extension(s): PFR Macintosh File Type Code(s): Creator: 'b$pw' Type: 'PFR ' ``` There is also a newer version of the format with `50 46 52 31` hex (PRF1), such as the test file included here. `libmagic` also recognizes `PRF1`: https://github.com/file/file/blob/7a821aedc144f70ec848ea632a64db74b79563c1/magic/Magdir/fonts#L249-L252 The Bitstream specifications are available from Wayback Machine: https://web.archive.org/web/20040407162455/http://www.bitstream.com/categories/developer/truedoc/pfrspec.html "The PFR specification defines the Bitstream portable font resource (PFR), which is a compact, platform-independent format for representing high-quality, scalable outline fonts. Many independent organizations responsible for setting digital TV standards have adopted the PFR font format as their standard font format, including: - ATSC (Advanced Television Systems Committee) - DAVIC (Digital Audio Visual Council) - DVB (Digital Video Broadcasting) - DTG (Digital TV Group) - MHP (Multimedia Home Platform) - ISO/IEC 16500-6:1999 - OCAP (OpenCable Application Platform)" Per RFC 3073, "The PFR media type has been previously registered with IANA as `application/vnd.truedoc`. In view of its subsequent widespread adoption as a standard font format by multiple standards bodies who have relationships with the Internet community, Bitstream has been asked to re-register this media type within the IETF tree." https://www.iana.org/assignments/media-types/application/vnd.truedoc http://www.iana.org/assignments/media-types/application/font-tdpfr This format was once supported for downloadable web fonts in Netscape 4.x.
-rw-r--r--data/freedesktop.org.xml.in12
-rw-r--r--tests/mime-detection/list1
-rw-r--r--tests/mime-detection/test.pfrbin0 -> 32199 bytes
3 files changed, 13 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 5350ecf..651fe55 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -2298,6 +2298,18 @@ command to generate the output files.
<match type="string" value="\x13\x7A\x2B" offset="8"/>
</magic>
</mime-type>
+ <mime-type type="application/font-tdpfr">
+ <comment>TDPFR font</comment>
+ <acronym>TDPFR</acronym>
+ <expanded-acronym>TrueDoc Portable Font Resource</expanded-acronym>
+ <generic-icon name="font-x-generic"/>
+ <magic>
+ <match type="big32" value="0x50465230" offset="0"/>
+ <match type="big32" value="0x50465231" offset="0"/>
+ </magic>
+ <glob pattern="*.pfr"/>
+ <alias type="application/vnd.truedoc"/>
+ </mime-type>
<mime-type type="application/x-font-tex">
<comment>TeX font</comment>
<generic-icon name="font-x-generic"/>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 341306a..499fbde 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -791,6 +791,7 @@ test-en.mo application/x-gettext-translation
LiberationSans-Regular.ttf font/ttf
# Converted from LiberationSans-Regular.ttf with http://ttf2woff.com/
LiberationSans-Regular.woff font/woff
+test.pfr application/font-tdpfr
nrl.trig application/trig oxo
# Copied from http://git.savannah.gnu.org/cgit/gnash.git/plain/testsuite/samples/subshapes.swf
subshapes.swf application/vnd.adobe.flash.movie
diff --git a/tests/mime-detection/test.pfr b/tests/mime-detection/test.pfr
new file mode 100644
index 0000000..cbc44fc
--- /dev/null
+++ b/tests/mime-detection/test.pfr
Binary files differ