Debian Codegraph @

texmf-dist/doc/man/man1/pkfix-helper.1

raw
1 .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 . ds -- \(*W-
28 . ds PI pi
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31 . ds L" ""
32 . ds R" ""
33 . ds C` ""
34 . ds C' ""
35 'br\}
36 .el\{\
37 . ds -- \|\(em\|
38 . ds PI \(*p
39 . ds L" ``
40 . ds R" ''
41 . ds C`
42 . ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD. Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{\
60 . if \nF \{\
61 . de IX
62 . tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 . if !\nF==2 \{\
65 . nr % 0
66 . nr F 2
67 . \}
68 . \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear. Run. Save yourself. No user-serviceable parts.
74 . \" fudge factors for nroff and troff
75 .if n \{\
76 . ds #H 0
77 . ds #V .8m
78 . ds #F .3m
79 . ds #[ \f1
80 . ds #] \fP
81 .\}
82 .if t \{\
83 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 . ds #V .6m
85 . ds #F 0
86 . ds #[ \&
87 . ds #] \&
88 .\}
89 . \" simple accents for nroff and troff
90 .if n \{\
91 . ds ' \&
92 . ds ` \&
93 . ds ^ \&
94 . ds , \&
95 . ds ~ ~
96 . ds /
97 .\}
98 .if t \{\
99 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 . \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 . \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 . \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 . ds : e
123 . ds 8 ss
124 . ds o a
125 . ds d- d\h'-1'\(ga
126 . ds D- D\h'-1'\(hy
127 . ds th \o'bp'
128 . ds Th \o'LP'
129 . ds ae ae
130 . ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "PKFIX-HELPER 1"
136 .TH PKFIX-HELPER 1 "2020-08-06" "v1.6" " "
137 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 pkfix\-helper \- preprocess dvips\-produced PostScript documents before passing them to pkfix
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 pkfix-helper
146 [\fB\-\-help\fR]
147 [\fB\-\-verbose\fR]
148 [\fB\-\-force\fR=\fIname\fR=\fIfontspec\fR]
149 [\fB\-\-ps\fR=\fIfilename.ps\fR]
150 [\fB\-\-tex\fR=\fIfilename.tex\fR]
151 [\fB\-\-cache\fR=\fIfilename\fR]
152 [\fB\-\-include\fR=\fIfontspec\fR]
153 [\fB\-\-exclude\fR=\fIregexp\fR]
154 [\fB\-\-keep\fR=\fIfontspec\fR]
155 [\fB\-\-quiet\fR]
156 [\fB\-\-no\-repeats\fR]
157 [\fB\-\-spp\fR=\fInumber\fR]
158 [\fIinput.ps\fR [\fIoutput.ps\fR]]
159 .SH "DESCRIPTION"
160 .IX Header "DESCRIPTION"
161 .SS "Motivation"
162 .IX Subsection "Motivation"
163 PostScript documents created with old versions of \fBdvips\fR almost
164 invariably utilize bitmapped (PostScript Type\ 3) fonts. The
165 problem with bitmapped fonts is that they target a specific device
166 resolution; a PostScript file produced using 300\ \s-1DPI\s0 fonts will
167 look grainy on a 600\ \s-1DPI\s0 printer. Even worse, \fIall\fR bitmapped
168 fonts look grainy when zoomed in on screen. The solution is to use
169 vector (PostScript Type\ 1) fonts, which are resolution-independent
170 and appear crisp at any size or scale.
171 .PP
172 While it is no longer difficult to configure \fBdvips\fR to use vector
173 fonts, it is not always possible to rerun \fBdvips\fR on an old \fI.dvi\fR
174 file. The \fI.dvi\fR file and document source may have been lost; or,
175 the source may no longer compile because packages it depends upon may
176 no longer be available.
177 .PP
178 Heiko Oberdiek's \fBpkfix\fR script replaces bitmapped fonts in
179 \&\fBdvips\fR\-produced PostScript files with the corresponding vector
180 fonts. It works by parsing the PostScript comments with which
181 \&\fBdvips\fR surrounds bitmapped-font definitions. For example, a font
182 definition beginning with the comment \f(CW\*(C`%DVIPSBitmapFont: Fi cmss10 11
183 28\*(C'\fR and ending with a matching \f(CW%EndDVIPSBitmapFont\fR is known to
184 define font \f(CW\*(C`Fi\*(C'\fR as \f(CW\*(C`cmss10\*(C'\fR (Computer Modern Sans Serif at a design
185 size of 10\ points) scaled to \f(CW11\fR\ points. Only the \f(CW28\fR
186 characters actually used by the document are defined. \fBpkfix\fR then
187 replaces the font definition with one that defines \f(CW\*(C`Fi\*(C'\fR using the
188 same set of characters but taken from the \fIcmss10.pfb\fR vector font
189 file.
190 .PP
191 Unfortunately, \fBpkfix\fR works only with versions of \fBdvips\fR newer
192 than v5.58 (ca.\ 1996). Naturally, the older a PostScript document,
193 the less likely its sources still exist and can still be recompiled.
194 Older versions of \fBdvips\fR lack \f(CW%DVIPSBitmapFont\fR comments and
195 various other PostScript comments on which \fBpkfix\fR relies. Without
196 PostScript comments to guide it, \fBpkfix\fR is unable to determine which
197 vector fonts correspond with which bitmapped fonts.
198 .SS "Overview"
199 .IX Subsection "Overview"
200 The \fBpkfix-helper\fR script is a preprocessor for \fBpkfix\fR that
201 attempts to determine the association between each document-font name
202 (e.g.,\ \f(CW\*(C`Fi\*(C'\fR) in a PostScript file and the original font (e.g.,\ \f(CW\*(C`cmss10\*(C'\fR) and fonts size (e.g., \f(CW11\fR\ points). It then
203 fabricates the PostScript comments that \fBpkfix\fR expects to see so
204 that \fBpkfix\fR can do its job.
205 .PP
206 \&\fBpkfix-helper\fR works by comparing every document font against every
207 \&\fI.tfm\fR font file it knows about (assuming that each such font has a
208 corresponding \fI.pfb\fR vector version) and selecting the best matching
209 \&\fI.tfm\fR file for every document font. \fBpkfix-helper\fR has access only
210 to the widths of characters and only to those characters actually used
211 in the document. Also, the program recognizes only a limited set of
212 the most popular \fI.tfm\fR files and scaling factors. Consequently, the
213 comparison is imperfect and \fBpkfix-helper\fR may attribute an incorrect
214 font to a given name. Fonts comprising only one or two characters
215 actually used in a document are particularly problematic for
216 \&\fBpkfix-helper\fR because many fonts may be near-enough matches to fool
217 the problem.
218 .PP
219 \&\fBpkfix-helper\fR is designed so that a user can guide the
220 font-selection process by manually designating matching fonts. With a
221 modicum of diligence and patience a user can correct any mismatched
222 fonts and help the program provide proper input to \fBpkfix\fR.
223 .SH "OPTIONS"
224 .IX Header "OPTIONS"
225 \&\fBpkfix-helper\fR accepts on the command line the filename of a
226 PostScript document to process (with the default being the standard
227 input device) and the filename of a modified PostScript document to
228 create (with the default being the standard output device). The
229 program also accepts the following command-line options:
230 .SS "Frequently Used Options"
231 .IX Subsection "Frequently Used Options"
232 .IP "\fB\-h\fR, \fB\-\-help\fR" 4
233 .IX Item "-h, --help"
234 Display usage information and exit. The \fB\-\-verbose\fR and \fB\-\-quiet\fR
235 options can be used to increase and decrease the amount of information
236 presented.
237 .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4
238 .IX Item "-v, --verbose"
239 Increase the amount of status information that \fBpkfix-helper\fR
240 displays as it runs. Additional instances of \fB\-\-verbose\fR on the
241 command line further increase the program's verbosity. By default,
242 only major operations are displayed. A single \fB\-\-verbose\fR
243 additionally displays information about individual font comparisons.
244 A second \fB\-\-verbose\fR additionally displays details about some of the
245 program's internal operations.
246 .IP "\fB\-f\fR \fIname\fR=\fIfontspec\fR, \fB\-\-force\fR=\fIname\fR=\fIfontspec\fR" 4
247 .IX Item "-f name=fontspec, --force=name=fontspec"
248 Force \fBpkfix-helper\fR to associate a specific font with a given font
249 name appearing the document. \fIname\fR is a (usually) two-character
250 \&\fBdvips\fR font name such as \f(CW\*(C`Fa\*(C'\fR. \fIfontspec\fR is a font specification
251 that comprises a font name and an optional scale: "\fIfont\fR [\f(CW\*(C`@\*(C'\fR\ \fIscale\fR]". Some examples of \fIfontspec\fRs are \f(CW\*(C`cmmi8\*(C'\fR and
252 \&\f(CW\*(C`cmsy10\ @\ 1.1X\*(C'\fR.
253 .Sp
254 An asterisk used in the name of the font (e.g.,\ \f(CW\*(C`cmti*\*(C'\fR) will be
255 replaced by all integers from 5 to 17 (\f(CW\*(C`cmti5\*(C'\fR, \f(CW\*(C`cmti6\*(C'\fR,\ ...,
256 \&\f(CW\*(C`cmti17\*(C'\fR). The scale can be written as a multiple of the design size
257 (\f(CW\*(C`X\*(C'\fR) or as an absolute size in either TeX points (\f(CW\*(C`pt\*(C'\fR) or
258 PostScript \*(L"big\*(R" points (\f(CW\*(C`bp\*(C'\fR). Hence, \f(CW\*(C`cmsy8\ @\ 1.5X\*(C'\fR, \f(CW\*(C`cmsy8\ @\ 12pt\*(C'\fR, and \f(CW\*(C`cmsy8\ @\ 11.96bp\*(C'\fR all represent the \fIComputer
259 Modern Math Symbols 8 Point\fR font scaled to 12 TeX points/11.96
260 PostScript points. Instead of specifying an explicit scale, an
261 asterisk can be used (as in \f(CW\*(C`cmsy8\ @\ *\*(C'\fR) to request that
262 \&\fBpkfix-helper\fR find the scale that best matches the original font's
263 metrics.
264 .Sp
265 The \fB\-\-force\fR option can be specified repeatedly on the command line.
266 .IP "\fB\-p\fR \fIfilename.ps\fR, \fB\-\-ps\fR=\fIfilename.ps\fR" 4
267 .IX Item "-p filename.ps, --ps=filename.ps"
268 Create a PostScript file called \fIfilename.ps\fR that shows the \fBdvips\fR
269 name and a font sample of every font used by the input document.
270 .IP "\fB\-t\fR \fIfilename.tex\fR, \fB\-\-tex\fR=\fIfilename.tex\fR" 4
271 .IX Item "-t filename.tex, --tex=filename.tex"
272 Create a Plain TeX file called \fIfilename.tex\fR that shows the \fBdvips\fR
273 name and a font sample of every font that \fBpkfix-helper\fR used in the
274 output document.
275 .IP "\fB\-k\fR \fIfontspec\fR, \fB\-\-keep\fR=\fIfontspec\fR" 4
276 .IX Item "-k fontspec, --keep=fontspec"
277 Do not substitute a vector font for bitmapped font \fIfontspec\fR (\f(CW\*(C`Fa\*(C'\fR,
278 \&\f(CW\*(C`Fb\*(C'\fR, etc.). This is useful when converting documents that use
279 obscure bitmapped fonts for which there is no vector equivalent. For
280 example, it was somewhat common in the past to include graphics such
281 as university or corporate logos into a document by converting the
282 bitmapped image into a single-character font and using that font in
283 LaTeX. \fB\-\-keep\fR prevents such fonts from being replaced. The
284 \&\fB\-\-keep\fR option can be specified repeatedly on the command line.
285 .IP "\fB\-1\fR, \fB\-\-no\-repeats\fR" 4
286 .IX Item "-1, --no-repeats"
287 Prevent \fBpkfix-helper\fR from associating the same \fIfontspec\fR with
288 more than one \fBdvips\fR font name.
289 .SS "Less-frequently Used Options"
290 .IX Subsection "Less-frequently Used Options"
291 .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4
292 .IX Item "-q, --quiet"
293 Instruct \fBpkfix-helper\fR to produce no output during its run except
294 for error and warning messages.
295 .IP "\fB\-C\fR \fIfilename\fR, \fB\-\-cache\fR=\fIfilename\fR" 4
296 .IX Item "-C filename, --cache=filename"
297 Speed up \s-1TFM\s0 file processing by caching character metrics into file
298 \&\fIfilename\fR. On some systems it takes a long time to read a \s-1TFM\s0 file,
299 spawn \fItftopl\fR to convert it to \s-1PL\s0 format, and extract from the \s-1PL\s0
300 data the metrics for each character. The first time \fB\-\-cache\fR is
301 specified, \fBpkfix-helper\fR proceeds as normal then writes all of the
302 extracted character metrics to \fIfilename\fR. On subsequent runs in
303 which \fB\-\-cache\fR=\fIfilename\fR is specified, \fBpkfix-helper\fR reads the
304 previously extracted metrics from \fIfilename\fR, going through the
305 \&\fItftopl\fR\-based process only for \s-1TFM\s0 files that were not previously
306 encountered.
307 .IP "\fB\-i\fR \fIfontspec\fR, \fB\-\-include\fR=\fIfontspec\fR" 4
308 .IX Item "-i fontspec, --include=fontspec"
309 Add \fIfontspec\fR to the list of font specifications against which
310 \&\fBpkfix-helper\fR compares \fIevery\fR document font. (In contrast,
311 \&\fB\-\-force\fR designates a font specification to use only for a
312 \&\fIspecific\fR document font.) The \fB\-\-include\fR option can be specified
313 repeatedly on the command line.
314 .IP "\fB\-x\fR \fIregexp\fR, \fB\-\-exclude\fR=\fIregexp\fR" 4
315 .IX Item "-x regexp, --exclude=regexp"
316 Remove all font specifications matching regular expression \fIregexp\fR
317 from \fBpkfix-helper\fR's list of known fonts. The \fB\-\-exclude\fR option
318 can be specified repeatedly on the command line.
319 .IP "\fB\-s\fR, \fB\-\-spp\fR" 4
320 .IX Item "-s, --spp"
321 Specify the number of font samples per page to print to the files
322 indicated using the \fB\-\-ps\fR and \fB\-\-tex\fR options. The default
323 value,\ 25, should work well in most circumstances.
324 .SH "DIAGNOSTICS"
325 .IX Header "DIAGNOSTICS"
326 .ie n .IP """Best match for \fIname\fP is rather poor""" 4
327 .el .IP "\f(CWBest match for \f(CIname\f(CW is rather poor\fR" 4
328 .IX Item "Best match for name is rather poor"
329 The best font \fBpkfix-helper\fR found for \fBdvips\fR font name \fIname\fR has
330 a mismatch value greater than or equal to\ 1.0. (The mismatch value
331 is the sum of the squares of the difference between the character
332 widths of a document font and a potential replacement font.) Use the
333 \&\fB\-\-force\fR option to designate an alternative replacement font or
334 scaling amount.
335 .ie n .IP """\fIname\fP uses characters that don\*(Aqt appear in any candidate font""" 4
336 .el .IP "\f(CW\f(CIname\f(CW uses characters that don\*(Aqt appear in any candidate font\fR" 4
337 .IX Item "name uses characters that dont appear in any candidate font"
338 None of the fonts considered for a match include all of the characters
339 in font \fIname\fR. The user should use the \fB\-\-force\fR option to inform
340 \&\fBpkfix-helper\fR which font to use or the \fB\-\-keep\fR option to retain
341 the original, bitmapped font.
342 .ie n .IP """Processing \fIname\fP ... done (\fIfont\fP with mismatch=\fInumber\fP, tied with \fIfont\fP...)""" 4
343 .el .IP "\f(CWProcessing \f(CIname\f(CW ... done (\f(CIfont\f(CW with mismatch=\f(CInumber\f(CW, tied with \f(CIfont\f(CW...)\fR" 4
344 .IX Item "Processing name ... done (font with mismatch=number, tied with font...)"
345 The best match for \fIname\fR is font \fIfont\fR. A perfect match has a
346 \&\fInumber\fR of 0.00000. Worse matches observe larger values. If a tie
347 is reported, this means one or more fonts matched \fIname\fR equally well
348 (i.e., they see the same \fInumber\fR). In this case, \fBpkfix-helper\fR
349 selects the qualitatively most likely font as the winner.
350 .SH "EXAMPLES"
351 .IX Header "EXAMPLES"
352 For the purpose of the following examples, assume that \fIoldfile.ps\fR
353 is the name of a PostScript file produced by an old version of
354 \&\fBdvips\fR and utilizing at least one bitmapped font. It's always worth
355 verifying that \fBpkfix\fR can't convert the file on its own:
356 .PP
357 .Vb 3
358 \& $ pkfix oldfile.ps newfile.ps
359 \& PKFIX 1.3, 2005/02/25 \- Copyright (c) 2001, 2005 by Heiko Oberdiek.
360 \& ==> no fonts converted
361 .Ve
362 .PP
363 (Alternatively \fBpkfix\fR may issue an error message such as \f(CW\*(C`!!!
364 Error: Parse error (@start parameters)!\*(C'\fR.) Only when \fBpkfix\fR can't
365 replace bitmapped fonts with vector fonts is \fBpkfix-helper\fR needed.
366 In its simplest form, \fBpkfix-helper\fR takes the name of an input file
367 (\fIoldfile.ps\fR in this example) and the name of an output file
368 (\fIpkfix\-oldfile.ps\fR), which will have the same contents as the input
369 file but serve as suitable input for \fBpkfix\fR:
370 .PP
371 .Vb 10
372 \& $ pkfix\-helper oldfile.ps pkfix\-oldfile.ps
373 \& Reading oldfile.ps ... done.
374 \& Number of Type 3 fonts encountered: 10
375 \& Bitmapped fonts are typeset at 600 DPI.
376 \& Finding character widths ... done.
377 \& Reading TFM files ... done (103 TFMs in 193 scaling variations).
378 \& Matching fonts:
379 \& Processing Fi ... done (cmr10 @ 1X, mismatch=0.11683).
380 \& Processing Fa ... done (cmti10 @ 1X, mismatch=0.08892).
381 \& Processing Fb ... done (cmr8 @ 1X, mismatch=0.07133).
382 \& Processing Ff ... done (cmbx12 @ 1.2X, mismatch=0.02948).
383 \& Processing Fh ... done (cmtt10 @ 1X, mismatch=0.06895).
384 \& Processing Fd ... done (cmmi10 @ 1X, mismatch=0.03966).
385 \& Processing Fj ... done (cmbx12 @ 1X, mismatch=0.03972).
386 \& Processing Fe ... done (cmbx10 @ 1X, mismatch=0.00762).
387 \& Processing Fg ... done (cmsy10 @ 1X, mismatch=0.00875).
388 \& Processing Fc ... done (cmr6 @ 1X, mismatch=0.00284).
389 \&
390 \& $ pkfix pkfix\-oldfile.ps newfile.ps
391 \& PKFIX 1.3, 2005/02/25 \- Copyright (c) 2001, 2005 by Heiko Oberdiek.
392 \& *** Font conversion: \`cmti10\*(Aq \-> \`CMTI10\*(Aq.
393 \& *** Font conversion: \`cmr8\*(Aq \-> \`CMR8\*(Aq.
394 \& *** Font conversion: \`cmr6\*(Aq \-> \`CMR6\*(Aq.
395 \& *** Font conversion: \`cmmi10\*(Aq \-> \`CMMI10\*(Aq.
396 \& *** Font conversion: \`cmbx10\*(Aq \-> \`CMBX10\*(Aq.
397 \& *** Font conversion: \`cmbx12\*(Aq \-> \`CMBX12\*(Aq.
398 \& *** Font conversion: \`cmsy10\*(Aq \-> \`CMSY10\*(Aq.
399 \& *** Font conversion: \`cmtt10\*(Aq \-> \`CMTT10\*(Aq.
400 \& *** Font conversion: \`cmr10\*(Aq \-> \`CMR10\*(Aq.
401 \& *** Font conversion: \`cmbx12\*(Aq \-> \`CMBX12\*(Aq.
402 \& *** Merging font \`CMBX12\*(Aq (2).
403 \& ==> 10 converted fonts.
404 \& ==> 1 merged font.
405 .Ve
406 .PP
407 Although \fBpkfix-helper\fR tries to automate as much as possible the
408 font-detection process, some fonts will invariably be incorrectly
409 identified. The program outputs a warning message if it \fIknows\fR a
410 match is bad but the lack of a warning message does not necessarily
411 indicate that \fBpkfix-helper\fR did a good job. It is therefore
412 strongly recommended that the user produce \*(L"before\*(R" and \*(L"after\*(R" font
413 sheets:
414 .PP
415 .Vb 2
416 \& $ pkfix\-helper \-q oldfile.ps pkfix\-oldfile.ps \e
417 \& \-\-ps=oldfonts.ps \-\-tex=newfonts.tex
418 \&
419 \& $ tex newfonts.tex
420 \& This is TeX, Version 3.14159 (Web2C 7.4.5)
421 \& (./newfonts.tex [1] )
422 \& Output written on newfonts.dvi (1 page, 1292 bytes).
423 \& Transcript written on newfonts.log.
424 \&
425 \& $ dvips newfonts.dvi \-o newfonts.ps
426 \& This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
427 \& \*(Aq TeX output 2006.06.11:1636\*(Aq \-> newfonts.ps
428 \& <texc.pro><8r.enc><texps.pro>. <cmr6.pfb><cmsy10.pfb><cmbx10.pfb><cmbx12.pfb>
429 \& <cmmi10.pfb><cmtt10.pfb><cmr8.pfb><cmti10.pfb><cmr10.pfb>[1]
430 .Ve
431 .PP
432 After running the preceding commands, \fIoldfonts.ps\fR shows samples of
433 the fonts in \fIoldfile.ps\fR and \fInewfonts.ps\fR shows samples of the
434 replacement fonts that \fBpkfix-helper\fR used to produce
435 \&\fIpkfix\-oldfile.ps\fR. Print \fIoldfonts.ps\fR and \fInewfonts.ps\fR and
436 compare them carefully for incorrect fonts and sizes.
437 .PP
438 Suppose that the choice of \f(CW\*(C`cmbx12 @ 1.2X\*(C'\fR for font \f(CW\*(C`Ff\*(C'\fR looks
439 wrong; say the characters look taller in \fIoldfonts.ps\fR than in
440 \&\fInewfonts.ps\fR. This is where the trial-and-error stage begins.
441 Let's hypothesize that \f(CW\*(C`cmb12\*(C'\fR is a better match than \f(CW\*(C`cmbx12\*(C'\fR but
442 we don't know how much to scale the font. Fortunately,
443 \&\fBpkfix-helper\fR allows \f(CW\*(C`*\*(C'\fR to be used as a scaling factor to tell the
444 program to automatically detect an optimal scaling factor, even if
445 doing so means choosing a nonstandard font size:
446 .PP
447 .Vb 7
448 \& $ pkfix\-helper oldfile.ps pkfix\-oldfile.ps \-\-force="Ff=cmb12 @ *"
449 \& Reading oldfile.ps ... done.
450 \& Number of Type 3 fonts encountered: 10
451 \& Bitmapped fonts are typeset at 600 DPI.
452 \& Finding character widths ... done.
453 \& Reading TFM files ... failed.
454 \& pkfix\-helper: Unable to process user\-specified TFM file "cmb12"
455 .Ve
456 .PP
457 Oops, it looks like we don't have a \fIcmb12.tfm\fR file on our system.
458 Let's try scaling up \fIcmb10.tfm\fR instead:
459 .PP
460 .Vb 10
461 \& $ pkfix\-helper oldfile.ps pkfix\-oldfile.ps \-\-force="Ff=cmb10 @ *"
462 \& Reading oldfile.ps ... done.
463 \& Number of Type 3 fonts encountered: 10
464 \& Bitmapped fonts are typeset at 600 DPI.
465 \& Finding character widths ... done.
466 \& Reading TFM files ... done (103 TFMs in 193 scaling variations).
467 \& Matching fonts:
468 \& Processing Fi ... done (cmr10 @ 1X, mismatch=0.11683).
469 \& Processing Fa ... done (cmti10 @ 1X, mismatch=0.08892).
470 \& Processing Fb ... done (cmr8 @ 1X, mismatch=0.07133).
471 \& Processing Ff ... done (cmb10 @ 1.5X, mismatch=0.00035).
472 \& Processing Fh ... done (cmtt10 @ 1X, mismatch=0.06895).
473 \& Processing Fd ... done (cmmi10 @ 1X, mismatch=0.03966).
474 \& Processing Fj ... done (cmbx12 @ 1X, mismatch=0.03972).
475 \& Processing Fe ... done (cmbx10 @ 1X, mismatch=0.00762).
476 \& Processing Fg ... done (cmsy10 @ 1X, mismatch=0.00875).
477 \& Processing Fc ... done (cmr6 @ 1X, mismatch=0.00284).
478 .Ve
479 .PP
480 The match has definitely improved, although 15\ pt. is certainly an
481 odd size for a font. Then again, many documents \fIdo\fR use nonstandard
482 sizes so this may in fact be correct. The best way to verify is once
483 again to produce, print, and compare a pair of font samples and
484 iterate until all of the fonts look correct. Use one instance of
485 \&\fB\-\-force\fR for each font you want to alter.
486 .SH "ENVIRONMENT"
487 .IX Header "ENVIRONMENT"
488 \&\fBpkfix-helper\fR honors the following environment variables:
489 .IP "\s-1GS\s0" 8
490 .IX Item "GS"
491 The name of the Ghostscript interpreter (default: \fIgs\fR)
492 .IP "\s-1TFTOPL\s0" 8
493 .IX Item "TFTOPL"
494 The name of a utility for converting \fI.tfm\fR files to \fI.pl\fR files
495 (default: \fItftopl\fR)
496 .SH "RESTRICTIONS"
497 .IX Header "RESTRICTIONS"
498 \&\fBpkfix-helper\fR works only with PostScript files produced by \fBdvips\fR,
499 not with arbitrary PostScript files. Only bitmapped fonts loaded by
500 \&\fBdvips\fR can be analyzed, not bitmapped fonts loaded by embedded
501 graphics.
502 .PP
503 \&\fBpkfix-helper\fR works by comparing character widths, not the actual
504 glyphs. Consequently, it is misled by sets of fonts with similar
505 character widths (at least for those characters used by a given
506 document). As an extreme example, all Computer Modern Teletype fonts
507 of a given design size (e.g., \f(CW\*(C`cmtt10\*(C'\fR, \f(CW\*(C`cmsltt10\*(C'\fR, and \f(CW\*(C`cmitt10\*(C'\fR)
508 use exactly the same widths for all characters. Human assistance is
509 generally needed to guide \fBpkfix-helper\fR's font-matching procedures,
510 especially for fonts for which relatively few characters appear in the
511 document.
512 .PP
513 There is an astonishing variety of \fBdvips\fR output. Different
514 versions of the program and different command-line options can result
515 in PostScript files with a completely different structure.
516 \&\fBpkfix-helper\fR works hard to find font information buried in numerous
517 output-file variants, but it is not uncommon for a PostScript file
518 produced by a sufficiently old version of \fBdvips\fR or with
519 sufficiently obscure command-line options to utterly confuse
520 \&\fBpkfix-helper\fR. In this case, please send your problematic
521 PostScript files to the author of \fBpkfix-helper\fR (see \*(L"\s-1AUTHOR\*(R"\s0
522 below), who may be able to enhance \fBpkfix-helper\fR to handle them.
523 .SH "NOTES"
524 .IX Header "NOTES"
525 Files produced using the \fB\-\-tex\fR option are Plain TeX files and
526 therefore must be compiled with \fBtex\fR (or a variant such as
527 \&\fBpdftex\fR, \fBluatex\fR, \fBxetex\fR, etc.), \fInot\fR with \fBlatex\fR.
528 .PP
529 \&\fBdvips\fR\-produced PostScript files can be structured in sections,
530 demarcated by \f(CW%DVIPSBeginSection\fR and \f(CW%DVIPSEndSection\fR. Font
531 names are local to a section. Hence, a font named \f(CW\*(C`Fa\*(C'\fR may map to
532 \&\f(CW\*(C`cmex10\*(C'\fR in one section and to \f(CW\*(C`cmmi7\*(C'\fR in another. \fBpkfix-helper\fR
533 assigns every font in a multi-section document a unique name by
534 appending a section-number suffix: \f(CW\*(C`Fa_S01\*(C'\fR, \f(CW\*(C`Fa_S02\*(C'\fR, etc.
535 .PP
536 Font names are processed in decreasing order of the number of
537 characters they have represented in the document. That is, if the
538 document includes 10 characters from \f(CW\*(C`Fa\*(C'\fR and 23 characters from
539 \&\f(CW\*(C`Fb\*(C'\fR, \fBpkfix-helper\fR will process \f(CW\*(C`Fb\*(C'\fR before \f(CW\*(C`Fa\*(C'\fR.
540 .SH "SEE ALSO"
541 .IX Header "SEE ALSO"
542 \&\fBpkfix\fR\|(1), \fBdvips\fR\|(1), \fBtex\fR\|(1), \fBgs\fR\|(1)
543 .PP
544 PostScript Language Reference, Third Edition.
545 Published by Addison-Wesley, \s-1ISBN 0\-201\-37922\-8,\s0
546 <http://www.adobe.com/products/postscript/pdfs/PLRM.pdf>.
547 .SH "AUTHOR"
548 .IX Header "AUTHOR"
549 Scott Pakin, \[email protected]\fR
550 .SH "COPYRIGHT AND LICENSE"
551 .IX Header "COPYRIGHT AND LICENSE"
552 Copyright (C) 2009\-2020, Scott Pakin
553 .PP
554 This file may be distributed and/or modified under the conditions of
555 the LaTeX Project Public License, either version 1.3c of this license
556 or (at your option) any later version. The latest version of this
557 license is in <http://www.latex\-project.org/lppl.txt> and version
558 1.3c or later is part of all distributions of LaTeX version 2006/05/20
559 or later.