head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.13
	netbsd-11-0-RC3:1.1.1.13
	netbsd-11-0-RC2:1.1.1.13
	netbsd-11-0-RC1:1.1.1.13
	perseant-exfatfs-base-20250801:1.1.1.13
	netbsd-11:1.1.1.13.0.6
	netbsd-11-base:1.1.1.13
	netbsd-10-1-RELEASE:1.1.1.13
	perseant-exfatfs-base-20240630:1.1.1.13
	perseant-exfatfs:1.1.1.13.0.4
	perseant-exfatfs-base:1.1.1.13
	netbsd-8-3-RELEASE:1.1.1.7
	netbsd-9-4-RELEASE:1.1.1.10
	netbsd-10-0-RELEASE:1.1.1.13
	netbsd-10-0-RC6:1.1.1.13
	netbsd-10-0-RC5:1.1.1.13
	netbsd-10-0-RC4:1.1.1.13
	netbsd-10-0-RC3:1.1.1.13
	netbsd-10-0-RC2:1.1.1.13
	netbsd-10-0-RC1:1.1.1.13
	FILE5_45:1.1.1.13
	netbsd-10:1.1.1.13.0.2
	netbsd-10-base:1.1.1.13
	FILE5_43:1.1.1.13
	netbsd-9-3-RELEASE:1.1.1.10
	cjep_sun2x-base1:1.1.1.12
	cjep_sun2x:1.1.1.12.0.4
	cjep_sun2x-base:1.1.1.12
	cjep_staticlib_x-base1:1.1.1.12
	netbsd-9-2-RELEASE:1.1.1.10
	cjep_staticlib_x:1.1.1.12.0.2
	cjep_staticlib_x-base:1.1.1.12
	FILE5_40:1.1.1.12
	netbsd-9-1-RELEASE:1.1.1.10
	FILE5_39:1.1.1.11
	phil-wifi-20200421:1.1.1.11
	phil-wifi-20200411:1.1.1.11
	is-mlppp:1.1.1.11.0.2
	is-mlppp-base:1.1.1.11
	phil-wifi-20200406:1.1.1.11
	netbsd-8-2-RELEASE:1.1.1.7
	netbsd-9-0-RELEASE:1.1.1.10
	netbsd-9-0-RC2:1.1.1.10
	FILE5_38:1.1.1.11
	netbsd-9-0-RC1:1.1.1.10
	phil-wifi-20191119:1.1.1.10
	netbsd-9:1.1.1.10.0.2
	netbsd-9-base:1.1.1.10
	phil-wifi-20190609:1.1.1.10
	netbsd-8-1-RELEASE:1.1.1.7
	FILE5_37:1.1.1.10
	netbsd-8-1-RC1:1.1.1.7
	pgoyette-compat-merge-20190127:1.1.1.8.2.1
	pgoyette-compat-20190127:1.1.1.9
	pgoyette-compat-20190118:1.1.1.9
	pgoyette-compat-1226:1.1.1.9
	pgoyette-compat-1126:1.1.1.9
	pgoyette-compat-1020:1.1.1.9
	FILE5_35:1.1.1.9
	pgoyette-compat-0930:1.1.1.9
	pgoyette-compat-0906:1.1.1.9
	netbsd-7-2-RELEASE:1.1.1.5
	pgoyette-compat-0728:1.1.1.9
	netbsd-8-0-RELEASE:1.1.1.7
	phil-wifi:1.1.1.9.0.2
	phil-wifi-base:1.1.1.9
	pgoyette-compat-0625:1.1.1.9
	netbsd-8-0-RC2:1.1.1.7
	pgoyette-compat-0521:1.1.1.9
	pgoyette-compat-0502:1.1.1.9
	pgoyette-compat-0422:1.1.1.9
	netbsd-8-0-RC1:1.1.1.7
	FILE5_33:1.1.1.9
	pgoyette-compat-0415:1.1.1.8
	pgoyette-compat-0407:1.1.1.8
	pgoyette-compat-0330:1.1.1.8
	pgoyette-compat-0322:1.1.1.8
	pgoyette-compat-0315:1.1.1.8
	netbsd-7-1-2-RELEASE:1.1.1.5
	pgoyette-compat:1.1.1.8.0.2
	pgoyette-compat-base:1.1.1.8
	netbsd-7-1-1-RELEASE:1.1.1.5
	matt-nb8-mediatek:1.1.1.7.0.6
	matt-nb8-mediatek-base:1.1.1.7
	FILE5_32:1.1.1.8
	perseant-stdc-iso10646:1.1.1.7.0.4
	perseant-stdc-iso10646-base:1.1.1.7
	netbsd-8:1.1.1.7.0.2
	netbsd-8-base:1.1.1.7
	FILE5_31:1.1.1.7
	prg-localcount2-base3:1.1.1.6
	prg-localcount2-base2:1.1.1.6
	prg-localcount2-base1:1.1.1.6
	prg-localcount2:1.1.1.6.0.2
	prg-localcount2-base:1.1.1.6
	pgoyette-localcount-20170426:1.1.1.6
	bouyer-socketcan-base1:1.1.1.6
	pgoyette-localcount-20170320:1.1.1.6
	netbsd-7-1:1.1.1.5.0.12
	netbsd-7-1-RELEASE:1.1.1.5
	netbsd-7-1-RC2:1.1.1.5
	FILE5_30:1.1.1.6
	netbsd-7-nhusb-base-20170116:1.1.1.5
	bouyer-socketcan:1.1.1.5.0.10
	bouyer-socketcan-base:1.1.1.5
	pgoyette-localcount-20170107:1.1.1.5
	netbsd-7-1-RC1:1.1.1.5
	pgoyette-localcount-20161104:1.1.1.5
	netbsd-7-0-2-RELEASE:1.1.1.5
	localcount-20160914:1.1.1.5
	netbsd-7-nhusb:1.1.1.5.0.8
	netbsd-7-nhusb-base:1.1.1.5
	pgoyette-localcount-20160806:1.1.1.5
	pgoyette-localcount-20160726:1.1.1.5
	pgoyette-localcount:1.1.1.5.0.6
	pgoyette-localcount-base:1.1.1.5
	netbsd-7-0-1-RELEASE:1.1.1.5
	netbsd-7-0:1.1.1.5.0.4
	netbsd-7-0-RELEASE:1.1.1.5
	netbsd-7-0-RC3:1.1.1.5
	netbsd-7-0-RC2:1.1.1.5
	netbsd-7-0-RC1:1.1.1.5
	FILE5_22:1.1.1.5
	FILE5_20:1.1.1.5
	netbsd-6-0-6-RELEASE:1.1.1.2
	netbsd-6-1-5-RELEASE:1.1.1.2
	netbsd-7:1.1.1.5.0.2
	netbsd-7-base:1.1.1.5
	FILE5_19:1.1.1.5
	yamt-pagecache-base9:1.1.1.4
	yamt-pagecache-tag8:1.1.1.2.4.1
	netbsd-6-1-4-RELEASE:1.1.1.2
	netbsd-6-0-5-RELEASE:1.1.1.2
	tls-earlyentropy:1.1.1.4.0.8
	tls-earlyentropy-base:1.1.1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.4
	riastradh-drm2-base3:1.1.1.4
	netbsd-6-1-3-RELEASE:1.1.1.2
	netbsd-6-0-4-RELEASE:1.1.1.2
	FILE5_16:1.1.1.4
	netbsd-6-1-2-RELEASE:1.1.1.2
	netbsd-6-0-3-RELEASE:1.1.1.2
	netbsd-6-1-1-RELEASE:1.1.1.2
	riastradh-drm2-base2:1.1.1.4
	riastradh-drm2-base1:1.1.1.4
	riastradh-drm2:1.1.1.4.0.6
	riastradh-drm2-base:1.1.1.4
	netbsd-6-1:1.1.1.2.0.14
	netbsd-6-0-2-RELEASE:1.1.1.2
	netbsd-6-1-RELEASE:1.1.1.2
	khorben-n900:1.1.1.4.0.4
	netbsd-6-1-RC4:1.1.1.2
	netbsd-6-1-RC3:1.1.1.2
	agc-symver:1.1.1.4.0.2
	agc-symver-base:1.1.1.4
	FILE5_14:1.1.1.4
	netbsd-6-1-RC2:1.1.1.2
	netbsd-6-1-RC1:1.1.1.2
	yamt-pagecache-base8:1.1.1.3
	FILE_5_12:1.1.1.3
	netbsd-6-0-1-RELEASE:1.1.1.2
	yamt-pagecache-base7:1.1.1.2
	matt-nb6-plus-nbase:1.1.1.2
	yamt-pagecache-base6:1.1.1.2
	netbsd-6-0:1.1.1.2.0.12
	netbsd-6-0-RELEASE:1.1.1.2
	netbsd-6-0-RC2:1.1.1.2
	tls-maxphys:1.1.1.2.0.10
	tls-maxphys-base:1.1.1.5
	matt-nb6-plus:1.1.1.2.0.8
	matt-nb6-plus-base:1.1.1.2
	netbsd-6-0-RC1:1.1.1.2
	yamt-pagecache-base5:1.1.1.2
	yamt-pagecache-base4:1.1.1.2
	FILE5_11:1.1.1.2
	netbsd-6:1.1.1.2.0.6
	netbsd-6-base:1.1.1.2
	yamt-pagecache-base3:1.1.1.2
	yamt-pagecache-base2:1.1.1.2
	yamt-pagecache:1.1.1.2.0.4
	yamt-pagecache-base:1.1.1.2
	FILE5_09:1.1.1.2
	cherry-xenmp:1.1.1.2.0.2
	cherry-xenmp-base:1.1.1.2
	FILE5_07:1.1.1.2
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.4
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	jym-xensuspend-base:1.1.1.1
	jym-xensuspend:1.1.1.1.0.2
	jym-xensuspend-nbase:1.1.1.1
	FILE5_03:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2009.05.08.16.35.08;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.05.08.16.35.08;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	2011.05.12.20.47.00;	author christos;	state Exp;
