[File] [PATCH] of Magdir/fonts for OpenType Font data *.otf
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Sun Mar 15 02:08:33 UTC 2020
Hello,
some days ago i handled some OpenDocument Formula Template with file
name extension otf. That extension is also used for OpenType Font data.
When running file command version 5.38 on such fonts i get an output
like:
cmunbmr.otf: OpenType font data
FiraSansOT-Bold.otf: OpenType font data
Montserrat-Regular.otf: OpenType font data
NotoSansCJKjp-Regular.otf: OpenType font data
NotoSansCJKkr-Regular.otf: OpenType font data
NotoSansCJKsc-Regular.otf: OpenType font data
No further information about fonts are shown.
Furthermore with --extension option ??? is shown. With --apple option
UNKNUNKN is displayed and with -i option a non official mime type
application/vnd.ms-opentype is shown.
On Wikipedia i found a page about OpenType Font. So i add that page
inside Magdir/fonts as reference by comment line like:
# URL: https://en.wikipedia.org/wiki/OpenType
The current magic lines look like
0 string OTTO OpenType font data
!:mime application/vnd.ms-opentype
The OpenType Font is similar to TrueType font (*.ttf). So the
functions used for TTF files can also be used for OTF samples. So
description, apple and mime type and file name extension are now
shown by calling subroutine sfnt-font. This now becomes
0 string OTTO
>0 use sfnt-font
>0 use sfnt-names
At the end additional informations like copyright notes and font name
are printed by calling sub routine sfnt-names.
After applying the above mentioned modifications by patch
file-5.38-fonts-otf.diff then i get an output with more information like:
cmunbmr.otf: OpenType Font data,
17 tables, 1st "BDF ", 20 names, Macintosh
FiraSansOT-Bold.otf: OpenType Font data,
11 tables, 1st "CFF ", 28 names, Macintosh,
Digitized data copyright (c) 2012-2013,
The Mozilla Foundation and Telefonica S.A.Fira Sans OTB
Montserrat-Regular.otf: OpenType Font data,
12 tables, 1st "CFF ", 26 names, Macintosh,
Copyright © 2014 by Julieta Ulanovsky. All rights reserved.
MontserratRegular1.000;UKWN;Montserr
NotoSansCJKjp-Regular.otf: OpenType Font data, digitally signed,
16 tables, 1st "BASE", 32 names, Macintosh,
Copyright © 2014, 2015 Adobe Systems Incorporated
(http://www.adobe.com/).
Noto Sans CJK JP Regu
NotoSansCJKkr-Regular.otf: OpenType Font data, digitally signed,
16 tables, 1st "BASE", 32 names, Macintosh,
Copyright © 2014, 2015 Adobe Systems Incorporated
(http://www.adobe.com/).
Noto Sans CJK KR Regu
NotoSansCJKsc-Regular.otf: OpenType Font data, digitally signed,
16 tables, 1st "BASE", 32 names, Macintosh,
Copyright © 2014, 2015 Adobe Systems Incorporated
(http://www.adobe.com/).
Noto Sans CJK SC Regu
I hope my diff file can be applied in future version of
file utility.
With best wishes
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
--- file-5.38/magic/Magdir/fonts.old 2019-07-16 12:11:31 +0000
+++ file-5.38/magic/Magdir/fonts 2020-03-15 01:00:10 +0000
@@ -346,4 +346,7 @@
# Opentype font data from Avi Bercovich
-0 string OTTO OpenType font data
-!:mime application/vnd.ms-opentype
+# URL: https://en.wikipedia.org/wiki/OpenType
+0 string OTTO
+#!:mime application/vnd.ms-opentype
+>0 use sfnt-font
+>0 use sfnt-names
More information about the File
mailing list