summaryrefslogtreecommitdiff
path: root/fonts/utilities/t1tools/readme
blob: 7dd1c2f08384b611caf49e5d768c078b97449b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
t1tools is a collection of programs and batch files useful for 
handling type 1 fonts on MSDOS and Unix systems.
Documentation is ad-hoc to get the package out at last - sorry for 
any inconvenience this may impose. The package is not meant for 
people without knowledge about type 1 font and metrics stuff.
If you detect any incompleteness or have any suggestions for improvement, 
please tell me.
Thomas Wolff@inf.fu-berlin.de


The package is available by anonymous ftp:
	ftp.fu-berlin.de: pub/postscript/t1tools.zip


The package contains the following tools:

makeafm.bat (MSDOS)
makeafm (Unix)
	Generates an .afm font metrics file from a .pfb font file.
	The information is taken directly from the font itself by 
	first disassembling it using an appropriate program.
	If pair kerning information is available from any previously 
	existing .afm or .pfm file for that font it will be included 
	in the generated .afm file.

	Syntax: makeafm font-file-base
		Don't include .pfb / .pfa suffix in file name.
	Examples:
		makeafm photina

	Disadvantage: character bounding box information will not be 
	included. This does not matter for use with FrameMaker (which 
	I originally wrote the script for), but for some Tex-ps adaptations.
	The MSDOS version, however, does at least include simulated character 
	bounding box information derived from other font information to 
	enable Adobe's makepfm to work on the .afm file.
	Required: 
	1. To disassemble the type 1 font (.pfb file):
	   the program t1disasm from the package t1utils posted by 
	   I. Lee Hetherington with the following modification to t1disasm.c:
	   look up the line   output(" {\n");
	   at the beginning of the routine do_charstring and remove the \n .
	2. To extract pair kerning information from .pfm files on MSDOS:
	a) either the program pfm2afm
	b) or the program dumppfm (version 1.5.3)
	(Extraction from .pfm files works without additional software on Unix.)


getmetri.bat (MSDOS)
getmetric (Unix)
	Generates an .afm font metrics file by interpretation of the font 
	using GhostScript. Like makeafm, this script will try to include 
	kerning information from previous sources.

	Syntax: getmetric font-file-base [/FontName]
		Don't include .pfb / .pfa suffix in file name.
		Explicit /FontName can choose among several fonts in file.
	Examples:
		getmetric photina
		getmetric hvn_____ /Helvetica-Narrow

	Disadvantage: GhostScript in its current version still has a bug 
	which causes incorrect width information to be calculated for 
	characters composed by seac and having a different width from their 
	base character - actually, this should not be allowed according to 
	the type 1 font specification, but to accomodate existing fonts to 
	work, rather Adobe's "Do what we implement" semantics should be 
	realized. The problem especially occurs with fonts bundled with 
	Micrografx Designer (which even compose characters like double 
	qoute marks from single quote marks etc), so don't apply getmetri 
	on them.

	Required: GhostScript
		getmetri.ps (enclosed), which is a corrected and enhanced 
		version of the PostScript program posted by W.T. Roberts 
		and Bryan Bayerdorffer.