branches
	1.1.1.2.4.1
	1.1.1.2.10.1;
next	1.1.1.3;

1.1.1.3
date	2013.01.03.16.27.54;	author christos;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2013.03.23.15.49.17;	author christos;	state Exp;
branches
	1.1.1.4.8.1;
next	1.1.1.5;

1.1.1.5
date	2014.06.13.01.48.24;	author christos;	state Exp;
branches
	1.1.1.5.6.1
	1.1.1.5.10.1;
next	1.1.1.6;
commitid	jtTYsE5FmJU6MiEx;

1.1.1.6
date	2017.02.10.17.42.57;	author christos;	state Exp;
branches;
next	1.1.1.7;
commitid	HAP3kn9Hn6ovMqFz;

1.1.1.7
date	2017.05.24.23.59.57;	author christos;	state Exp;
branches;
next	1.1.1.8;
commitid	WbyOU2LBE5qOyHSz;

1.1.1.8
date	2017.09.08.13.22.43;	author christos;	state Exp;
branches
	1.1.1.8.2.1;
next	1.1.1.9;
commitid	Hp7DmePhD4aVAo6A;

1.1.1.9
date	2018.04.15.19.32.48;	author christos;	state Exp;
branches
	1.1.1.9.2.1;
next	1.1.1.10;
commitid	unKSwpX2g9VqBzyA;

1.1.1.10
date	2019.05.22.17.19.57;	author christos;	state Exp;
branches;
next	1.1.1.11;
commitid	VXeNRYYruN1MWdoB;

1.1.1.11
date	2019.12.17.02.23.53;	author christos;	state Exp;
branches;
next	1.1.1.12;
commitid	vqYTz60fS9PNg0PB;

1.1.1.12
date	2021.04.09.18.58.02;	author christos;	state Exp;
branches;
next	1.1.1.13;
commitid	W9ddLLbSkHHinEOC;

1.1.1.13
date	2022.09.24.20.07.54;	author christos;	state Exp;
branches;
next	;
commitid	Nf6F9kcpc0EPC9VD;

1.1.1.1.2.1
date	2009.05.08.16.35.08;	author jym;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2009.05.13.18.51.55;	author jym;	state Exp;
branches;
next	;

1.1.1.2.4.1
date	2013.01.23.00.04.35;	author yamt;	state Exp;
branches;
next	1.1.1.2.4.2;

1.1.1.2.4.2
date	2014.05.22.15.44.59;	author yamt;	state Exp;
branches;
next	;
commitid	tYJXbWAuFvTh7yBx;

1.1.1.2.10.1
date	2013.02.25.00.26.06;	author tls;	state Exp;
branches;
next	1.1.1.2.10.2;

1.1.1.2.10.2
date	2013.06.23.06.26.32;	author tls;	state Exp;
branches;
next	1.1.1.2.10.3;
commitid	OnlO1cBgtQRcIHUw;

1.1.1.2.10.3
date	2014.08.19.23.46.47;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.4.8.1
date	2014.08.10.07.07.10;	author tls;	state Exp;
branches;
next	;
commitid	b1wUlsZGswrdGMLx;

1.1.1.5.6.1
date	2017.03.20.06.52.19;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.1.5.10.1
date	2017.04.21.16.51.24;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.1.8.2.1
date	2018.04.22.07.20.08;	author pgoyette;	state Exp;
branches;
next	;
commitid	W6xykws0Zbl4kpzA;

1.1.1.9.2.1
date	2019.06.10.21.44.46;	author christos;	state Exp;
branches;
next	1.1.1.9.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.9.2.2
date	2020.04.08.14.04.04;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;


desc
@@


1.1
log
@Initial revision
@
text
@#------------------------------------------------------------------------------
# fonts:  file(1) magic for font data
#
0	search/1	FONT		ASCII vfont text
0	short		0436		Berkeley vfont data
0	short		017001		byte-swapped Berkeley vfont data

# PostScript fonts (must precede "printer" entries), quinlan@@yggdrasil.com
0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
>20	string		>\0			(%s)
6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data

# X11 font files in SNF (Server Natural Format) format
0	belong		00000004		X11 SNF font data, MSB first
0	lelong		00000004		X11 SNF font data, LSB first

# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@@yggdrasil.com)
0	search/1	STARTFONT\ 		X11 BDF font text

# X11 fonts, from Daniel Quinlan (quinlan@@yggdrasil.com)
# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
0	string		\001fcp			X11 Portable Compiled Font data
>12	byte		0x02			\b, LSB first
>12	byte		0x0a			\b, MSB first
0	string		D1.0\015		X11 Speedo font data

#------------------------------------------------------------------------------
# FIGlet fonts and controlfiles
# From figmagic supplied with Figlet version 2.2
# "David E. O'Brien" <obrien@@FreeBSD.ORG>
0	string		flf		FIGlet font
>3	string		>2a		version %-2.2s
0	string		flc		FIGlet controlfile
>3	string		>2a		version %-2.2s

# libGrx graphics lib fonts, from Albert Cahalan (acahalan@@cs.uml.edu)
# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
0	belong		0x14025919	libGrx font data,
>8	leshort		x		%dx
>10	leshort		x		\b%d
>40	string		x		%s
# Misc. DOS VGA fonts, from Albert Cahalan (acahalan@@cs.uml.edu)
0	belong		0xff464f4e	DOS code page font data collection
7	belong		0x00454741	DOS code page font data
7	belong		0x00564944	DOS code page font data (from Linux?)
4098	string		DOSFONT		DOSFONT2 encrypted font data

# downloadable fonts for browser (prints type) anthon@@mnt.org
0	string		PFR1		PFR1 font
>102	string		>0		\b: %s

# True Type fonts
0	string	\000\001\000\000\000	TrueType font data

0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font

0	string		ttcf		TrueType font collection data

# Opentype font data from Avi Bercovich
0	string		OTTO		OpenType font data 

# Gürkan Sengün <gurkan@@linuks.mine.nu>, www.linuks.mine.nu 
0	string		SplineFontDB:	Spline Font Database 
>14	string		x		version %s
@


1.1.1.1
log
@from ftp.astron.com
@
text
@@


1.1.1.2
log
@from ftp.astron.com.
- many security related fixes
- no MAXPATHLEN limits
- fixed missing text specification on ascii magic
- new ``pascal'' style string formats
- whitespace comparison fix
- more magic
@
text
@a0 1

a1 1
# $File: fonts,v 1.23 2010/09/20 18:55:20 rrt Exp $
a11 3
0	string		%!FontType1	PostScript Type 1 font program data
6	string		%!FontType1	PostScript Type 1 font program data
0	string		%!PS-Adobe-3.0\ Resource-Font	PostScript Type 1 font text
a53 1
!:mime application/x-font-ttf
a57 2
# TrueType/OpenType font collections (.ttc)
# http://www.microsoft.com/typography/otspec/otff.htm
a58 6
>4	belong		0x00010000	\b, 1.0
>>8	belong		>0		\b, %d fonts
>4	belong		0x00020000	\b, 2.0
>>8	belong		>0		\b, %d fonts
# 0x44454947 = 'DSIG'
>>>16	belong		0x44534947	\b, digitally signed
d61 1
a61 2
0	string		OTTO		OpenType font data
!:mime application/vnd.ms-opentype
a64 1
!:mime application/vnd.font-fontforge-sfd
a65 4

# EOT
34	string		LP		Embedded OpenType (EOT)
!:mime application/vnd.ms-fontobject
@


1.1.1.2.10.1
log
@resync with head
@
text
@d3 1
a3 1
# $File: fonts,v 1.24 2012/08/26 10:32:10 christos Exp $
a85 8

# Web Open Font Format (.woff)
# http://www.w3.org/TR/WOFF/
0	string		wOFF	Web Open Font Format
>4	belong		x	\b, flavor %d
>8	belong		x	\b, length %d
>20	beshort		x	\b, version %hd
>22	beshort		x	\b.%hd
@


