xref: /freebsd/contrib/file/magic/Magdir/fonts (revision a5d223e6)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*a5d223e6SXin LI# $File: fonts,v 1.33 2016/09/14 01:26:26 christos Exp $
4b6cee71dSXin LI# fonts:  file(1) magic for font data
5b6cee71dSXin LI#
6b6cee71dSXin LI0	search/1	FONT		ASCII vfont text
7b6cee71dSXin LI0	short		0436		Berkeley vfont data
8b6cee71dSXin LI0	short		017001		byte-swapped Berkeley vfont data
9b6cee71dSXin LI
10b6cee71dSXin LI# PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
11b6cee71dSXin LI0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
12b6cee71dSXin LI>20	string		>\0			(%s)
13b6cee71dSXin LI6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data
14b6cee71dSXin LI0	string		%!FontType1	PostScript Type 1 font program data
15b6cee71dSXin LI6	string		%!FontType1	PostScript Type 1 font program data
16b6cee71dSXin LI0	string		%!PS-Adobe-3.0\ Resource-Font	PostScript Type 1 font text
17b6cee71dSXin LI
18*a5d223e6SXin LI# Summary:	PostScript Type 1 Printer Font Metrics
19*a5d223e6SXin LI# URL:		https://en.wikipedia.org/wiki/PostScript_fonts
20*a5d223e6SXin LI# Reference:	http://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
21*a5d223e6SXin LI# Modified by:	Joerg Jenderek
22*a5d223e6SXin LI# Note:		moved from ./msdos magic
23*a5d223e6SXin LI# dfVersion 256=0100h
24*a5d223e6SXin LI0		uleshort	0x0100
25*a5d223e6SXin LI# GRR: line above is too general as it catches also TrueType font,
26*a5d223e6SXin LI# raw G3 data FAX, WhatsApp encrypted and Panorama database
27*a5d223e6SXin LI# dfType 129=0081h
28*a5d223e6SXin LI>66		uleshort	0x0081
29*a5d223e6SXin LI# dfVertRes 300=012Ch not needed as additional test
30*a5d223e6SXin LI#>>70		uleshort	0x012c
31*a5d223e6SXin LI# dfHorizRes 300=012Ch
32*a5d223e6SXin LI#>>>72		uleshort	0x012c
33*a5d223e6SXin LI# dfDriverInfo points to postscript information section
34*a5d223e6SXin LI>>(101.l)	string/c	Postscript	Printer Font Metrics
35*a5d223e6SXin LI# above labeled "PFM data" by ./msdos (version 5.28) or "Adobe Printer Font Metrics" by TrID
36*a5d223e6SXin LI!:mime	application/x-font-pfm
37*a5d223e6SXin LI# AppleShare Print Server
38*a5d223e6SXin LI#!:apple	ASPS????
39*a5d223e6SXin LI!:ext	pfm
40*a5d223e6SXin LI# dfCopyright 60 byte null padded Copyright string. uncomment it to get old looking
41*a5d223e6SXin LI#>>>6		string		>\060		- %-.60s
42*a5d223e6SXin LI# dfDriverInfo
43*a5d223e6SXin LI>>>139		ulelong		>0
44*a5d223e6SXin LI# often abbreviated and same as filename
45*a5d223e6SXin LI>>>>(139.l)	string		x		%s
46*a5d223e6SXin LI# dfSize
47*a5d223e6SXin LI>>>2		ulelong		x		\b, %d bytes
48*a5d223e6SXin LI# dfFace 210=D2h 9Eh
49*a5d223e6SXin LI>>>105		ulelong		>0
50*a5d223e6SXin LI# Windows font name
51*a5d223e6SXin LI>>>>(105.l)	string		x		\b, %s
52*a5d223e6SXin LI# dfItalic
53*a5d223e6SXin LI>>>80		ubyte		1		italic
54*a5d223e6SXin LI# dfUnderline
55*a5d223e6SXin LI>>>81		ubyte		1		underline
56*a5d223e6SXin LI# dfStrikeOut
57*a5d223e6SXin LI>>>82		ubyte		1		strikeout
58*a5d223e6SXin LI# dfWeight 400=0x0190 300=0x012c 500=0x01f4 600=0x0258 700=0x02bc
59*a5d223e6SXin LI>>>83		uleshort	>699		bold
60*a5d223e6SXin LI# dfPitchAndFamily 16 17 48 49 64 65
61*a5d223e6SXin LI>>>90		ubyte		16		serif
62*a5d223e6SXin LI>>>90		ubyte		17		serif proportional
63*a5d223e6SXin LI#>>>90		ubyte		48		other
64*a5d223e6SXin LI>>>90		ubyte		49		proportional
65*a5d223e6SXin LI>>>90		ubyte		64		script
66*a5d223e6SXin LI>>>90		ubyte		65		script proportional
67*a5d223e6SXin LI
68b6cee71dSXin LI# X11 font files in SNF (Server Natural Format) format
69b6cee71dSXin LI# updated by Joerg Jenderek at Feb 2013
70b6cee71dSXin LI# http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
71b6cee71dSXin LI0	belong		00000004		X11 SNF font data, MSB first
72b6cee71dSXin LI#>104	belong		00000004		X11 SNF font data, MSB first
73b6cee71dSXin LI!:mime	application/x-font-sfn
74b6cee71dSXin LI# GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
75b6cee71dSXin LI0	lelong		00000004
76b6cee71dSXin LI>104	lelong		00000004		X11 SNF font data, LSB first
77b6cee71dSXin LI!:mime	application/x-font-sfn
78b6cee71dSXin LI
79b6cee71dSXin LI# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
80b6cee71dSXin LI0	search/1	STARTFONT\ 		X11 BDF font text
81b6cee71dSXin LI
823e41d09dSXin LI# From: Joerg Jenderek
833e41d09dSXin LI# URL: http://grub.gibibit.com/New_font_format
843e41d09dSXin LI# Reference: util/grub-mkfont.c
853e41d09dSXin LI#		include/grub/fontformat.h
863e41d09dSXin LI# FONT_FORMAT_SECTION_NAMES_FILE
873e41d09dSXin LI0			string		FILE
883e41d09dSXin LI# FONT_FORMAT_PFF2_MAGIC
893e41d09dSXin LI>8			string		PFF2
903e41d09dSXin LI# leng 4 only at the moment
913e41d09dSXin LI>>4			ubelong		4
923e41d09dSXin LI# FONT_FORMAT_SECTION_NAMES_FONT_NAME
933e41d09dSXin LI>>>12			string		NAME		GRUB2 font
943e41d09dSXin LI!:mime			application/x-font-pf2
953e41d09dSXin LI!:ext			pf2
963e41d09dSXin LI# length of font_name
973e41d09dSXin LI>>>>16			ubelong		>0
983e41d09dSXin LI# font_name
993e41d09dSXin LI>>>>>20			string		>\0		"%-s"
1003e41d09dSXin LI
101b6cee71dSXin LI# X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
102b6cee71dSXin LI# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
103b6cee71dSXin LI0	string		\001fcp			X11 Portable Compiled Font data
104b6cee71dSXin LI>12	byte		0x02			\b, LSB first
105b6cee71dSXin LI>12	byte		0x0a			\b, MSB first
106b6cee71dSXin LI0	string		D1.0\015		X11 Speedo font data
107b6cee71dSXin LI
108b6cee71dSXin LI#------------------------------------------------------------------------------
109b6cee71dSXin LI# FIGlet fonts and controlfiles
110b6cee71dSXin LI# From figmagic supplied with Figlet version 2.2
111b6cee71dSXin LI# "David E. O'Brien" <obrien@FreeBSD.ORG>
112b6cee71dSXin LI0	string		flf		FIGlet font
113b6cee71dSXin LI>3	string		>2a		version %-2.2s
114b6cee71dSXin LI0	string		flc		FIGlet controlfile
115b6cee71dSXin LI>3	string		>2a		version %-2.2s
116b6cee71dSXin LI
117b6cee71dSXin LI# libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
118b6cee71dSXin LI# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
119b6cee71dSXin LI0	belong		0x14025919	libGrx font data,
120b6cee71dSXin LI>8	leshort		x		%dx
121b6cee71dSXin LI>10	leshort		x		\b%d
122b6cee71dSXin LI>40	string		x		%s
123b6cee71dSXin LI# Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
124b6cee71dSXin LI0	belong		0xff464f4e	DOS code page font data collection
125b6cee71dSXin LI7	belong		0x00454741	DOS code page font data
126b6cee71dSXin LI7	belong		0x00564944	DOS code page font data (from Linux?)
127b6cee71dSXin LI4098	string		DOSFONT		DOSFONT2 encrypted font data
128b6cee71dSXin LI
129b6cee71dSXin LI# downloadable fonts for browser (prints type) anthon@mnt.org
1303e41d09dSXin LI# https://tools.ietf.org/html/rfc3073
1313e41d09dSXin LI0	string		PFR1		Portable Font Resource font data (new)
132b6cee71dSXin LI>102	string		>0		\b: %s
1333e41d09dSXin LI0	string		PFR0		Portable Font Resource font data (old)
1343e41d09dSXin LI>4	beshort		>0		version %d
135b6cee71dSXin LI
136b6cee71dSXin LI# True Type fonts
137b6cee71dSXin LI0	string	\000\001\000\000\000	TrueType font data
138b6cee71dSXin LI!:mime application/x-font-ttf
139b6cee71dSXin LI
140b6cee71dSXin LI0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
141b6cee71dSXin LI0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
142b6cee71dSXin LI
143b6cee71dSXin LI# TrueType/OpenType font collections (.ttc)
144b6cee71dSXin LI# http://www.microsoft.com/typography/otspec/otff.htm
145b6cee71dSXin LI0	string		ttcf		TrueType font collection data
146b6cee71dSXin LI>4	belong		0x00010000	\b, 1.0
147b6cee71dSXin LI>>8	belong		>0		\b, %d fonts
148b6cee71dSXin LI>4	belong		0x00020000	\b, 2.0
149b6cee71dSXin LI>>8	belong		>0		\b, %d fonts
150b6cee71dSXin LI# 0x44454947 = 'DSIG'
151b6cee71dSXin LI>>>16	belong		0x44534947	\b, digitally signed
152b6cee71dSXin LI
153b6cee71dSXin LI# Opentype font data from Avi Bercovich
154b6cee71dSXin LI0	string		OTTO		OpenType font data
155b6cee71dSXin LI!:mime application/vnd.ms-opentype
156b6cee71dSXin LI
157b6cee71dSXin LI# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
158b6cee71dSXin LI0	string		SplineFontDB:	Spline Font Database
159b6cee71dSXin LI!:mime application/vnd.font-fontforge-sfd
160b6cee71dSXin LI>14	string		x		version %s
161b6cee71dSXin LI
162b6cee71dSXin LI# EOT
163*a5d223e6SXin LI0x40	string		\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
164*a5d223e6SXin LI>0x22	string		LP		Embedded OpenType (EOT)
165*a5d223e6SXin LI# workaround until there's lepstring16
166*a5d223e6SXin LI# >>0x52	lepstring16/h	>\0		\b, %s family
167*a5d223e6SXin LI>>0x52	short	!0
168*a5d223e6SXin LI>>>0x54	lestring16	x		\b, %s family
169b6cee71dSXin LI!:mime application/vnd.ms-fontobject
170b6cee71dSXin LI
171b6cee71dSXin LI# Web Open Font Format (.woff)
1723e41d09dSXin LI0	name		woff
1733e41d09dSXin LI>4	belong		0x00010000	\b, TrueType
1743e41d09dSXin LI>4	belong		0x4F54544F	\b, CFF
1753e41d09dSXin LI>4	belong		0x74727565	\b, TrueType
1763e41d09dSXin LI>4	default		x
1773e41d09dSXin LI>>4	belong		x		\b, flavor %d
1783e41d09dSXin LI>8	belong		x		\b, length %d
1793e41d09dSXin LI#>12	beshort		x		\b, numTables %d
1803e41d09dSXin LI#>14	beshort		x		\b, reserved %d
1813e41d09dSXin LI#>16	belong		x		\b, totalSfntSize %d
1823e41d09dSXin LI
183b6cee71dSXin LI# http://www.w3.org/TR/WOFF/
184b6cee71dSXin LI0	string		wOFF	Web Open Font Format
1853e41d09dSXin LI>0	use		woff
186b6cee71dSXin LI>20	beshort		x	\b, version %d
187b6cee71dSXin LI>22	beshort		x	\b.%d
1883e41d09dSXin LI# http://www.w3.org/TR/WOFF2/
1893e41d09dSXin LI0	string		wOF2	Web Open Font Format (Version 2)
1903e41d09dSXin LI>0	use		woff
1913e41d09dSXin LI#>20	belong		x	\b, totalCompressedSize %d
1923e41d09dSXin LI>24	beshort		x	\b, version %d
1933e41d09dSXin LI>26	beshort		x	\b.%d
194