pfbshow.bat (MSDOS)
gpreview (Unix)
preview (Unix)
pfbpr.bat (MSDOS)
preprint (Unix)
	[preview and preprint differ from gpreview only by their name and 
	can be created by setting respective links.]
	Generates a sample text and character set listing of up to four 
	fonts (preferably of one family).
	The latter two print, the first three display on screen.

	Syntax:	pfbshow fontfile1 [fontfile2 [fontfile3 [fontfile4]]]
		pfbpr   fontfile1 [fontfile2 [fontfile3 [fontfile4]]]
		preview (fontfile|fontname) ...
		Up to four fonts make sense. The Unix scripts can accept 
		FontNames instead of file names to explicitly select a 
		font which must then be previously known to the interpreter.
	Examples:
		pfbshow photina.pfb
		pfbshow photina photinai photinab
		gpreview Times-Roman.pfb /Hershey-Roman

	Required:
	one of several .pfb/.pfa converters (e.g. from t1utils)
	pfbshow.bat, pfbpr.bat: pfshow.ps (enclosed)
	pfbshow, gpreview, pfbpr: GhostScript
	preprint: a PostScript printer
	preview: a type 1 font emulation package for OpenWindows 
		and a font disassembler (e.g. from t1utils)
		(or maybe, native type 1 font interpretation in 
		 OpenWindows 3.1 which I don't have)

pcs.bat (MSDOS)
	Display the character set of a font in comparison with that of 
	an installed reference font (or a second font) including a 
	coloured width and slant angle box. It can be used to judge 
	quality, similarity, and correct/incorrect character set assignment 
	of fonts.

	Syntax: pcs filename [filename2]
	Examples:
		pcs gocmase_.pfb
		pcs agar agarsc

pfblist.bat (MSDOS)
	Generates a list of file and font names of the current directory.
	Requires: pfbnames.pas/.exe (enclosed)

afm-pfm.bat (MSDOS)
	Generates .pfm from .afm files using Adobe's makepfm program.
	Generates .inf information as needed for makepfm. Also tries 
	to extract the correct Bold/Italic combination from .afm information.
	Can be called with explicit information about the Windows menu 
	font name and Bold/Italic combination to be used.

	Syntax: afm-pfm fontfile [MSMenuName | - ] [N | I | B | T]
		Don't include .afm suffix in fontfile.
		MSMenuName selects a name under which the font should appear 
		in MS Windows menus for most programs if this is different 
		from the FamilyName in the .afm file. (Annoyingly, only 
		4 fonts can be grouped under one name in MS Windows.)
		N forces the generated style information to be normal, 
		I italic, B bold, T bold-italic.
	Examples:
		afm-pfm agar
		afm-pfm agarb AGaramondBold N
	If the MS menu name to be generated should contain blanks, an .inf 
	file must be generated first and the name inserted there.

	Required: makepfm.exe from Adobe's "font foundry".

afm-inf.bat (MSDOS)
	Part of afm-pfm, can also be called separately.
	Example: afm-inf agar

afm-sort.bat (MSDOS)
	Sorts the pair kerning list within an .afm file. Needed for some 
	.afm files to prevent Adobe's simple-minded makepfm program 
	from crashing.
	Example: afm-sort agar

pfb-abf.bat (MSDOS)
	Generate .abf files for 72x72 resolution as required to generate 
	FrameMaker screen font files for use on Sun workstations.

	Syntax: pfb-abf fontname [outnam [resolutionx [resolutiony [encoding]]]]
		Don't include .pfb suffix in fontname.
		If fontname is longer than 6 characters a unique outnam with 
		at most 6 characters must additionally be specified (five if 
		you should generate point sizes > 99).
		Screen resolution defaults to 72x72 (for Sun workstations) 
		but can be changed.
		The encoding vector to be applied (to be given without its 
		.enc suffix) defaults to fontname.ENC if that exists, 
		C:\Adobe\APPLE.ENC otherwise (adapt the path in the script 
		to where you place the APPLE.ENC file enclosed).
		The set of point sizes to be generated defaults to 
		10 12 14 18 24 but may changed by the environment variable 
		SIZES, e.g. (for display fonts) set SIZES=18 24 36
		Note that FrameMaker needs at least sizes 18 and 24.

	Required: makebit.exe, makeabf.exe from Adobe's "font foundry".

pfb-sfp.bat (MSDOS)
	Generate HP Laserjet soft fonts from .pfb fonts.

	Syntax: pfb-abf fontname [outnam [resolutionx [resolutiony [encoding]]]]
		Don't include .pfb suffix in fontname.
		If fontname is longer than 6 characters a unique outnam with 
		at most 6 characters must additionally be specified (five if 
		you should generate point sizes > 99).
		Printer resolution defaults to 300x300.
		The encoding vector to be applied (to be given without its 
		.enc suffix) defaults to fontname.ENC if that exists, 
		C:\Adobe\foundry\W.ENC otherwise (adapt path in the script).
		The set of point sizes to be generated defaults to 
		10 12 but may changed by the environment variable PSIZES, 
		e.g. set PSIZES=9 10 12 14 18

	Required: makebit.exe, makeljf.exe from Adobe's "font foundry".

pfb-enc.bat (MSDOS)
	Extracts an .ENC encoding description from a font specific encoding 
	vector for use with pfb-abf or pfb-sfp.
	Example:
		pfb-enc agarexp

fm.ps
	A one-liner. Prepended to FrameMaker generated PostScript files 
	it makes them work with GhostScript.

compose.bat (MSDOS) (not included)
	This script calculates positions of accent marks and other 
	character parts to be composed for composed characters.
	It can be used as batch file or interactively, enabling 
	visual correction of character slant values, accent distance, etc.
	The program (actually, compose.ps) generates output usable by my 
	"t1tidy" program which will then generate according characters 
	into the font.
	Since the interactive version has not been developed to a state 
	I would like to see posted publically (I have only used it myself 
	for a few fonts) it is not included in the ftp-able package but 
	I will mail it to anyone who states interest.

Debugging: All MSDOS scripts accept an additional first parameter "-" 
in which case they do not delete their intermediate files.

Remark: Due to that silly MSDOS path restriction, all my MSDOS scripts 
(.bat files) contain full path names for several programs. These will have 
to be adapted to your installation. Also, for pcs, a reference font will 
have to be chosen and installed in the script.