1.1.1.2.10.2
log
@resync from head
@
text
@d3 1
a3 1
# $File: fonts,v 1.26 2013/03/09 22:36:00 christos Exp $
a18 2
# updated by Joerg Jenderek at Feb 2013
# http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
d20 1
a20 6
#>104	belong		00000004		X11 SNF font data, MSB first
!:mime	application/x-font-sfn
# GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
0	lelong		00000004		
>104	lelong		00000004		X11 SNF font data, LSB first
!:mime	application/x-font-sfn
d78 1
a78 1
# Gurkan Sengun <gurkan@@linuks.mine.nu>, www.linuks.mine.nu 
@


1.1.1.2.10.3
log
@Rebase to HEAD as of a few days ago.
@
text
@d3 1
a3 1
# $File: fonts,v 1.27 2014/04/30 21:41:02 christos Exp $
d99 2
a100 2
>20	beshort		x	\b, version %d
>22	beshort		x	\b.%d
@


1.1.1.2.4.1
log
@sync with head
@
text
@d3 1
a3 1
# $File: fonts,v 1.24 2012/08/26 10:32:10 christos Exp $
a85 8

# Web Open Font Format (.woff)
# http://www.w3.org/TR/WOFF/
0	string		wOFF	Web Open Font Format
>4	belong		x	\b, flavor %d
>8	belong		x	\b, length %d
>20	beshort		x	\b, version %hd
>22	beshort		x	\b.%hd
@


1.1.1.2.4.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d3 1
a3 1
# $File: fonts,v 1.26 2013/03/09 22:36:00 christos Exp $
a18 2
# updated by Joerg Jenderek at Feb 2013
# http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
d20 1
a20 6
#>104	belong		00000004		X11 SNF font data, MSB first
!:mime	application/x-font-sfn
# GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
0	lelong		00000004		
>104	lelong		00000004		X11 SNF font data, LSB first
!:mime	application/x-font-sfn
d78 1
a78 1
# Gurkan Sengun <gurkan@@linuks.mine.nu>, www.linuks.mine.nu 
@


1.1.1.3
log
@from ftp.astron.com
@
text
@d3 1
a3 1
# $File: fonts,v 1.24 2012/08/26 10:32:10 christos Exp $
a85 8

# Web Open Font Format (.woff)
# http://www.w3.org/TR/WOFF/
0	string		wOFF	Web Open Font Format
>4	belong		x	\b, flavor %d
>8	belong		x	\b, length %d
>20	beshort		x	\b, version %hd
>22	beshort		x	\b.%hd
@


1.1.1.4
log
@import file-5.14
changes are "name" + "use" keyword features, bug fixes
@
text
@d3 1
a3 1
# $File: fonts,v 1.26 2013/03/09 22:36:00 christos Exp $
a18 2
# updated by Joerg Jenderek at Feb 2013
# http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
d20 1
a20 6
#>104	belong		00000004		X11 SNF font data, MSB first
!:mime	application/x-font-sfn
# GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
0	lelong		00000004		
>104	lelong		00000004		X11 SNF font data, LSB first
!:mime	application/x-font-sfn
d78 1
a78 1
# Gurkan Sengun <gurkan@@linuks.mine.nu>, www.linuks.mine.nu 
@


1.1.1.4.8.1
log
@Rebase.
@
text
@d3 1
a3 1
# $File: fonts,v 1.27 2014/04/30 21:41:02 christos Exp $
d99 2
a100 2
>20	beshort		x	\b, version %d
>22	beshort		x	\b.%d
@


1.1.1.5
log
@import file-5.19

2014-06-09   9:04  Christos Zoulas <christos@@zoulas.com>

	* Misc buffer overruns and missing buffer size tests in cdf parsing
	  (Francisco Alonso, Jan Kaluza)

2014-06-02  14:50  Christos Zoulas <christos@@zoulas.com>

	* Enforce limit of 8K on regex searches that have no limits
	* Allow the l modifier for regex to mean line count. Default
	  to byte count. If line count is specified, assume a max
	  of 80 characters per line to limit the byte count.
	* Don't allow conversions to be used for dates, allowing
	  the mask field to be used as an offset.

2014-05-30  12:51  Christos Zoulas <christos@@zoulas.com>

	* Make the range operator limit the length of the
	  regex search.

2014-05-14  19:23  Christos Zoulas <christos@@zoulas.com>

	* PR/347: Windows fixes
	* PR/352: Hangul word processor recognition
	* PR/354: Encoding irregularities in text files

2014-05-06  6:12  Christos Zoulas <christos@@zoulas.com>

	* Fix uninitialized title in CDF files (Jan Kaluza)

2014-05-04  14:55  Christos Zoulas <christos@@zoulas.com>

	* PR/351: Fix compilation of empty files

2014-04-30  17:39  Christos Zoulas <christos@@zoulas.com>

	* Fix integer formats: We don't specify 'l' or
	  'h' and 'hh' specifiers anymore, only 'll' for
	  quads and nothing for the rest. This is so that
	  magic writing is simpler.

2014-04-01  15:25  Christos Zoulas <christos@@zoulas.com>

	* PR/341: Jan Kaluza, fix memory leak
	* PR/342: Jan Kaluza, fix out of bounds read

2014-03-28  15:25  Christos Zoulas <christos@@zoulas.com>

	* Fix issue with long formats not matching fmtcheck
@
text
@d3 1
a3 1
# $File: fonts,v 1.27 2014/04/30 21:41:02 christos Exp $
d99 2
a100 2
>20	beshort		x	\b, version %d
>22	beshort		x	\b.%d
@


1.1.1.5.10.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: fonts,v 1.34 2016/12/01 15:30:33 christos Exp $
a17 50
# 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

a31 19
# From: Joerg Jenderek
# URL: http://grub.gibibit.com/New_font_format
# Reference: util/grub-mkfont.c
#		include/grub/fontformat.h 
# FONT_FORMAT_SECTION_NAMES_FILE
0			string		FILE		
# FONT_FORMAT_PFF2_MAGIC
>8			string		PFF2		
# leng 4 only at the moment
>>4			ubelong		4		
# FONT_FORMAT_SECTION_NAMES_FONT_NAME
>>>12			string		NAME		GRUB2 font
!:mime			application/x-font-pf2
!:ext			pf2
# length of font_name
>>>>16			ubelong		>0		
# font_name
>>>>>20			string		>\0		"%-s"

d34 3
a36 5
0	string		\001fcp			X11 Portable Compiled Font data,
>12	lelong		^0x08			bit: LSB,
>12	lelong		&0x08			bit: MSB,
>12	lelong		^0x04			byte: LSB first
>12	lelong		&0x04			byte: MSB first
d61 1
a61 2
# https://tools.ietf.org/html/rfc3073
0	string		PFR1		Portable Font Resource font data (new)
a62 2
0	string		PFR0		Portable Font Resource font data (old)
>4	beshort		>0		version %d
d91 1
a91 6
0x40	string		\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
>0x22	string		LP		Embedded OpenType (EOT)
# workaround until there's lepstring16
# >>0x52	lepstring16/h	>\0		\b, %s family
>>0x52	short	!0
>>>0x54	lestring16	x		\b, %s family
a94 11
0	name		woff
>4	belong		0x00010000	\b, TrueType
>4	belong		0x4F54544F	\b, CFF
>4	belong		0x74727565	\b, TrueType
>4	default		x
>>4	belong		x		\b, flavor %d
>8	belong		x		\b, length %d
#>12	beshort		x		\b, numTables %d
#>14	beshort		x		\b, reserved %d
#>16	belong		x		\b, totalSfntSize %d

d97 2
a98 1
>0	use		woff
a100 6
# http://www.w3.org/TR/WOFF2/
0	string		wOF2	Web Open Font Format (Version 2)
>0	use		woff
#>20	belong		x	\b, totalCompressedSize %d
>24	beshort		x	\b, version %d
>26	beshort		x	\b.%d
@


1.1.1.5.6.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: fonts,v 1.34 2016/12/01 15:30:33 christos Exp $
a17 50
# 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

a31 19
# From: Joerg Jenderek
# URL: http://grub.gibibit.com/New_font_format
# Reference: util/grub-mkfont.c
#		include/grub/fontformat.h 
# FONT_FORMAT_SECTION_NAMES_FILE
0			string		FILE		
# FONT_FORMAT_PFF2_MAGIC
>8			string		PFF2		
# leng 4 only at the moment
>>4			ubelong		4		
# FONT_FORMAT_SECTION_NAMES_FONT_NAME
>>>12			string		NAME		GRUB2 font
!:mime			application/x-font-pf2
!:ext			pf2
# length of font_name
>>>>16			ubelong		>0		
# font_name
>>>>>20			string		>\0		"%-s"

d34 3
a36 5
0	string		\001fcp			X11 Portable Compiled Font data,
>12	lelong		^0x08			bit: LSB,
>12	lelong		&0x08			bit: MSB,
>12	lelong		^0x04			byte: LSB first
>12	lelong		&0x04			byte: MSB first
d61 1
a61 2
# https://tools.ietf.org/html/rfc3073
0	string		PFR1		Portable Font Resource font data (new)
a62 2
0	string		PFR0		Portable Font Resource font data (old)
>4	beshort		>0		version %d
d91 1
a91 6
0x40	string		\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
>0x22	string		LP		Embedded OpenType (EOT)
# workaround until there's lepstring16
# >>0x52	lepstring16/h	>\0		\b, %s family
>>0x52	short	!0
>>>0x54	lestring16	x		\b, %s family
a94 11
0	name		woff
>4	belong		0x00010000	\b, TrueType
>4	belong		0x4F54544F	\b, CFF
>4	belong		0x74727565	\b, TrueType
>4	default		x
>>4	belong		x		\b, flavor %d
>8	belong		x		\b, length %d
#>12	beshort		x		\b, numTables %d
#>14	beshort		x		\b, reserved %d
#>16	belong		x		\b, totalSfntSize %d

