You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2024/10/25 13:57:57 UTC
(tika) branch TIKA-4339 created (now 95aba9ae0)
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a change to branch TIKA-4339
in repository https://gitbox.apache.org/repos/asf/tika.git
at 95aba9ae0 TIKA-4339 -- first steps to modernize font/* mime types
This branch includes the following new commits:
new 95aba9ae0 TIKA-4339 -- first steps to modernize font/* mime types
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(tika) 01/01: TIKA-4339 -- first steps to modernize font/* mime types
Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch TIKA-4339
in repository https://gitbox.apache.org/repos/asf/tika.git
commit 95aba9ae08e8a6a911e056f6640a1d99763576ff
Author: tallison <ta...@apache.org>
AuthorDate: Fri Oct 25 09:57:40 2024 -0400
TIKA-4339 -- first steps to modernize font/* mime types
---
.../org/apache/tika/mime/tika-mimetypes.xml | 43 ++++++++++++----------
.../java/org/apache/tika/TikaDetectionTest.java | 6 +--
2 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index 87cc7aae8..aa28641ac 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -4071,16 +4071,6 @@
<glob pattern="*.psf"/>
</mime-type>
- <mime-type type="application/x-font-otf">
- <alias type="application/vnd.ms-opentype"/>
- <acronym>OTF</acronym>
- <_comment>OpenType Font</_comment>
- <magic priority="40">
- <match value="OTTO\x00" type="string" offset="0"/>
- </magic>
- <glob pattern="*.otf"/>
- </mime-type>
-
<mime-type type="application/x-font-pcf">
<glob pattern="*.pcf"/>
</mime-type>
@@ -4090,16 +4080,6 @@
<mime-type type="application/x-font-speedo"/>
<mime-type type="application/x-font-sunos-news"/>
- <mime-type type="application/x-font-ttf">
- <acronym>TTF</acronym>
- <_comment>TrueType Font</_comment>
- <glob pattern="*.ttf"/>
- <glob pattern="*.ttc"/>
- <magic priority="40">
- <match value="0x00010000" type="string" offset="0"/>
- </magic>
- </mime-type>
-
<mime-type type="application/x-font-type1">
<glob pattern="*.pfa"/>
<glob pattern="*.pfb"/>
@@ -6335,6 +6315,29 @@
<mime-type type="chemical/x-xyz">
<glob pattern="*.xyz"/>
</mime-type>
+
+ <mime-type type="font/otf">
+ <alias type="application/x-font-otf"/>
+ <alias type="application/vnd.ms-opentype"/>
+ <acronym>OTF</acronym>
+ <_comment>OpenType Font</_comment>
+ <magic priority="40">
+ <match value="OTTO\x00" type="string" offset="0"/>
+ </magic>
+ <glob pattern="*.otf"/>
+ </mime-type>
+
+ <mime-type type="font/ttf">
+ <alias type="application/x-font-ttf"/>
+ <acronym>TTF</acronym>
+ <_comment>TrueType Font</_comment>
+ <glob pattern="*.ttf"/>
+ <glob pattern="*.ttc"/>
+ <magic priority="40">
+ <match value="0x00010000" type="string" offset="0"/>
+ </magic>
+ </mime-type>
+
<mime-type type="image/x-3ds">
<_comment>3D Studio (V1)</_comment>
<magic priority="50">
diff --git a/tika-core/src/test/java/org/apache/tika/TikaDetectionTest.java b/tika-core/src/test/java/org/apache/tika/TikaDetectionTest.java
index f52482c8d..4cf680b00 100644
--- a/tika-core/src/test/java/org/apache/tika/TikaDetectionTest.java
+++ b/tika-core/src/test/java/org/apache/tika/TikaDetectionTest.java
@@ -574,11 +574,11 @@ public class TikaDetectionTest {
assertEquals("application/x-font-bdf", tika.detect("x.bdf"));
assertEquals("application/x-font-ghostscript", tika.detect("x.gsf"));
assertEquals("application/x-font-linux-psf", tika.detect("x.psf"));
- assertEquals("application/x-font-otf", tika.detect("x.otf"));
+ assertEquals("font/otf", tika.detect("x.otf"));
assertEquals("application/x-font-pcf", tika.detect("x.pcf"));
assertEquals("application/x-font-snf", tika.detect("x.snf"));
- assertEquals("application/x-font-ttf", tika.detect("x.ttf"));
- assertEquals("application/x-font-ttf", tika.detect("x.ttc"));
+ assertEquals("font/ttf", tika.detect("x.ttf"));
+ assertEquals("font/ttf", tika.detect("x.ttc"));
assertEquals("application/x-font-type1", tika.detect("x.pfa"));
assertEquals("application/x-font-type1", tika.detect("x.pfb"));
// TODO Get these fixed upstream too