d97 2
a98 1
>0	use		woff
a100 6
# http://www.w3.org/TR/WOFF2/
0	string		wOF2	Web Open Font Format (Version 2)
>0	use		woff
#>20	belong		x	\b, totalCompressedSize %d
>24	beshort		x	\b, version %d
>26	beshort		x	\b.%d
@


1.1.1.6
log
@2017-02-10  12:24  Christos Zoulas <christos@@zoulas.com>

	* release 5.30

2017-02-07  23:27  Christos Zoulas <christos@@zoulas.com>

	* If we exceeded the offset in a search return no match
	  (Christoph Biedl)
	* Be more lenient on corrupt CDF files (Christoph Biedl)

2017-02-04  16:46  Christos Zoulas <christos@@zoulas.com>

	* pacify ubsan sign extension (oss-fuzz/524)

2017-02-01  12:42  Christos Zoulas <christos@@zoulas.com>

	* off by one in cdf parsing (PR/593)
	* report debugging sections in elf (PR/591)

2016-11-06  10:52  Christos Zoulas <christos@@zoulas.com>

	* Allow @@@@@@ in extensions
	* Add missing overflow check in der magic (Jonas Wagner)

2016-10-25  10:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.29

2016-10-24  11:20  Christos Zoulas <christos@@zoulas.com>

	* der getlength overflow (Jonas Wagner)
	* multiple magic file load failure (Christoph Biedl)

2016-10-17  11:26  Christos Zoulas <christos@@zoulas.com>

	* CDF parsing improvements (Guy Helmer)

2016-07-20   7:26  Christos Zoulas <christos@@zoulas.com>

	* Add support for signed indirect offsets

2016-07-18   7:41  Christos Zoulas <christos@@zoulas.com>

	* cat /dev/null | file - should print empty (Christoph Biedl)

2016-07-05  15:20  Christos Zoulas <christos@@zoulas.com>

	* Bump string size from 64 to 96.

2016-06-13  20:20  Christos Zoulas <christos@@zoulas.com>

	* PR/556: Fix separators on annotations.

2016-06-13  19:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.28
	* fix leak on allocation failure

2016-06-01   1:20  Christos Zoulas <christos@@zoulas.com>

	* PR/555: Avoid overflow for offset > nbytes
	* PR/550: Segv on DER parsing:
	    - use the correct variable for length
	    - set offset to 0 on failure.

2016-05-13  12:00  Christos Zoulas <christos@@zoulas.com>

	* release 5.27

2016-04-18   9:35  Christos Zoulas <christos@@zoulas.com>

	* Errors comparing DER entries or computing offsets
	  are just indications of malformed non-DER files.
	  Don't print them.
	* Offset comparison was off-by-one.
	* Fix compression code (Werner Fink)
	* Put new bytes constant in the right file (not the generated one)

2016-04-16  18:34  Christos Zoulas <christos@@zoulas.com>

	* release 5.26

2016-03-31  13:50  Christos Zoulas <christos@@zoulas.com>

	* make the number of bytes read from files configurable.

2016-03-21  13:40  Christos Zoulas <christos@@zoulas.com>

	* Add bounds checks for DER code (discovered by Thomas Jarosch)
	* Change indirect recursion limit to indirect use count and
	  bump from 15 to 50 to prevent abuse.

2016-03-13  20:39  Christos Zoulas <christos@@zoulas.com>

	* Add -00 which prints filename\0description\0

2016-03-01  13:28  Christos Zoulas <christos@@zoulas.com>

	* Fix ID3 indirect parsing

2016-01-19  10:18  Christos Zoulas <christos@@zoulas.com>

	* add DER parsing capability

2015-11-13  10:35  Christos Zoulas <christos@@zoulas.com>

	* provide dprintf(3) for the OS's that don't have it.

2015-11-11  16:25  Christos Zoulas <christos@@zoulas.com>

	* redo the compression code report decompression errors

2015-11-10  23:25  Christos Zoulas <christos@@zoulas.com>

	* REG_STARTEND code is not working as expected, delete it.

2015-11-09  16:05  Christos Zoulas <christos@@zoulas.com>

	* Add zlib support if we have it.

2015-11-05  11:22  Christos Zoulas <christos@@zoulas.com>

	* PR/492: compression forking was broken with magic_buffer.

2015-09-16   9:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.25

2015-09-11  13:25  Christos Zoulas <christos@@zoulas.com>

	* add a limit to the length of regex searches

2015-09-08   9:50  Christos Zoulas <christos@@zoulas.com>

	* fix problems with --parameter (Christoph Biedl)

2015-07-11  10:35  Christos Zoulas <christos@@zoulas.com>

	* Windows fixes PR/466 (Jason Hood)

2015-07-09  10:35  Christos Zoulas <christos@@zoulas.com>

	* release 5.24

2015-06-11   8:52  Christos Zoulas <christos@@zoulas.com>

	* redo long option encoding to fix off-by-one in 5.23

2015-06-10  13:50  Christos Zoulas <christos@@zoulas.com>

	* release 5.23

2015-06-09  16:10  Christos Zoulas <christos@@zoulas.com>

	* Fix issue with regex range for magic with offset
	* Always return true from mget with USE (success to mget not match
	  indication). Fixes mime evaluation after USE magic
	* PR/459: Don't insert magic entries to the list if there are parsing
	  errors for them.

2015-06-03  16:00  Christos Zoulas <christos@@zoulas.com>

	* PR/455: Add utf-7 encoding

2015-06-03  14:30  Christos Zoulas <christos@@zoulas.com>

	* PR/455: Implement -Z, look inside, but don't report on compression
	* PR/454: Fix allocation error on bad magic.

2015-05-29  10:30  Christos Zoulas <christos@@zoulas.com>

	* handle MAGIC_CONTINUE everywhere, not just in softmagic

2015-05-21  14:30  Christos Zoulas <christos@@zoulas.com>

	* don't print descriptions for NAME types when mime.

2015-04-09  15:59  Christos Zoulas <christos@@zoulas.com>

	* Add --extension to list the known extensions for this file type
	  Idea by Andrew J Roazen

2015-02-14  12:23  Christos Zoulas <christos@@zoulas.com>

	* Bump file search buffer size to 1M.

2015-01-09  14:35  Christos Zoulas <christos@@zoulas.com>

	* Fix multiple issues with date formats reported by Christoph Biedl:
		- T_LOCAL meaning was reversed
		- Arithmetic did not work
	  Also stop adjusting daylight savings for gmt printing.

2015-01-05  13:00  Christos Zoulas <christos@@zoulas.com>

	* PR/411: Fix memory corruption from corrupt cdf file.
@
text
@d3 1
a3 1
# $File: fonts,v 1.34 2016/12/01 15:30:33 christos Exp $
a17 50
# 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

a31 19
# From: Joerg Jenderek
# URL: http://grub.gibibit.com/New_font_format
# Reference: util/grub-mkfont.c
#		include/grub/fontformat.h 
# FONT_FORMAT_SECTION_NAMES_FILE
0			string		FILE		
# FONT_FORMAT_PFF2_MAGIC
>8			string		PFF2		
# leng 4 only at the moment
>>4			ubelong		4		
# FONT_FORMAT_SECTION_NAMES_FONT_NAME
>>>12			string		NAME		GRUB2 font
!:mime			application/x-font-pf2
!:ext			pf2
# length of font_name
>>>>16			ubelong		>0		
# font_name
>>>>>20			string		>\0		"%-s"

d34 3
a36 5
0	string		\001fcp			X11 Portable Compiled Font data,
>12	lelong		^0x08			bit: LSB,
>12	lelong		&0x08			bit: MSB,
>12	lelong		^0x04			byte: LSB first
>12	lelong		&0x04			byte: MSB first
d61 1
a61 2
# https://tools.ietf.org/html/rfc3073
0	string		PFR1		Portable Font Resource font data (new)
a62 2
0	string		PFR0		Portable Font Resource font data (old)
>4	beshort		>0		version %d
d91 1
a91 6
0x40	string		\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
>0x22	string		LP		Embedded OpenType (EOT)
# workaround until there's lepstring16
# >>0x52	lepstring16/h	>\0		\b, %s family
>>0x52	short	!0
>>>0x54	lestring16	x		\b, %s family
a94 11
0	name		woff
>4	belong		0x00010000	\b, TrueType
>4	belong		0x4F54544F	\b, CFF
>4	belong		0x74727565	\b, TrueType
>4	default		x
>>4	belong		x		\b, flavor %d
>8	belong		x		\b, length %d
#>12	beshort		x		\b, numTables %d
#>14	beshort		x		\b, reserved %d
#>16	belong		x		\b, totalSfntSize %d

d97 2
a98 1
>0	use		woff
a100 6
# http://www.w3.org/TR/WOFF2/
0	string		wOF2	Web Open Font Format (Version 2)
>0	use		woff
#>20	belong		x	\b, totalCompressedSize %d
>24	beshort		x	\b, version %d
>26	beshort		x	\b.%d
@


1.1.1.7
log
@Import file-5.31; mostly oss-fuzz found bugs.
@
text
@d3 1
a3 1
# $File: fonts,v 1.35 2017/03/17 21:35:28 christos Exp $
d22 3
a24 3
# Note:		moved from ./msdos magic
# dfVersion 256=0100h
0		uleshort	0x0100
d28 1
a28 1
>66		uleshort	0x0081
d30 1
a30 1
#>>70		uleshort	0x012c
d32 1
a32 1
#>>>72		uleshort	0x012c
d43 1
a43 1
>>>139		ulelong		>0
d49 1
a49 1
>>>105		ulelong		>0
d75 1
a75 1
0	lelong		00000004
d85 1
a85 1
#		include/grub/fontformat.h
d87 1
a87 1
0			string		FILE
d89 1
a89 1
>8			string		PFF2
d91 1
a91 1
>>4			ubelong		4
d97 1
a97 1
>>>>16			ubelong		>0
d159 2
a160 2
# Gurkan Sengun <gurkan@@linuks.mine.nu>, www.linuks.mine.nu
0	string		SplineFontDB:	Spline Font Database
@


1.1.1.8
log
@2017-09-02  11:53  Christos Zoulas <christos@@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@@zoulas.com>

	* PR/615 add magic_getflags()

2017-05-23  13:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.31

2017-03-17  20:32  Christos Zoulas <christos@@zoulas.com>

	* remove trailing spaces from magic files
	* refactor is_tar
	* better bounds checks for cdf
@
text
@d3 1
a3 1
# $File: fonts,v 1.37 2017/06/24 00:39:00 christos Exp $
d139 2
a140 115
# Modified by: Joerg Jenderek
# URL: https://en.wikipedia.org/wiki/TrueType
# Reference: https://developer.apple.com/fonts/TrueType-Reference-Manual/
#
# sfnt version "typ1" used by some Apple, but no example found
0	string	typ1
>0	use		sfnt-font
>0	use		sfnt-names
# sfnt version "true" used by some Apple
0	string	true
>0	use		sfnt-font
>0	use		sfnt-names
# GRR: below test is too general
# sfnt version often 0x00010000
0	string	\000\001\000\000
>0	use		sfnt-font
>0	use		sfnt-names
#	validate and display sfnt font data like number of tables
0	name		sfnt-font
# file 5.30 version assumes 00FFh as maximal number of tables
#>4	ubeshort	<0x0100		
# maximal 27 tables found like in Skia.ttf
# 46 different table names mentioned on Apple specification
# skip 1st sequence of DOS 2 backup with path separator (\~92 or /~47) misinterpreted as table number
>4	ubeshort	<47		
# skip bad examples with garbage table names like in a5.show HYPERC MAC
# tag names consist of up to four characters padded with spaces at end like
# BASE DSIG OS/2 Zapf acnt glyf cvt vmtx xref ...
>>12	regex/4l	\^[A-Za-z][A-Za-z][A-Za-z/][A-Za-z2\ ]	
#>>>0	ubelong	x	\b, sfnt version 0x%x
>>>0	ubelong	!0x4f54544f	TrueType
!:mime	application/font-sfnt
#!:mime	font/ttf
!:apple	????tfil
# .ttf for TrueType font
# EUDC.tte created by privat character editor %WINDIR%\system32\eudcedit.exe
!:ext	ttf/tte
# sfnt version 4F54544Fh~OTTO
>>>0	ubelong	=0x4f54544f	OpenType
!:mime	application/font-sfnt
#!:mime	font/otf
!:apple	????OTTO
!:ext	otf
>>>0	ubelong	x		Font data
# DSIG=44454947h table name implies a digitally signed font
# search range = number of tables * 16 =< maximal number of tables * 16 = 27 * 16 = 432
>>>12	search/432	DSIG		\b, digitally signed
>>>4	ubeshort	x		\b, %d tables
# minimal 9 tables found like in NISC18030.ttf
#>>>4	ubeshort	<10		TMIN
#>>>4	ubeshort	>24		TBIG
# table directory entries
>>>12	string		x		\b, 1st "%4.4s"

#	search and display 1st name in sfnt font which is often copyright text
#	does not work inside font collections
0	name		sfnt-names
# search for naming table
>12	search/432/s	name		
# biggest offset 0x0100bd28 like Windows10 Fonts\simsunb.ttf
#>>>>&8	ubelong		>0x0100bd27	BIGGEST OFFSET
>>&8	ubelong		>0x00100000	
# offset of name table
>>>&-4	ubelong		x		\b, name offset 0x%x
# GRR: pointer to name table only works if offset ~< FILE_BYTES_MAX = 100000h defined in src\file.h
>>&8	ubelong		<0x00100000	
>>>&-16	ubelong		x		
# name table
>>>>(&8.L)	ubequad	x		
# invalid format selector 
#>>>>>&-8	ubeshort	!0	\b, invalid selector %x
# minimal 3 name records found like in c:\Program Files (x86)\Tesseract-OCR\tessdata\pdf.ttf
# maximal 1227 name records found like in Apple Chancery.ttf
#>>>>>&-6	ubeshort	<0x4	mincount
#>>>>>&-6	ubeshort	>130	maxcount
>>>>>&-6	ubeshort	x	\b, %d names
# offset to start of string storage from start of table
#>>>>>&-4	ubeshort	x	\b, record offset %d
# 1st name record
# string offset from start of storage area 
#>>>>>&8		ubeshort	x	\b, string offset %d
# string length
#>>>>>&6		ubeshort	x	\b, string length %d
# minimal name string 7 like in c:\Program Files (x86)\Kodi\addons\webinterface.default\lib\video-js\font\VideoJS.ttf
# also found 0 like in SWZCONLN.TTF
#>>>>>&6		ubeshort	<8	MIN STRING
# maximal name string 806 like in c:\Windows\Fonts\palabi.ttf
#>>>>>&6		ubeshort	>805	MAX STRING
# platform identifier: 0~Apple Unicode, 1~Macintosh, 3~Microsoft
#>>>>>&-2	ubeshort	>3	BAD PLATFORM
>>>>>&-2	ubeshort	0	\b, Unicode
>>>>>&-2	ubeshort	1	\b, Macintosh
>>>>>&-2	ubeshort	3	\b, Microsoft
# languageID (0~english Macintosh, 0409h~english Microsoft, ...)
>>>>>&2		ubeshort	>0	\b, language 0x%x
# name identifiers
# often 0~copyright, 1~font, 2~font subfamily, 5~version, 13~license, 19~sample, ...
>>>>>&4		ubeshort	>0	\b, type %d string
# platform specific encoding:
# 0~undefined character set, 1~UGL set with Unicode, 3~Unicode 2.0 BMP only, 4~Unicode 2.0
#>>>>>&0		ubeshort	x	\b, %d encoding
>>>>>&0		ubeshort	0	
# handle only name string offset 0 because do not know how to add 2 relative offsets
>>>>>>&6		ubeshort	0	
>>>>>>>&(&-14.S-18)	ubyte		!0	
# GRR: instead 806 only first MAXstring = 96 characters are displayed as defined in src\file.h
# often copyright string that starts like \251 2006 The Monotype Corporation
>>>>>>>>&-1		string		x	\b, %-11.96s
# test for unicode string
>>>>>>>&(&-14.S-18)	ubyte		0	
>>>>>>>>&0		lestring16	x	\b, %-11.96s
# unicode encoding
>>>>>&0		ubeshort	>0	
>>>>>>&6		ubeshort	0	
>>>>>>>&(&-14.S-17)	lestring16	x	\b, %-11.96s
a145 1
# URL: https://en.wikipedia.org/wiki/OpenType
d147 5
a151 25
# Modified by: Joerg Jenderek
# Note:	container for TrueType, OpenType font
0	string		ttcf
# skip ASCII text
>4	ubyte		0		
# sfnt version often 0x00010000 of 1st table is TrueType
>>(12.L)	ubelong	!0x4f54544f	TrueType
#!:mime	font/ttf
!:apple	????tfil
!:ext	ttc
# sfnt version 4F54544Fh~OTTO of 1st table is OpenType font 
>>(12.L)	ubelong	=0x4f54544f	OpenType
#!:mime	font/otf
!:apple	????OTTO
# no example found for otc
!:ext	ttc/otc
>>4	ubyte		x		font collection data
!:mime	application/font-sfnt
#!:mime	font/collection
# TCC version
>>4	belong		0x00010000	\b, 1.0
>>4	belong		0x00020000	\b, 2.0
>>8	ubelong		>0		\b, %d fonts
# array offset size = fonts * offsetsize = fonts * 4
>>(8.L*4) ubequad	x		
d153 1
a153 5
>>>&4	belong		0x44534947	\b, digitally signed
# offset to 1st font
>>12	ubelong		x		\b, at 0x%x
# point to 1st font that starts with sfnt version
>>(12.L) use		sfnt-font
@


1.1.1.8.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: fonts,v 1.38 2017/11/14 15:48:36 christos Exp $
d297 1
a297 1
# From: Alex Myczko <alex@@aiei.ch>
@


1.1.1.9
log
@2018-04-15  14:52  Christos Zoulas <christos@@zoulas.com>

	* release 5.33

2018-02-24  14:50  Christos Zoulas <christos@@zoulas.com>

	* extend the support for ${x?:} expansions for magic descriptions

2018-02-21  16:25  Christos Zoulas <christos@@zoulas.com>

	* add support for ${x?:} in mime types to handle
	  pie binaries.

2017-11-03   9:23  Christos Zoulas <christos@@zoulas.com>

	* add support for negative offsets (offsets from the end of file)

2017-09-26   8:22  Christos Zoulas <christos@@zoulas.com>

	* close the file on error when writing magic (Steve Grubb)

2017-09-24  12:02  Christos Zoulas <christos@@zoulas.com>

	* seccomp support (Paul Moore)

2017-09-02  11:53  Christos Zoulas <christos@@zoulas.com>

	* release 5.32

2017-08-28  16:37  Christos Zoulas <christos@@zoulas.com>

	* Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski)

2017-08-27  03:55  Christos Zoulas <christos@@zoulas.com>

	* Fix always true condition (Thomas Jarosch)

2017-05-24  17:30  Christos Zoulas <christos@@zoulas.com>

	* pickier parsing of numeric values in magic files.

2017-05-23  17:55  Christos Zoulas <christos@@zoulas.com>

	* PR/615 add magic_getflags()
@
text
@d3 1
a3 1
# $File: fonts,v 1.38 2017/11/14 15:48:36 christos Exp $
d297 1
a297 1
# From: Alex Myczko <alex@@aiei.ch>
@


1.1.1.9.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
# $File: fonts,v 1.41 2019/05/05 16:44:04 christos Exp $
d20 1
a20 1
# Reference:	https://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
d83 1
a83 1
# URL: https://grub.gibibit.com/New_font_format
a130 52
# From: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font
# Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
#
# usual case with lightening mask and skewing mask 5555h~UU
62	ulelong		0x55555555
>0	use		gdos-font
# BOX18.GFT COWBOY30.GFT ROYALK30.GFT
62	ulelong		0
# skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size
>2	uleshort	>2
# skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 48
>>2	uleshort	<49
# skip MS Windows ICO ./msdos by looking for valid face name
>>>4	ubeshort	>0x1F00
# skip DOS executable BACKM212.COM by looking for horizontal offset table after header
#>>>>68	ulelong		>87		OFFSET_OK
>>>>0	use		gdos-font
0	name		gdos-font
>0	uleshort	x		GEM GDOS font
!:mime	application/x-font-gdos
# also .eps found like AA070GEP.EPS AI360GEP.EPS
!:ext	fnt/gtf
# font name like University Bold
>4	string		x		%.32s
# face size in points 3-48
>2	uleshort	x		%u
# face ID (must be unique)
>0	uleshort	x		\b, ID 0x%4.4x
# lowest character index in face (usually 32 for disk-loaded fonts).
#>36	uleshort	x		\b, low character index %u
# width of the widest character
#>50	uleshort	x		\b, %u char width
# width of the widest character cell
#>52	uleshort	x		\b, %u cell width
# thickening size
#>58	uleshort	x		\b, %u thick
# lightening mask to eliminate pixels, usually 5555h
>62	uleshort	!0x5555		\b, lightening mask 0x%x
# skewing mask to determine when to perform additional rotation when skewing, usually 5555h
>64	uleshort	!0x5555		\b, skewing mask 0x%x
# offset to horizontal offset table 58h~88 5eh
#>68	ulelong		>88		\b, 0x%x horizontal table offset
# offset character offset table
#>72	ulelong		x		\b, 0x%x coffset
# offset to font data
#>72	ulelong		x		\b, 0x%x foffset
# form width in bytes
#>80	uleshort	x		\b, %u fwidth
# pointer to the next font, set by GDOS after loading
#>84	ulelong		x		\b, 0x%x noffset

d170 2
a171 1
!:mime	font/sfnt
d178 2
a179 1
!:mime	font/otf
d260 1
a260 1
# https://www.microsoft.com/typography/otspec/otff.htm
d268 1
a268 1
!:mime	font/ttf
d273 1
a273 1
!:mime	font/otf
d278 1
d323 1
a323 1
# https://www.w3.org/TR/WOFF/
d328 1
a328 1
# https://www.w3.org/TR/WOFF2/
@


1.1.1.9.2.2
log
@Merge changes from current as of 20200406
@
text
@d3 1
a3 1
# $File: fonts,v 1.43 2019/07/16 11:11:31 christos Exp $
d136 2
a137 4
#62	ulelong		0x55555555
# skip cl8m8ocofedso.testfile by looking for face size lower/equal 72
#>2	uleshort	<73
#>>0	use		gdos-font
d139 1
a139 1
#62	ulelong		0
d141 8
a148 8
#>2	uleshort	>2
# skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 72
#>>2	uleshort	<73
# skip MS oem.hlp, some Windows ICO ./msdos by looking for valid long name like WYE
#>>>4	ulelong		>0x001F1f1F
# skip Microsoft WinWord 2.0 ./msdos by looking for positive offset to font data
#>>>>76	ulelong		>83
#>>>>>0	use		gdos-font
d154 1
a154 1
# font name like Big&Tall, Celtic #s, Courier, University Bold, WYE
d156 1
a156 1
# face size in points 3-72 SLSS03CG.FNT H1CELT72.FNT
d160 3
a162 3
# lowest character index in face (4 but usually 32 for disk-loaded fonts)
#>36	uleshort	!32		\b, unusual character index %u
# width of the widest character like 0 8 10 12 16 24 32
d164 1
a164 1
# width of the widest character cell like 8 11 12 14 15 16 33 67
d166 1
a166 1
# thickening size in pixel like 0 1 2 3 4 5 6 7 8
d172 3
a174 3
# offset to optional horizontal offset table 0 58h~88 5eh 252h
#>68	ulelong		x		\b, 0x%x horizontal table offset
# offset of character offset table 54h for many *.GFT 55h 58h 5Eh 120h 1D4h 202h 220h
d176 3
a178 3
# offset to font data like 116h 118h 158 20Ah 20Eh
>76	ulelong		x		\b, 0x%x foffset
# form width in bytes like 58 67 156 190 227 317 345
d180 1
a180 3
# form height in bytes like 4 8 11 17 26 56 70 90 120 146 150
#>82	uleshort	x		\b, %u fheight
# pointer to the next font like 0 10000h 20000h 30000h 40000h 60000h 80000h E0000h D0000h 
@


1.1.1.10
log
@2019-05-14  22:26  Christos Zoulas <christos@@zoulas.com>

	* release 5.37

2019-05-09  22:27  Christos Zoulas <christos@@zoulas.com>

	* Make sure that continuation separators are printed
	  with -k within softmagic

2019-05-06  22:27  Christos Zoulas <christos@@zoulas.com>

	* Change SIGPIPE saving and restoring during compression to use
	  sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko)
	* Cache stat(2) calls more to reduce number of calls (Denys Vlasenko)

2019-05-06  17:25  Christos Zoulas <christos@@zoulas.com>

	* PR/77: Handle --mime-type and -k correctly.

2019-05-03  15:26  Christos Zoulas <christos@@zoulas.com>

	* Switch decompression code to use vfork() because
	  tools like rpmdiff and rpmbuild call libmagic
	  with large process footprints (Denys Vlasenko)

2019-04-07  14:05  Christos Zoulas <christos@@zoulas.com>

	* PR/75: --enable-zlib, did not work.

2019-02-27  11:54  Christos Zoulas <christos@@zoulas.com>

	* Improve regex efficiency (Michael Schroeder) by:
		1. Prefixing regex searches with regular search
		   for keywords where possible
		2. Using memmem(3) where available
@
text
@d3 1
a3 1
# $File: fonts,v 1.41 2019/05/05 16:44:04 christos Exp $
d20 1
a20 1
# Reference:	https://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
d83 1
a83 1
# URL: https://grub.gibibit.com/New_font_format
a130 52
# From: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font
# Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
#
# usual case with lightening mask and skewing mask 5555h~UU
62	ulelong		0x55555555
>0	use		gdos-font
# BOX18.GFT COWBOY30.GFT ROYALK30.GFT
62	ulelong		0
# skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size
>2	uleshort	>2
# skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 48
>>2	uleshort	<49
# skip MS Windows ICO ./msdos by looking for valid face name
>>>4	ubeshort	>0x1F00
# skip DOS executable BACKM212.COM by looking for horizontal offset table after header
#>>>>68	ulelong		>87		OFFSET_OK
>>>>0	use		gdos-font
0	name		gdos-font
>0	uleshort	x		GEM GDOS font
!:mime	application/x-font-gdos
# also .eps found like AA070GEP.EPS AI360GEP.EPS
!:ext	fnt/gtf
# font name like University Bold
>4	string		x		%.32s
# face size in points 3-48
>2	uleshort	x		%u
# face ID (must be unique)
>0	uleshort	x		\b, ID 0x%4.4x
# lowest character index in face (usually 32 for disk-loaded fonts).
#>36	uleshort	x		\b, low character index %u
# width of the widest character
#>50	uleshort	x		\b, %u char width
# width of the widest character cell
#>52	uleshort	x		\b, %u cell width
# thickening size
#>58	uleshort	x		\b, %u thick
# lightening mask to eliminate pixels, usually 5555h
>62	uleshort	!0x5555		\b, lightening mask 0x%x
# skewing mask to determine when to perform additional rotation when skewing, usually 5555h
>64	uleshort	!0x5555		\b, skewing mask 0x%x
# offset to horizontal offset table 58h~88 5eh
#>68	ulelong		>88		\b, 0x%x horizontal table offset
# offset character offset table
#>72	ulelong		x		\b, 0x%x coffset
# offset to font data
#>72	ulelong		x		\b, 0x%x foffset
# form width in bytes
#>80	uleshort	x		\b, %u fwidth
# pointer to the next font, set by GDOS after loading
#>84	ulelong		x		\b, 0x%x noffset

d170 2
a171 1
!:mime	font/sfnt
d178 2
a179 1
!:mime	font/otf
d260 1
a260 1
# https://www.microsoft.com/typography/otspec/otff.htm
d268 1
a268 1
!:mime	font/ttf
d273 1
a273 1
!:mime	font/otf
d278 1
d323 1
a323 1
# https://www.w3.org/TR/WOFF/
d328 1
a328 1
# https://www.w3.org/TR/WOFF2/
@


1.1.1.11
log
@Import 5.38:
	- Always accept -S (no sandbox) even if we don't support sandboxing
	- More syscalls elided for sandboxiing
	- For ELF dynamic means having an interpreter not just PT_DYNAMIC
	- Check for large ELF session header offset
	- When saving and restoring a locale, keep the locale name in our
	  own storage.
	- Add a flag to disable CSV file detection.
	- Don't pass NULL/0 to memset to appease sanitizers.
	- Avoid spurious prints when looks for extensions or apple strings
	  in fsmagic.
	- Add builtin decompressors for xz and and bzip.
	- Add a limit for the number of CDF elements.
	- More checks for overflow in CDF.
@
text
@d3 1
a3 1
# $File: fonts,v 1.43 2019/07/16 11:11:31 christos Exp $
d136 2
a137 4
#62	ulelong		0x55555555
# skip cl8m8ocofedso.testfile by looking for face size lower/equal 72
#>2	uleshort	<73
#>>0	use		gdos-font
d139 1
a139 1
#62	ulelong		0
d141 8
a148 8
#>2	uleshort	>2
# skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 72
#>>2	uleshort	<73
# skip MS oem.hlp, some Windows ICO ./msdos by looking for valid long name like WYE
#>>>4	ulelong		>0x001F1f1F
# skip Microsoft WinWord 2.0 ./msdos by looking for positive offset to font data
#>>>>76	ulelong		>83
#>>>>>0	use		gdos-font
d154 1
a154 1
# font name like Big&Tall, Celtic #s, Courier, University Bold, WYE
d156 1
a156 1
# face size in points 3-72 SLSS03CG.FNT H1CELT72.FNT
d160 3
a162 3
# lowest character index in face (4 but usually 32 for disk-loaded fonts)
#>36	uleshort	!32		\b, unusual character index %u
# width of the widest character like 0 8 10 12 16 24 32
d164 1
a164 1
# width of the widest character cell like 8 11 12 14 15 16 33 67
d166 1
a166 1
# thickening size in pixel like 0 1 2 3 4 5 6 7 8
d172 3
a174 3
# offset to optional horizontal offset table 0 58h~88 5eh 252h
#>68	ulelong		x		\b, 0x%x horizontal table offset
# offset of character offset table 54h for many *.GFT 55h 58h 5Eh 120h 1D4h 202h 220h
d176 3
a178 3
# offset to font data like 116h 118h 158 20Ah 20Eh
>76	ulelong		x		\b, 0x%x foffset
# form width in bytes like 58 67 156 190 227 317 345
d180 1
a180 3
# form height in bytes like 4 8 11 17 26 56 70 90 120 146 150
#>82	uleshort	x		\b, %u fheight
# pointer to the next font like 0 10000h 20000h 30000h 40000h 60000h 80000h E0000h D0000h 
@


1.1.1.12
log
@2021-03-30  20:21  Christos Zoulas <christos@@zoulas.com>

	* release 5.40

2021-02-05  16:31  Christos Zoulas <christos@@zoulas.com>

	* PR/234: Add limit to the number of bytes to scan for encoding
	* PR/230: Fix /T (trim flag) for regex

2021-02-01  12:31  Christos Zoulas <christos@@zoulas.com>
	* PR/77: Trim trailing separator.

2020-12-17  15:44  Christos Zoulas <christos@@zoulas.com>

	* PR/211: Convert system read errors from corrupt ELF
	  files into human readable error messages

2020-12-08  16:24  Christos Zoulas <christos@@zoulas.com>

	* fix multithreaded decompression file descriptor issue
	  by using close-on-exec (Denys Vlasenko)

2020-06-27  11:58  Christos Zoulas <christos@@zoulas.com>

	* Exclude surrogate pairs from utf-8 detection (Michael Liu)

2020-06-25  12:53  Christos Zoulas <christos@@zoulas.com>

	* Include # to the list of ignored format chars (Werner Fink)
@
text
@d3 1
a3 1
# $File: fonts,v 1.45 2021/01/03 21:00:11 christos Exp $
a13 1
>26	string		>\0			(%s)
a125 3
# Update:	Joerg Jenderek
# URL:		http://fileformats.archiveteam.org/wiki/CPI
# Reference:	http://www.delorie.com/djgpp/doc/rbinter/it/58/17.html
a126 5
!:mime	font/x-dos-cpi
!:ext	cpi
0	string		\x7fDRFONT	DR-DOS code page font data collection
!:mime	font/x-drdos-cpi
!:ext	cpi
@


1.1.1.13
log
@Import file-5.43+; last was file-5.40

2022-09-20  17:12  Christos Zoulas <christos@@zoulas.com>

	* fixed various clustefuzz issues

2022-09-19  15:54  Christos Zoulas <christos@@zoulas.com>

	* Fix error detection for decompression code (Vincent Mihalkovic)

2022-09-15  13:50  Christos Zoulas <christos@@zoulas.com>

	* Add MAGIC_NO_COMPRESS_FORK and use it to produce a more
	  meaningful error message if we are sandboxing.

2022-09-15  10:45  Christos Zoulas <christos@@zoulas.com>

	* Add built-in lzip decompression support (Michal Gorny)

2022-09-14  10:35  Christos Zoulas <christos@@zoulas.com>

	* Add built-in zstd decompression support (Martin Rodriguez Reboredo)

2022-09-13  14:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.43

2022-09-10   9:17  Christos Zoulas <christos@@zoulas.com>

	* Add octal indirect magic (Michal Gorny)

2022-08-17  11:43  Christos Zoulas <christos@@zoulas.com>

	* PR/374: avoid infinite loop in non-wide code (piru)
	* PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli)

2022-07-26  11:10  Christos Zoulas <christos@@zoulas.com>

	* Fix bug with large flist (Florian Weimer)

2022-07-07  13:21  Christos Zoulas <christos@@zoulas.com>

        * PR/364: Detect non-nul-terminated core filenames from QEMU
	  (mam-ableton)

2022-07-04  15:45  Christos Zoulas <christos@@zoulas.com>

	* PR/359: Add support for http://ndjson.org/ (darose)
	* PR/362: Fix wide printing (ro-ee)
	* PR/358: Fix width for -f - (jpalus)
	* PR/356: Fix JSON constant parsing (davewhite)

2022-06-10   9:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.42

2022-05-31  14:50   Christos Zoulas <christos@@zoulas.com>

	* PR/348: add missing cases to prevent file from aborting on
	  random magic files.

2022-05-27  21:05   Christos Zoulas <christos@@zoulas.com>

	* PR/351: octalify filenames when not raw before printing.

2022-04-18  17:51   Christos Zoulas <christos@@zoulas.com>

	* fix regex cacheing bug (Dirk Mueller)
	* merge file_regcomp and file_regerror() to simplify the code
	  and reduce memory requirements for storing regexes (Dirk Mueller)

2022-03-19  12:56   Christos Zoulas <christos@@zoulas.com>

	* cache regex (Dirk Mueller)
	* detect filesystem full by flushing output (Dirk Mueller)

2021-11-19  12:36   Christos Zoulas <christos@@zoulas.com>

	* implement running decompressor programs using
	  posix_spawnp(2) instead of vfork(2)

2021-10-24  11:51   Christos Zoulas <christos@@zoulas.com>

	* Add support for msdos dates and times

2021-10-20   9:55   Christos Zoulas <christos@@zoulas.com>

	* use the system byte swapping functions if available (Werner Fink)

2021-10-18  11:57  Christos Zoulas <christos@@zoulas.com>

	* release 5.41

2021-09-23  03:51  Christos Zoulas <christos@@zoulas.com>

	* Avinash Sonawane: Fix tzname detection

2021-09-03  09:17  Christos Zoulas <christos@@zoulas.com>

	* Fix relationship tests with "search" magic, don't short circuit
	  logic

2021-07-13  01:06  Christos Zoulas <christos@@zoulas.com>

	* Fix memory leak in compile mode

2021-07-01  03:51  Christos Zoulas <christos@@zoulas.com>

	* PR/272: kiefermat: Only set returnval = 1 when we printed something
	  (in all cases print or !print). This simplifies the logic and fixes
	  the issue in the PR with -k and --mime-type there was no continuation
	  printed before the default case.

2021-06-30  13:07  Christos Zoulas <christos@@zoulas.com>

	* PR/270: Don't translate unprintable characters in %s magic formats
	  when -r
	* PR/269: Avoid undefined behavior with clang (adding offset to NULL)

2021-05-09  18:38  Christos Zoulas <christos@@zoulas.com>

	* Add a new flag (f) that requires that the match is a full word,
	   not a partial word match.
	* Add varint types (unused)

2021-04-19  17:17  Christos Zoulas <christos@@zoulas.com>

	* PR/256: mutableVoid: If the file is less than 3 bytes, use the file
	  length to determine type
	* PR/259: aleksandr.v.novichkov: mime printing through indirect magic
	  is not taken into account, use match directly so that it does.

2021-04-04  17:02  Christos Zoulas <christos@@zoulas.com>

	* count the total bytes found not the total byte positions
	  in order to determine encoding (Anatol Belski)
@
text
@d3 1
a3 1
# $File: fonts,v 1.51 2022/08/16 11:16:39 christos Exp $
a10 6
# Modified by:	Joerg Jenderek
# URL:		https://en.wikipedia.org/wiki/PostScript_fonts
#		http://fileformats.archiveteam.org/wiki/Adobe_Type_1
# Reference:	http://mark0.net/download/triddefs_xml.7z
#		defs/p/pfb.trid.xml
# Note:		PFB stands for Printer Font Binary
a11 2
#!:mime	font/x-postscript-pfb
#!:ext	pfb
d13 2
a14 22
# http://www.nationalarchives.gov.uk/pronom/fmt/525
6	string		%!PS-AdobeFont-1.
# skip DROID fmt-525-signature-id-816.pfb by checking for content after header
>24	ubyte		x			PostScript Type 1 font program data
#!:mime	application/octet-stream
!:mime	font/x-postscript-pfb
!:ext	pfb
# often followed by colon (3Ah) and space (20h) and font name like: DarkGardenMK LetterGothic
>>24	ubyte		=0x3A
>>>26	string		>\0			(%s)
# some times instead of colon %%CreationDate: and "font name" later
>>24	ubyte		!0x3A
# font name directive followed by def like: c0633bt_.pfb
>>>25	search/1247	/FontName\040/
# show font name in parentheses like: Frankfurt Lithos CharterBT-BoldItalic Courier10PitchBT-Bold
>>>>&0	regex		[A-Za-z0-9-]+		(%s)
# http://cd.textfiles.com/maxfonts/ATM/M/MIRROR__.PFB
6	string		%PS-AdobeFont-1.	PostScript Type 1 font program data
!:mime	font/x-postscript-pfb
!:ext	pfb
# font name like:  Times-Mirror
>25	string		>\0			(%s)
a15 2
#!:mime	font/x-postscript-pfb
#!:ext	pfb
a16 11
#!:mime	application/octet-stream
!:mime	font/x-postscript-pfb
!:ext	pfb
# font name like: CaslonOpenFace FetteFraktur Kaufmann Linotext MesozoicGothic Old-Town
>23	string		>\0			(%s)
# http://cd.textfiles.com/maxfonts/ATM/P/PLAYBI.PFB
230	string		%!FontType1	PostScript Type 1 font program data
!:mime	font/x-postscript-pfb
!:ext	pfb
# font name like: Playbill
>247	string		>\0			(%s)
a17 2
#!:mime	font/x-postscript-pfb
#!:ext	pfb
d70 1
a70 1
# updated by Joerg Jenderek at Feb 2013 and Nov 2021
d72 2
a73 7
# URL:		http://fileformats.archiveteam.org/wiki/SNF
# Reference:	https://cgit.freedesktop.org/xorg/lib/libXfont/tree/src/bitmap/snfstr.h
0	belong		00000004
# version2 same as version1 in struct _snfFontInfo
>104	belong		00000004		X11 SNF font data, MSB first
# GRR: line above is too general as it catches also DEGAS low-res bitmap like:
# http://cd.textfiles.com/geminiatari/FILES/GRAPHICS/ANIMAT/SPID_PAT/BIGSPID.PI1
d75 1
a75 2
!:ext	snf
# GRR: line below is too general as it catches also Xbase index file t3-CHAR.NDX
a78 2
# Reference:    http://mark0.net/download/triddefs_xml.7z/defs/s/snf-x11-lsb.trid.xml
!:ext	snf
d170 1
a170 1
>0	uleshort	x		\b, ID %#4.4x
d180 1
a180 1
>62	uleshort	!0x5555		\b, lightening mask %#x
d182 1
a182 1
>64	uleshort	!0x5555		\b, skewing mask %#x
d184 1
a184 1
#>68	ulelong		x		\b, %#x horizontal table offset
d186 1
a186 1
#>72	ulelong		x		\b, %#x coffset
d188 1
a188 1
>76	ulelong		x		\b, %#x foffset
d194 1
a194 1
#>84	ulelong		x		\b, %#x noffset
d233 1
a233 1
#>>>0	ubelong	x	\b, sfnt version %#x
d265 1
a265 1
>>>&-4	ubelong		x		\b, name offset %#x
d296 1
a296 1
>>>>>&2		ubeshort	>0	\b, language %#x
d351 1
a351 1
>>12	ubelong		x		\b, at %#x
a386 1
!:mime font/woff
a391 2
!:mime font/woff2
!:ext	woff2
@


1.1.1.1.2.1
log
@file fonts was added on branch jym-xensuspend on 2009-05-13 18:51:55 +0000
@
text
@d1 65
@


1.1.1.1.2.2
log
@Sync with HEAD.

Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@a0 65
#------------------------------------------------------------------------------
# fonts:  file(1) magic for font data
#
0	search/1	FONT		ASCII vfont text
0	short		0436		Berkeley vfont data
0	short		017001		byte-swapped Berkeley vfont data

# PostScript fonts (must precede "printer" entries), quinlan@@yggdrasil.com
0	string		%!PS-AdobeFont-1.	PostScript Type 1 font text
>20	string		>\0			(%s)
6	string		%!PS-AdobeFont-1.	PostScript Type 1 font program data

# X11 font files in SNF (Server Natural Format) format
0	belong		00000004		X11 SNF font data, MSB first
0	lelong		00000004		X11 SNF font data, LSB first

# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@@yggdrasil.com)
0	search/1	STARTFONT\ 		X11 BDF font text

# X11 fonts, from Daniel Quinlan (quinlan@@yggdrasil.com)
# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
0	string		\001fcp			X11 Portable Compiled Font data
>12	byte		0x02			\b, LSB first
>12	byte		0x0a			\b, MSB first
0	string		D1.0\015		X11 Speedo font data

#------------------------------------------------------------------------------
# FIGlet fonts and controlfiles
# From figmagic supplied with Figlet version 2.2
# "David E. O'Brien" <obrien@@FreeBSD.ORG>
0	string		flf		FIGlet font
>3	string		>2a		version %-2.2s
0	string		flc		FIGlet controlfile
>3	string		>2a		version %-2.2s

# libGrx graphics lib fonts, from Albert Cahalan (acahalan@@cs.uml.edu)
# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
0	belong		0x14025919	libGrx font data,
>8	leshort		x		%dx
>10	leshort		x		\b%d
>40	string		x		%s
# Misc. DOS VGA fonts, from Albert Cahalan (acahalan@@cs.uml.edu)
0	belong		0xff464f4e	DOS code page font data collection
7	belong		0x00454741	DOS code page font data
7	belong		0x00564944	DOS code page font data (from Linux?)
4098	string		DOSFONT		DOSFONT2 encrypted font data

# downloadable fonts for browser (prints type) anthon@@mnt.org
0	string		PFR1		PFR1 font
>102	string		>0		\b: %s

# True Type fonts
0	string	\000\001\000\000\000	TrueType font data

0	string		\007\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font
0	string		\012\001\001\000Copyright\ (c)\ 199	Adobe Multiple Master font

0	string		ttcf		TrueType font collection data

# Opentype font data from Avi Bercovich
0	string		OTTO		OpenType font data 

# Gürkan Sengün <gurkan@@linuks.mine.nu>, www.linuks.mine.nu 
0	string		SplineFontDB:	Spline Font Database 
>14	string		x		version %s
@


