Debian Codegraph @

texmf-dist/tex/fontinst/base/xfntinst.sty

raw
1 %%
2 %% This is file `xfntinst.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% fibasics.dtx (with options: `pkg')
8 %% ficommon.dtx (with options: `pkg')
9 %% fimain.dtx (with options: `pkg')
10 %% fitrig.dtx (with options: `pkg')
11 %% ficonv.dtx (with options: `pkg')
12 %% filtfam.dtx (with options: `pkg,textcomp,debug,oldstyle')
13 %% fimapgen.dtx (with options: `pkg')
14 %% fibasics.dtx (with options: `pkg2')
15 %%
16 %% This is a generated file.
17 %%
18 %% Copyright 1993, 1994, 1995, 1996 Alan Jeffrey,
19 %% hacked and maintained 1997, 1998 Sebastian Rahtz,
20 %% copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 the fontinst
21 %% maintenance team and any individual authors listed elsewhere in
22 %% this file. All rights reserved.
23 %%
24 %% This file is part of the fontinst system version 1.9.
25 %% -----------------------------------------------------
26 %%
27 %% It may be distributed under the terms of the LaTeX Project Public
28 %% License, as described in lppl.txt in the base LaTeX distribution.
29 %% Either version 1.1 or, at your option, any later version.
30 %%
31 %%% From file: fibasics.dtx
32 \catcode`\{=1
33 \catcode`\}=2
34 \catcode`\#=6
35 \catcode`\^=7
36 \def\fontinstversion{1.933}
37 \ifx\ProvidesPackage\undefined
38 \def\NeedsTeXFormat#1{}
39 \def\ProvidesPackage#1[#2]{}
40 \fi
41 \ProvidesPackage{fontinst}
42 [2007/01/23 v\fontinstversion\space
43 fontinst installation package]
44 \def\a_macro#1{\catcode\number`#1=\the\catcode`#1 }
45 \edef\normalcc{%
46 \a_macro{\ }\a_macro{\^^M}\a_macro{\@}\a_macro{\_}\a_macro{\~}
47 }
48 \def\fontinstcc{%
49 \catcode`\ =9%
50 \catcode`\^^M=9%
51 \catcode`\@=11%
52 \catcode`\_=11%
53 \catcode`\~=10
54 }
55 \fontinstcc
56 \ifx\@ne\undefined_command
57 \input fontinst.ini\relax
58 \fi
59 \ifx\bye\undefined_command
60 \def\supereject{\par\penalty-\@MM}
61 \outer\expandafter\def \csname bye\endcsname
62 {\par\vfill\supereject\@@end}
63 \fi
64 \newcount\a_count
65 \newcount\b_count
66 \newcount\c_count
67 \newcount\d_count
68 \newcount\e_count
69 \newcount\f_count
70 \newcount\g_count
71 \newdimen\a_dimen
72 \newdimen\b_dimen
73 \newdimen\c_dimen
74 \newdimen\d_dimen
75 \newtoks\a_toks
76 \newtoks\b_toks
77 \newtoks\c_toks
78 \newif\if_a_
79 \newwrite\out_file
80 \mathchardef\one_thousand=1000
81 \mathchardef\five_hundred=500
82 \mathchardef\one_hundred=100
83 \mathchardef\max_mathchardef="7FFF
84 \mathchardef\two_thousand=2000
85 \newdimen\half_point \half_point=0.5pt
86 \def\x_cs#1#2{\expandafter#1\csname#2\endcsname}
87 \let\x_relax=\relax
88 \def\g_let{\global\let}
89 \def\empty_command{}
90 \def\gobble_one#1{}
91 \def\gobble_two#1#2{}
92 \def\gobble_three#1#2#3{}
93 \def\identity_one#1{#1}
94 \def\first_of_two#1#2{#1}
95 \def\second_of_two#1#2{#2}
96 \def\swap_two#1#2{#2#1}
97 \def\first_of_three#1#2#3{#1}
98 \bgroup
99 \catcode`\[=1
100 \catcode`\]=2
101 \catcode`\#=12
102 \catcode`\%=12
103 \catcode`\{=12
104 \catcode`\}=12
105 \gdef\hash_char[#]
106 \gdef\percent_char[%]
107 \gdef\left_brace_char[{]
108 \gdef\right_brace_char[}]
109 \egroup
110 \def\first_char#1#2={#1}
111 \def\add_to#1#2{
112 \ifx#1\x_relax
113 \def#1{#2}
114 \else
115 \expandafter\def\expandafter#1\expandafter{#1#2}
116 \fi
117 }
118 \def\prep_to#1#2{
119 \ifx#1\x_relax
120 \expandafter\def\expandafter#1\expandafter{\expandafter#2}
121 \else
122 \expandafter\def\expandafter#1\expandafter{\expandafter#2#1}
123 \fi
124 }
125 \def\never_do{\noexpand\do}
126 \newif\if_extensions_warning_
127 \_extensions_warning_false
128 \ifx \eTeXversion\undefined_command
129 \catcode`\~=14 % 14=comment
130 \fi
131 \def\eTeX#1{
132 \if_extensions_warning_
133 \space/\space e-TeX\space version\space #1
134 ~ \else
135 ~ \ifdim \number\eTeXversion\eTeXrevision\p@ < #1\p@ \else
136 ~ \_a_true
137 ~ \fi
138 \fi
139 }
140 \catcode`\~=10
141 \ifx \pdftexversion\undefined_command
142 \catcode`\~=14 % 14=comment
143 \fi
144 \def\pdfTeX#1#2{%
145 \if_extensions_warning_
146 \space/\space pdfTeX\space version\space
147 \ifnum #1<100\space
148 0.\ifnum #1<10\space 0\fi
149 \else
150 \expandafter\swap_two \expandafter.
151 \fi
152 #1#2%
153 ~ \else
154 ~ \ifdim #1>\pdftexversion \else
155 ~ \ifnum \expandafter\expandafter \expandafter`
156 ~ \expandafter\first_char \pdftexrevision= <
157 ~ \expandafter` \first_char#2=
158 ~ \else \_a_true \fi
159 ~ \fi
160 \fi
161 }
162 \catcode`\~=10
163 \def\needsTeXextension#1#2{
164 \_a_false
165 #1
166 \if_a_ \else
167 \_extensions_warning_true
168 \edef\a_macro{#1}
169 \_extensions_warning_false
170 \fontinstwarningnoline{#2}{
171 This~file~needs:\messagebreak
172 \expandafter\second_of_two\a_macro
173 \iffalse
174 <no~sufficient~extensions~were~listed!!>\if_false
175 \fi
176 \messagebreak
177 You~are~not~using~any~of~them.~This~is~likely~to~cause~errors
178 }
179 \fi
180 }
181 \def\open_out#1{
182 \immediate\openout\out_file=#1 \xdef\out_filename{#1}}
183 \def\close_out#1{
184 \immediate\write16{#1~written~on~\out_filename.}
185 \immediate\closeout\out_file}
186 \def\out_line#1{\immediate\write\out_file{#1}}
187 \edef\out_lline#1{\noexpand\out_line{\space\space\space#1}}
188 \edef\out_llline#1{
189 \noexpand\out_line{\space\space\space\space\space\space#1}
190 }
191 \def\TeX_terminal{\string\TeX\space terminal}
192 \chardef\closed_stream=99
193 \x_cs\let{out_filename-99}=\TeX_terminal
194 \x_cs\def{out_filename--1}{\jobname.log}
195 \def\allocate_stream{
196 \a_count=\m@ne
197 \b_count=\m@ne
198 \loop \ifnum \count17>\a_count
199 \advance \a_count \@ne
200 \x_cs\ifx{out_filename-\the\a_count}\TeX_terminal
201 \b_count=\a_count
202 \a_count=\count17
203 \fi
204 \repeat
205 \ifnum \b_count=\m@ne
206 \global\advance\count17by\@ne
207 \ifnum \count17<\sixt@@n
208 \b_count=\count17
209 \global\x_cs\let{out_filename-\the\b_count}\TeX_terminal
210 \wlog{\string\write\the\b_count\space allocated~to~the~pool.}
211 \else
212 \global\count17=\sixt@@n
213 \fi
214 \fi
215 }
216 \def\ch@ck#1#2#3{
217 \ifnum \count1#1<#2 \else
218 \errmessage{No~room~for~a~new~#3}
219 \global\count1#1=#2
220 \fi
221 }
222 \def\open_pout#1#2{
223 \allocate_stream
224 \ifnum \b_count=\m@ne
225 \immediate\write\sixt@@n{fontinst~is~out~of~output~streams.^^J
226 Output~file~#2~cannot~be~opened.^^J
227 Writes~will~be~redirected~to~the~log~file.
228 }
229 \gdef#1{\m@ne}
230 \else
231 \immediate\openout\b_count=#2\x_relax
232 \x_cs\xdef{out_filename-\the\b_count}{#2}
233 \global\chardef#1=\b_count
234 \fi
235 }
236 \def\close_pout#1#2{
237 \ifnum #1=\closed_stream
238 \errmessage{Output~file~\string#1~(#2)~not~closed,^^J
239 since~it~was~not~open}
240 \else
241 \immediate\write\sixt@@n{#2~written~on~
242 \csname out_filename-\the#1\endcsname.}
243 \ifnum #1=\m@ne \else
244 \immediate\closeout#1
245 \global\x_cs\let{out_filename-\the#1}=\TeX_terminal
246 \fi
247 \global\chardef#1=\closed_stream
248 \fi
249 }
250 \def\pout_line#1#2{\immediate\write#1{#2}}
251 \edef\pout_lline#1#2{\noexpand\pout_line#1{\space\space\space#2}}
252 \edef\pout_llline#1#2{
253 \noexpand\pout_line#1{\space\space\space\space\space\space#2}
254 }
255 \def\tempfileprefix#1{\def\temp_prefix{#1}}
256 \tempfileprefix{}
257 \let\then=\iffalse
258 \def\if_false{\iffalse}
259 \def\if_true{\iftrue}
260 \_a_false\eTeX{2.0}
261 \if_a_\else \catcode`\~=14\x_relax \fi
262 ~ \def\if_defined#1\then{
263 ~ \if
264 ~ \ifcsname#1\endcsname
265 ~ \expandafter\ifx \csname#1\endcsname \x_relax
266 ~ 0
267 ~ \else
268 ~ 1
269 ~ \fi
270 ~ \else
271 ~ 0
272 ~ \fi
273 ~ 1
274 ~ }
275 ~ \def\if_undefined{\expandafter\unless\if_defined}
276 \catcode`\~=\if_a_ 14 \else 10 \fi \x_relax
277 ~ \def\if_defined#1\then{
278 ~ \expandafter\ifx \csname#1\endcsname\x_relax
279 ~ \expandafter\if_false
280 ~ \else
281 ~ \expandafter\if_true
282 ~ \fi
283 ~ }
284 ~ \def\if_undefined#1\then{
285 ~ \expandafter\ifx \csname#1\endcsname\x_relax
286 ~ }
287 \catcode`\~=10\x_relax
288 \def\gobble_if{\iftrue\else}
289 \def\if_or#1\or_else#2\then{
290 #1\then
291 \expandafter\if_true
292 \else
293 #2\then
294 \expandafter\expandafter\expandafter\if_true
295 \else
296 \expandafter\expandafter\expandafter\if_false
297 \fi
298 \fi
299 }
300 \def\if_equal#1\then{\ifx#1}
301 \def\if_file_exists#1\then{
302 \immediate\openin1=#1\x_relax
303 \ifeof1\x_relax
304 \immediate\closein1
305 \expandafter\if_false
306 \else
307 \immediate\closein1
308 \expandafter\if_true
309 \fi
310 }
311 \let\Else=\else
312 \let\Fi=\fi
313 \x_cs\ifx{@@input}\x_relax
314 \let\primitiveinput=\input
315 \else
316 \let\primitiveinput=\@@input
317 \fi
318 \def\process_csep_list#1#2,{
319 \ifx\process_csep_list#2
320 \expandafter\gobble_one
321 \else
322 \expandafter\identity_one
323 \fi{
324 #1{#2}
325 \process_csep_list{#1}
326 }
327 }
328 \def\make_factor#1{
329 \ifnum #1<\z@
330 -\expandafter\make_factor_i\expandafter{\number-#1}
331 \else
332 \expandafter\make_factor_i\expandafter{\number#1}
333 \fi
334 }
335 \def\make_factor_i#1{
336 \ifnum #1<\one_thousand
337 \make_factor_ii{#1}
338 \else
339 \make_factor_iii #1
340 \fi
341 #1
342 }
343 \def\make_factor_ii#1{
344 0.
345 \ifnum #1<\one_hundred
346 0
347 \ifnum #1<10~ 0\fi
348 \fi
349 }
350 \def\make_factor_iii#1#2#3\fi#4{
351 \fi
352 #4
353 \ifnum 1#3<\one_thousand
354 .
355 \else
356 \make_factor_iii#2#3
357 \fi
358 }
359 {
360 \catcode`\p=12
361 \catcode`\t=12
362 \gdef\lose_measure#1pt{#1}
363 }
364 \def\format_hex_i#1#2{
365 \if #2i \else
366 \b_count=\a_count
367 \divide \a_count \sixt@@n
368 \c_count=\a_count
369 \multiply \c_count \sixt@@n
370 \advance \b_count -\c_count
371 \edef#1{
372 \ifcase\b_count 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
373 9\or a\or b\or c\or d\or e\or f\fi
374 #1
375 }
376 \expandafter\format_hex_i \expandafter#1
377 \fi
378 }
379 \def\format_hex#1#2#3{
380 \a_count=#2
381 \let#1\empty_command
382 \expandafter\format_hex_i \expandafter#1 \romannumeral
383 \expandafter\identity_one\expandafter{\number#3}001~
384 }
385 \let\messagebreak\x_relax
386 \def\generic_info#1#2{
387 \begingroup
388 \def\messagebreak{^^J#1}
389 \immediate\write\m@ne{#2\on_line.}
390 \endgroup
391 }
392 \def\generic_warning#1#2{
393 \begingroup
394 \def\messagebreak{^^J#1}
395 \immediate\write\closed_stream{^^J#2\on_line.^^J}
396 \endgroup
397 }
398 \def\generic_error#1#2#3#4{
399 \begingroup
400 \immediate\write\closed_stream{}
401 \def\messagebreak{^^J}
402 \edef\a_macro{{#4}}
403 \errhelp\a_macro
404 \def\messagebreak{^^J#1}
405 \errmessage{#2.^^J^^J#3
406 Type~\space H~<return>~\space for~immediate~help
407 }
408 \endgroup
409 }
410 \def\fontinsterror#1#2#3{
411 \generic_error{
412 \four_spaces\four_spaces
413 }{
414 #1~error:\messagebreak #2
415 }{
416 }{#3}
417 }
418 \def\fontinstwarning#1#2{
419 \generic_warning{
420 \four_spaces\four_spaces
421 }{
422 #1~warning:\messagebreak #2
423 }
424 }
425 \def\fontinstwarningnoline#1#2{
426 \fontinstwarning{#1}{#2\gobble_one}
427 }
428 \def\fontinstinfo#1#2{
429 \generic_info{
430 \four_spaces\four_spaces
431 }{
432 #1~info:\messagebreak #2
433 }
434 }
435 \def\on_line{~on~input~line~\the\inputlineno}
436 \edef\four_spaces{\space\space\space\space}
437 \gdef\error_help_a{
438 Your~command~was~ignored.\messagebreak
439 Type~\space I~<command>~<return>~\space to~replace~it~
440 with~another~command,\messagebreak
441 or~\space <return>~\space to~continue~without~it.}
442 \gdef\error_help_c{
443 Try~typing~\space <return>~
444 \space to~proceed.\messagebreak
445 If~that~doesn't~work,~type~\space X~<return>~\space to~quit.}
446 \gdef\error_help_d{
447 You're~in~trouble~here.~\space\error_help_c}
448 \def\error_help_e#1{You~can~continue,~but~the~#1~wrong.}
449 \newlinechar=`\^^J
450 \errorcontextlines=999
451 \tracinglostchars=1
452 %%% From file: ficommon.dtx
453 \def\str#1{\csname~s-#1\endcsname}
454 \def\strint#1{\expandafter\identity_one\expandafter{\number\int{#1}}}
455 \newcount\result
456 \def\eval_expr#1{\global\result=#1\x_relax}
457 \def\eval_expr_to#1#2{\eval_expr{#2}#1=\result}
458 \def\g_eval_expr_to#1#2{\eval_expr{#2}\global#1=\result}
459 \def\add#1#2{
460 #1
461 \bgroup
462 \a_count=\result
463 \eval_expr{#2}
464 \global\advance \result \a_count
465 \egroup
466 }
467 \def\sub#1#2{
468 #1
469 \bgroup
470 \a_count=\result
471 \eval_expr{#2}
472 \advance \a_count -\result
473 \global\result=\a_count
474 \egroup
475 }
476 \def\int#1{\csname i-#1 \endcsname}
477 \def\neg#1{#1 \global\result=-\result}
478 \def\mul#1#2{
479 #1
480 \bgroup
481 \a_count=\result
482 \eval_expr{#2}
483 \global\multiply \result \a_count
484 \egroup
485 }
486 \def\div#1#2{
487 #1
488 \bgroup
489 \a_count=\result
490 \eval_expr{#2}
491 \divide \a_count \result
492 \global\result=\a_count
493 \egroup
494 }
495 \def\max#1#2{
496 #1
497 \bgroup
498 \a_count=\result
499 \eval_expr{#2}
500 \ifnum \a_count>\result \global\result=\a_count \fi
501 \egroup
502 }
503 \def\min#1#2{
504 #1
505 \bgroup
506 \a_count=\result
507 \eval_expr{#2}
508 \ifnum \a_count<\result \global\result=\a_count \fi
509 \egroup
510 }
511 \def\half#1{
512 #1\x_relax
513 \ifodd\result
514 \global\advance \result \@ne
515 \global\divide \result \tw@
516 \ifodd\result \global\advance \result \m@ne \fi
517 \else
518 \global\divide \result \tw@
519 \fi
520 }
521 \def\otherhalf#1{
522 #1\x_relax
523 \ifodd\result
524 \global\advance \result \@ne
525 \global\divide \result \tw@
526 \ifodd\result \else \global\advance \result \m@ne \fi
527 \else
528 \global\divide \result \tw@
529 \fi
530 }
531 \def\scale#1#2{
532 #1
533 \bgroup
534 \a_count=\result
535 \eval_expr{#2}
536 \global\multiply \result \a_count
537 \rounded_thousandths
538 \egroup
539 }
540 \def\rounded_thousandths{
541 \global\divide \result \five_hundred
542 \ifodd \result
543 \global\advance \result by \ifnum 0>\result - \fi 1
544 \fi
545 \global\divide \result \tw@
546 }
547 \def\l_rounded_thousandths#1{
548 \divide #1 \five_hundred
549 \ifodd #1
550 \advance #1 by \ifnum 0>#1 - \fi\@ne
551 \fi
552 \divide #1 \tw@
553 }
554 \def\l_inv_scale#1#2{
555 \multiply #1 \two_thousand
556 \divide #1 #2\x_relax
557 \ifodd#1 \advance #1 \ifnum 0>#1 - \fi\@ne \fi
558 \divide #1 \tw@
559 }
560 \def\ifnumber#1#2#3\then{
561 \eval_expr_to\a_count{#1}
562 \eval_expr{#3}
563 \ifnum \a_count#2\result
564 \expandafter\if_true
565 \else
566 \expandafter\if_false
567 \fi
568 }
569 \let\setsomething_global=\x_relax
570 \def\x_setint#1#2{
571 \x_cs\ifx{i-#1}\x_relax
572 \x_resetint{#1}{#2}
573 \fi
574 }
575 \let\setint=\x_setint
576 \def\x_setstr#1#2{
577 \x_cs\ifx{s-#1}\x_relax
578 \setsomething_global\x_cs\edef{s-#1}{#2}
579 \fi
580 }
581 \let\setstr=\x_setstr
582 \def\setdim#1#2{
583 \x_cs\ifx{d-#1}\x_relax
584 \a_dimen=#2\x_relax
585 \setsomething_global\x_cs\edef{d-#1}{\the\a_dimen}
586 \fi
587 }
588 \def\setcommand#1{
589 \ifx#1\undefined_command
590 \setsomething_global \expandafter\def \expandafter#1
591 \else
592 \expandafter\def \expandafter\a_macro
593 \fi
594 }
595 \def\x_resetint#1#2{
596 \eval_expr{#2}
597 \setsomething_global
598 \ifnum\result<\max_mathchardef
599 \ifnum 0>\result
600 \x_cs\edef{i-#1}{\the\result}
601 \else
602 \x_cs\mathchardef{i-#1}=\result
603 \fi
604 \else
605 \x_cs\edef{i-#1}{\the\result}
606 \fi
607 }
608 \let\resetint=\x_resetint
609 \def\resetstr#1#2{\setsomething_global\x_cs\edef{s-#1}{#2}}
610 \def\resetdim#1#2{
611 \a_dimen=#2
612 \setsomething_global\x_cs\edef{d-#1}{\the\a_dimen}
613 }
614 \def\resetcommand#1{\setsomething_global\def#1}
615 \def\dim#1{\csname~d-#1\endcsname}
616 \def\ifisint#1\then{\if_defined i-#1\then}
617 \def\ifisstr#1\then{\if_defined s-#1\then}
618 \def\ifisdim#1\then{\if_defined d-#1\then}
619 \def\ifiscommand#1\then{
620 \ifx#1\undefined_command
621 \expandafter\if_false
622 \else
623 \expandafter\if_true
624 \fi
625 }
626 \def\unsetint#1{\setsomething_global\x_cs\let{i-#1}\x_relax}
627 \def\unsetstr#1{\setsomething_global\x_cs\let{s-#1}\x_relax}
628 \def\unsetdim#1{\setsomething_global\x_cs\let{d-#1}\x_relax}
629 \def\unsetcommand#1{\setsomething_global\let#1=\undefined_command}
630 \def\offcommand#1{
631 \x_cs\ifx{saved-\string#1}\x_relax
632 \setsomething_global\x_cs\let{saved-\string#1}#1
633 \x_cs\ifx{off-\string#1}\x_relax
634 \generate_off_command{#1}
635 \else
636 \setsomething_global \expandafter\let \expandafter#1
637 \csname off-\string#1\endcsname
638 \fi
639 \fi
640 }
641 \def\oncommand#1{
642 \x_cs\ifx{saved-\string#1}\x_relax \else
643 \setsomething_global \expandafter\let \expandafter#1
644 \csname saved-\string#1\endcsname
645 \setsomething_global\x_cs\let{saved-\string#1}\x_relax
646 \fi
647 }
648 \def\generate_off_command#1{
649 \a_count=0
650 \let\next=\count_hashes
651 \expandafter\next\meaning#1~->\x_relax
652 \b_count=0
653 \a_toks={}
654 \loop \ifnum \b_count<\a_count
655 \advance \b_count 1
656 \a_toks=\expandafter{\the\expandafter\a_toks \expandafter####
657 \the\b_count}
658 \repeat
659 \setsomething_global \expandafter\def \expandafter#1 \the\a_toks {}
660 }
661 \def\count_hashes#1#2{
662 \if \hash_char#1
663 \advance \a_count 1
664 \else
665 \if -#1
666 \if >#2
667 \let\next=\gobble_to_xrelax
668 \fi\fi
669 \fi
670 \next#2
671 }
672 \def\gobble_to_xrelax#1\x_relax{}
673 \def\for(#1)#2#3#4{
674 \eval_expr_to\a_count{#2}
675 \x_resetint{#1}{\a_count}
676 \eval_expr{#4}
677 \ifnum 0=\result \else
678 \c_count=\result
679 \eval_expr_to\b_count{#3}
680 \setsomething_global\x_cs\edef{for-#1}{
681 \the\c_count \x_relax
682 \noexpand\ifnum \gobble_one\fi
683 \the\b_count \ifnum 0>\c_count > \else < \fi
684 }
685 \def\next##1##2##3\endfor(#1){##2\for_i{##1}{##3}}
686 \next{#1}
687 \fi
688 }
689 \def\for_i#1#2{
690 \setsomething_global\x_cs\def{body-#1}{#2}
691 \ifnum \b_count \ifnum0>\c_count >\else<\fi \a_count
692 \expandafter\gobble_two
693 \else
694 \csname body-#1 \expandafter\endcsname
695 \fi
696 \for_ii{#1}
697 }
698 \def\for_ii#1{
699 \a_count=\int{#1}
700 \advance \a_count \csname for-#1\endcsname \a_count
701 \expandafter\gobble_two
702 \else
703 \x_resetint{#1}\a_count
704 \csname body-#1 \expandafter\endcsname
705 \fi
706 \for_ii{#1}
707 }
708 \def\endfor(#1){}
709 \def\foreach(#1)#2{
710 \def\next##1\endfor(#1){
711 \setsomething_global\x_cs\def{body-#1}{##1}
712 \process_csep_list{\foreach_i{#1}}#2,\process_csep_list,
713 }
714 \next
715 }
716 \def\foreach_i#1#2{
717 \resetstr{#1}{#2}
718 \csname body-#1\endcsname
719 }
720 \let\comment=\gobble_one
721 \let\begincomment=\iffalse
722 \let\endcomment=\fi
723 %%% From file: fimain.dtx
724 \def\inputetx#1{
725 \edef\lowercase_file{\lowercase{
726 \edef\noexpand\lowercase_file{#1}}}
727 \lowercase_file
728 \slot_number=0
729 \def\relax{\let\relax=\x_relax\iffalse}
730 \let\encoding=\fi
731 \primitiveinput \lowercase_file.etx\x_relax
732 \let\relax=\x_relax
733 }
734 \let\encoding=\relax
735 \outer\def\endencoding{\endinput}
736 \def\setslot#1{\edef\slot_name{#1}\do_slot}
737 \def\endsetslot{\end_do_slot\advance\slot_number by 1\x_relax}
738 \let\do_slot\empty_command
739 \let\end_do_slot\empty_command
740 \newcount\slot_number
741 \def\nextslot#1{\eval_expr_to\slot_number{#1}}
742 \def\skipslots#1{\eval_expr{#1} \advance\slot_number by \result}
743 \def\setleftboundary#1{\edef\slot_name{#1}\do_boundary}
744 \let\endsetleftboundary\x_relax
745 \let\do_boundary\x_relax
746 \def\setrightboundary#1{
747 \makerightboundary{#1}
748 \advance \slot_number 1\x_relax
749 }
750 \let\ligature=\gobble_three
751 \def\Ligature{\ligature}
752 \def\oddligature#1#2#3#4{}
753 \let\nextlarger=\gobble_one
754 \let\usedas=\gobble_two
755 \let\makerightboundary=\gobble_one
756 \let\Unicode=\gobble_two
757 \let\charseq=\gobble_one
758 \let\varchar=\empty_command
759 \let\vartop=\gobble_one
760 \let\varmid=\gobble_one
761 \let\varbot=\gobble_one
762 \let\varrep=\gobble_one
763 \let\endvarchar=\empty_command
764 \let\useexamplefont=\gobble_one
765 \let\slotexample=\empty_command
766 \let\setslotcomment=\gobble_one
767 \let\resetslotcomment=\gobble_one
768 \let\unsetslotcomment=\empty_command
769 \def\setfontdimen#1#2{
770 \ifisint{#2}\then \setint{fontdimen(#1)}{\int{#2}} \fi
771 }
772 \let\label=\gobble_one
773 \newif\ifdirect \directtrue
774 \def\input_mtx_as_etx#1{
775 \def\setscaledrawglyph##1##2##3##4##5##6##7##8##9{
776 \nextslot{##5}
777 \setslot{##1}\endsetslot
778 }
779 \offcommand\setscalednotglyph
780 \let\setglyph=\gobble_glyph
781 \offcommand\setkern
782 \inputmtx{#1}
783 }
784 \def\inputmtx#1{
785 \def\relax{\let\relax=\x_relax\iffalse}
786 \let\metrics=\fi
787 \primitiveinput #1.mtx\x_relax
788 \let\relax=\x_relax
789 }
790 \let\metrics=\x_relax
791 \edef\endmetrics_text{\string\endmetrics}
792 \outer\def\endmetrics{\endinput}
793 \def\ProvidesMtxPackage#1{\x_cs\let{pack-#1}P}
794 \def\usemtxpackage{\futurelet\next_token\test_UseMtxPkg_arguments}
795 \def\test_UseMtxPkg_arguments{\ifx\next_token[
796 \expandafter\mtx_package_given_file
797 \else
798 \expandafter\mtx_package_separate_files
799 \fi
800 }
801 \def\mtx_package_given_file[#1]#2{
802 \_a_false
803 \process_csep_list\load_true_unless_loaded #2,\process_csep_list,
804 \if_a_ \inputmtx{#1} \fi
805 }
806 \def\load_true_unless_loaded#1{
807 \x_cs\ifx{pack-#1}P\else\_a_true\fi
808 }
809 \def\mtx_package_separate_files#1{
810 \process_csep_list\load_file_unless_loaded #1,\process_csep_list,
811 }
812 \def\load_file_unless_loaded#1{
813 \x_cs\ifx{pack-#1}P\else \inputmtx{#1} \fi
814 }
815 \let\glyph_name_modifier=\identity_one
816 \def\setkern#1#2#3{
817 \x_cs\ifx{i-rawscale}\x_relax
818 \expandafter\set_kern
819 \csname~r-\glyph_name_modifier{#1}\expandafter\endcsname
820 \csname~l-\glyph_name_modifier{#2}\endcsname
821 {#3}
822 \else
823 \expandafter\set_kern
824 \csname~r-\glyph_name_modifier{#1}\expandafter\endcsname
825 \csname~l-\glyph_name_modifier{#2}\endcsname
826 {\scale{#3}{\int{rawscale}}}
827 \fi
828 }
829 \def\set_kern#1#2#3{
830 \eval_expr{#3}
831 \expandafter\set_kern_cs\csname\the\result\endcsname#1#2
832 }
833 \def\set_kern_cs#1#2#3{
834 \add_to#2{\k#3#1}
835 \add_to#3{\k#2#1}
836 }
837 \def\resetkern#1#2#3{
838 \x_cs\ifx{i-rawscale}\x_relax
839 \expandafter\reset_kern
840 \csname~r-#1\expandafter\endcsname
841 \csname~l-#2\endcsname{#3}
842 \else
843 \expandafter\reset_kern
844 \csname~r-#1\expandafter\endcsname
845 \csname~l-#2\endcsname{\scale{#3}{\int{rawscale}}}
846 \fi
847 }
848 \def\reset_kern#1#2#3{
849 \eval_expr{#3}
850 \expandafter\reset_kern_cs\csname\the\result\endcsname#1#2
851 }
852 \def\reset_kern_cs#1#2#3{
853 \prep_to#2{\k\expandafter#3\expandafter#1}
854 \prep_to#3{\k\expandafter#2\expandafter#1}
855 }
856 \def\setleftkerning#1#2#3{
857 \eval_expr_to\b_count{#3}
858 \expandafter\set_kerning
859 \csname~l-#1\expandafter\endcsname
860 \csname~l-#2\endcsname
861 }
862 \def\setrightkerning#1#2#3{
863 \eval_expr_to\b_count{#3}
864 \expandafter\set_kerning
865 \csname~r-#1\expandafter\endcsname
866 \csname~r-#2\endcsname
867 }
868 \def\setleftrightkerning#1#2#3{
869 \eval_expr_to\b_count{#3}
870 \expandafter\set_kerning
871 \csname~l-#1\expandafter\endcsname
872 \csname~l-#2\endcsname
873 \expandafter\set_kerning
874 \csname~r-#1\expandafter\endcsname
875 \csname~r-#2\endcsname
876 }
877 \def\set_kerning#1#2{
878 \if\b_count=\one_thousand
879 \def\k##1##2{
880 \set_kern_cs##2##1#1
881 }
882 \else
883 \def\k##1##2{
884 \set_kern##1#1{
885 \scale\b_count{\expandafter\gobble_one\string##2}
886 }
887 }
888 \fi
889 #2
890 }
891 \def\kerning#1#2{0\x_relax
892 \def\k##1{\csname~set-\string##1\endcsname\gobble_one}
893 \bgroup
894 \x_cs\def{set-\string\l-#2}##1##2{
895 \global\result=\expandafter\gobble_one\string##2\egroup
896 }
897 \csname~r-#1\endcsname
898 \csname~set-\string\l-#2\endcsname\gobble_one{00}
899 }
900 \def\ifiskern#1#2\then{
901 \def\k##1##2{\ifx T##1 \let\k\gobble_two \fi}
902 \bgroup
903 \x_cs\let{l-#2}T
904 \csname r-#1\endcsname
905 \expandafter\egroup \ifx\k\gobble_two
906 }
907 \def\unsetkerns#1#2{
908 \let\k\k_unless_to_U
909 \process_csep_list\make_slots_U#1,\process_csep_list,
910 \def\do##1{\x_cs\main_remove_Us{l-##1}}
911 \process_csep_list\do#2,\process_csep_list,
912 \process_csep_list\make_slots_relax#1,\process_csep_list,
913 \process_csep_list\make_slots_U#2,\process_csep_list,
914 \def\do##1{\x_cs\main_remove_Us{r-##1}}
915 \process_csep_list\do#1,\process_csep_list,
916 \process_csep_list\make_slots_relax#2,\process_csep_list,
917 }
918 \def\make_slots_U#1{\x_cs\let{slots-#1}U}
919 \def\make_slots_relax#1{\x_cs\let{slots-#1}\x_relax}
920 \def\k_unless_to_U#1#2{
921 \x_cs\ifx{slots-\expandafter\gobble_three\string#1}U \else
922 \noexpand\k\noexpand#1\noexpand#2
923 \fi
924 }
925 \def\main_remove_Us#1{
926 \ifx#1\x_relax \else
927 \edef#1{#1}
928 \ifx#1\empty_command \let#1\x_relax \fi
929 \fi
930 }
931 \def\noleftkerning#1{\no_kerning{l}{#1}}
932 \def\norightkerning#1{\no_kerning{r}{#1}}
933 \def\noleftrightkerning#1{\no_kerning{l}{#1}\no_kerning{r}{#1}}
934 \def\no_kerning#1#2{
935 \let\k\no_kerning_i
936 \def\do##1{\csname #1-##1\endcsname}
937 \bgroup
938 \aftergroup\def \aftergroup\a_macro \aftergroup{
939 \process_csep_list\do #2,\process_csep_list,
940 \aftergroup}
941 \egroup
942 \def\do##1{\expandafter\let \csname #1-##1\endcsname \x_relax}
943 \process_csep_list\do #2,\process_csep_list,
944 \let\k\no_kerning_ii
945 \def\do##1{\edef##1{##1}}
946 \a_macro
947 }
948 \def\no_kerning_i#1#2{
949 \ifx #1\x_relax \else
950 \aftergroup\do \aftergroup#1
951 \let #1\x_relax
952 \fi
953 }
954 \def\no_kerning_ii#1#2{
955 \ifx #1\x_relax \else \noexpand\k \noexpand#1 \noexpand#2 \fi
956 }
957 \def\width{\glyph_parameter\first_of_six}
958 \def\height{\glyph_parameter\second_of_six}
959 \def\depth{\glyph_parameter\third_of_six}
960 \def\italic{\glyph_parameter\fourth_of_six}
961 \def\mapcommands{\glyph_parameter\fifth_of_six}
962 \def\mapfonts{\glyph_parameter\sixth_of_six}
963 \def\glyph_parameter#1#2{
964 \expandafter\expandafter\expandafter
965 #1\csname g-#2\endcsname
966 }
967 \def\first_of_six#1#2#3#4#5#6{#1}
968 \def\second_of_six#1#2#3#4#5#6{#2}
969 \def\third_of_six#1#2#3#4#5#6{#3}
970 \def\fourth_of_six#1#2#3#4#5#6{#4}
971 \def\fifth_of_six#1#2#3#4#5#6{#5}
972 \def\sixth_of_six#1#2#3#4#5#6{#6}
973 \def\glyph_metrics#1#2#3#4#5#6{
974 \a_count=#1
975 \b_count=#2
976 \c_count=#3
977 \d_count=#4~
978 }
979 \let\saved_scale\x_relax
980 \let\saved_mapfont\x_relax
981 \let\saved_raw\x_relax
982 \let\saved_rule\x_relax
983 \let\saved_special\x_relax
984 \let\saved_warning\x_relax
985 \let\saved_movert\x_relax
986 \let\saved_moveup\x_relax
987 \let\saved_push\x_relax
988 \let\saved_pop\x_relax
989 \newcount\glyph_width
990 \newcount\glyph_height
991 \newcount\glyph_depth
992 \newcount\glyph_italic
993 \newtoks\glyph_map_commands
994 \newtoks\glyph_map_fonts
995 \newcount\glyph_voffset
996 \newcount\glyph_maxhpos
997 \def\setglyph#1{
998 \ifisglyph{\glyph_name_modifier{#1}}\then
999 \expandafter\gobble_glyph
1000 \else
1001 \x_cs\def{g-\glyph_name_modifier{#1}}{
1002 {\the\glyph_width}{\the\glyph_height}
1003 {\the\glyph_depth}{\the\glyph_italic}
1004 {\the\glyph_map_commands}{\the\glyph_map_fonts}
1005 }
1006 \resetglyph{\glyph_name_modifier{#1}}
1007 \fi
1008 }
1009 \long\def\gobble_glyph#1\endsetglyph{}
1010 \def\resetglyph#1{
1011 \edef\glyphname{#1}
1012 \glyph_width=0
1013 \global\glyph_height=0
1014 \global\glyph_depth=0
1015 \global\glyph_italic=0
1016 \glyph_voffset=0
1017 \global\glyph_maxhpos=0
1018 \global\glyph_map_commands={}
1019 \global\glyph_map_fonts={}
1020 }
1021 \def\endsetglyph{
1022 \x_cs\edef{g-\glyphname}
1023 {{\the\glyph_width}{\the\glyph_height}
1024 {\the\glyph_depth}{\the\glyph_italic}
1025 {\the\glyph_map_commands}{\the\glyph_map_fonts}}
1026 }
1027 \let\endresetglyph=\endsetglyph
1028 \def\setrawglyph#1#2#3{
1029 \setscaledrawglyph{#1}{#2}{#3}\one_thousand
1030 }
1031 \def\setscaledrawglyph#1#2#3#4#5#6#7#8#9{
1032 \if_undefined{g-\glyph_name_modifier{#1}}\then
1033 \eval_expr{#4}
1034 \ifnum \result=\one_thousand
1035 \let\a_macro\identity_one
1036 \else
1037 \edef\a_macro##1{\saved_scale{\the\result}{##1}}
1038 \fi
1039 \eval_expr_to\a_count{#6}
1040 \eval_expr_to\b_count{#7}
1041 \eval_expr_to\c_count{#8}
1042 \eval_expr_to\d_count{#9}
1043 \ifisint{rawscale}\then
1044 \e_count=\int{rawscale}
1045 \multiply \a_count \e_count \l_rounded_thousandths\a_count
1046 \multiply \b_count \e_count \l_rounded_thousandths\b_count
1047 \multiply \c_count \e_count \l_rounded_thousandths\c_count
1048 \multiply \d_count \e_count \l_rounded_thousandths\d_count
1049 \edef\a_macro##1{\saved_scale{\the\e_count}{\a_macro{##1}}}
1050 \fi
1051 \x_cs\edef{g-\glyph_name_modifier{#1}}{
1052 {\the\a_count}
1053 {\the\b_count}
1054 {\the\c_count}
1055 {\the\d_count}
1056 {\a_macro{\saved_raw{#2}{#5}{#1}}}
1057 {\a_macro{\saved_mapfont{#2}{#3}}}
1058 }
1059 \fi
1060 }
1061 \def\setnotglyph#1#2#3{
1062 \setscalednotglyph{#1}{#2}{#3}\one_thousand
1063 }
1064 \def\setscalednotglyph#1#2#3#4#5#6#7#8#9{
1065 \if_undefined{g-\glyph_name_modifier{#1}-not}\then
1066 \eval_expr_to\a_count{#6}
1067 \eval_expr_to\b_count{#7}
1068 \eval_expr_to\c_count{#8}
1069 \eval_expr_to\d_count{#9}
1070 \ifisint{rawscale}\then
1071 \e_count=\int{rawscale}
1072 \multiply \a_count \e_count \l_rounded_thousandths\a_count
1073 \multiply \b_count \e_count \l_rounded_thousandths\b_count
1074 \multiply \c_count \e_count \l_rounded_thousandths\c_count
1075 \multiply \d_count \e_count \l_rounded_thousandths\d_count
1076 \fi
1077 \x_cs\edef{g-\glyph_name_modifier{#1}-not}{
1078 {\the\a_count}
1079 {\the\b_count}
1080 {\the\c_count}
1081 {\the\d_count}
1082 {}{}
1083 }
1084 \fi
1085 }
1086 \def\unsetglyph#1{\x_cs\let{g-#1}\x_relax}
1087 \def\glyph#1#2{
1088 \glyph_parameter\glyph_metrics{#1}
1089 \eval_expr_to\e_count{#2}
1090 \ifnum \e_count=\one_thousand
1091 \edef\a_macro{\mapcommands{#1}}
1092 \global\glyph_map_commands\expandafter{
1093 \the\expandafter\glyph_map_commands \a_macro
1094 }
1095 \edef\a_macro{\mapfonts{#1}}
1096 \else
1097 \multiply \a_count \e_count \l_rounded_thousandths\a_count
1098 \multiply \b_count \e_count \l_rounded_thousandths\b_count
1099 \multiply \c_count \e_count \l_rounded_thousandths\c_count
1100 \multiply \d_count \e_count \l_rounded_thousandths\d_count
1101 \edef\a_macro{\saved_scale{\the\e_count}{\mapcommands{#1}}}
1102 \global\glyph_map_commands\expandafter{
1103 \the\expandafter\glyph_map_commands \a_macro
1104 }
1105 \edef\a_macro{\saved_scale{\the\e_count}{\mapfonts{#1}}}
1106 \fi
1107 \advance \glyph_width \a_count
1108 \advance \b_count \glyph_voffset
1109 \ifnum \glyph_height<\b_count \global\glyph_height=\b_count \fi
1110 \advance \c_count -\glyph_voffset
1111 \ifnum \glyph_depth<\c_count \global\glyph_depth=\c_count \fi
1112 \global\glyph_italic=\d_count
1113 \global\glyph_map_fonts\expandafter{
1114 \the\expandafter\glyph_map_fonts \a_macro
1115 }
1116 }
1117 \def\glyphrule#1#2{
1118 \eval_expr_to\b_count{#1} \eval_expr_to\c_count{#2}
1119 \advance\glyph_width by \b_count
1120 \g_eval_expr_to\glyph_depth{\max\glyph_depth{-\glyph_voffset}}
1121 \g_eval_expr_to\glyph_height{
1122 \max\glyph_height{\add\glyph_voffset\c_count}
1123 }
1124 \global\glyph_italic=0
1125 \edef\a_macro{\saved_rule{\the\b_count}{\the\c_count}}
1126 \global\glyph_map_commands\expandafter{
1127 \the\expandafter\glyph_map_commands \a_macro
1128 }
1129 }
1130 \def\glyphspecial#1{
1131 \edef\a_macro{\saved_special{#1}}
1132 \global\glyph_map_commands\expandafter{
1133 \the\expandafter\glyph_map_commands \a_macro
1134 }
1135 }
1136 \def\glyphwarning#1{
1137 \edef\a_macro{\saved_warning{#1}}
1138 \global\glyph_map_commands\expandafter{
1139 \the\expandafter\glyph_map_commands \a_macro
1140 }
1141 }
1142 \def\movert#1{
1143 \eval_expr{#1}
1144 \ifnum \glyph_maxhpos<\glyph_width
1145 \global\glyph_maxhpos\glyph_width
1146 \fi
1147 \ifnum 0=\result \else
1148 \advance\glyph_width by \result
1149 \edef\a_macro{\saved_movert{\the\result}}
1150 \global\glyph_map_commands\expandafter{
1151 \the\expandafter\glyph_map_commands \a_macro
1152 }
1153 \fi
1154 }
1155 \def\moveup#1{
1156 \eval_expr{#1}
1157 \ifnum\result=0\else
1158 \advance\glyph_voffset by \result
1159 \edef\a_macro{\saved_moveup{\the\result}}
1160 \global\glyph_map_commands\expandafter{
1161 \the\expandafter\glyph_map_commands \a_macro
1162 }
1163 \fi
1164 }
1165 \def\push{
1166 \bgroup
1167 \global\glyph_map_commands\expandafter{
1168 \the\glyph_map_commands \saved_push
1169 }
1170 }
1171 \def\pop{
1172 \ifnum \glyph_maxhpos<\glyph_width
1173 \global\glyph_maxhpos\glyph_width
1174 \fi
1175 \egroup
1176 \global\glyph_map_commands\expandafter{
1177 \the\glyph_map_commands \saved_pop
1178 }
1179 }
1180 \def\resetwidth#1{\movert{\sub{#1}\glyph_width}}
1181 \def\resetheight{\g_eval_expr_to\glyph_height}
1182 \def\resetdepth{\g_eval_expr_to\glyph_depth}
1183 \def\resetitalic{\g_eval_expr_to\glyph_italic}
1184 \def\glyphpcc#1#2#3{
1185 \ifisglyph{\glyph_name_modifier{#1}}\then
1186 \push
1187 \movert{#2}
1188 \moveup{#3}
1189 \glyph{\glyph_name_modifier{#1}}{\one_thousand}
1190 \pop
1191 \else\ifisglyph{\glyph_name_modifier{#1}-not}\then
1192 \fontinstwarning{\string\glyphpcc}{
1193 Base~glyph~`\glyph_name_modifier{#1}'~not~appended,\messagebreak
1194 because~it~is~so~far~unencoded~in~the~glyph~base
1195 }
1196 \else
1197 \fontinsterror{\string\glyphpcc}{
1198 Base~glyph~not~set.\messagebreak
1199 This~could~be~a~sign~that~the~AFM~file~is~buggy
1200 }\error_help_a
1201 \fi\fi
1202 }
1203 \def\glyphbboxright{\max\glyph_width\glyph_maxhpos}
1204 \def\samesize#1{
1205 \if_undefined{g-\glyph_name_modifier{#1}}\then
1206 \resetwidth{\glyphbboxright}
1207 \else
1208 \expandafter\expandafter\expandafter
1209 \same_size\csname g-\glyph_name_modifier{#1}\endcsname
1210 \fi
1211 }
1212 \def\same_size#1#2#3#4#5#6{
1213 \movert{\sub{#1}\glyph_width}
1214 \global\glyph_height=#2
1215 \global\glyph_depth=#3
1216 \global\glyph_italic=#4
1217 }
1218 \def\ifisglyph#1\then{\if_defined{g-#1}\then}
1219 \def\ifareglyphs#1\then{
1220 \process_csep_list{\if_is_glyph}#1,\process_csep_list,
1221 \if_true
1222 }
1223 \def\if_is_glyph#1{
1224 \if_undefined{g-#1}\then \expandafter\if_false \fi
1225 }
1226 \def\etxtovpl#1#2{{
1227 \def\vpl_extension{vpl}
1228 \def\vpl_title{COMMENT}
1229 \def\vpl_font{virtual~font}
1230 \def\vpl_Font{Virtual~font}
1231 \def\vpl_call{\string\etxtovpl{#1}{#2}}
1232 \def\vpl_to_vf##1{vptovf~##1.vpl~##1.vf~##1.tfm}
1233 \a_toks={}
1234 \process_csep_list\make_inputetx #1,\process_csep_list,
1235 \expandafter\etx_to_font \expandafter{\the\a_toks}{#2}
1236 }}
1237 \def\etxtopl#1#2{{
1238 \def\vpl_extension{pl}
1239 \def\vpl_title{COMMENT}
1240 \def\vpl_font{font}
1241 \def\vpl_Font{Font}
1242 \def\vpl_call{\string\etxtopl{#1}{#2}}
1243 \def\vpl_to_vf##1{pltotf~##1.pl~##1.tfm}
1244 \_including_map_false
1245 \global\rawfont_scaling=-\p@
1246 \a_toks={}
1247 \process_csep_list\make_inputetx #1,\process_csep_list,
1248 \expandafter\etx_to_font \expandafter{\the\a_toks}{#2}
1249 }}
1250 \newif\if_including_map_
1251 \_including_map_true
1252 \def\make_inputetx#1{
1253 \def\a_macro{\noexpand\inputetx{\file_name}}
1254 \get_file_name #1~{}~\par
1255 \edef\a_macro{\a_macro}
1256 \a_toks=\expandafter{ \the\expandafter\a_toks \a_macro}
1257 }
1258 \x_cs\def{IFKW-mtxasetx}{
1259 \def\a_macro{\noexpand\input_mtx_as_etx{\file_name}}
1260 \get_keyword
1261 }
1262 \def\etx_to_font#1#2{
1263 \make_assignments{#1}
1264 \open_out{#2.\vpl_extension}
1265 \top_of_pl_hook
1266 \out_line{(\vpl_title\space\vpl_font\space
1267 #2~created~by~fontinst~v\fontinstversion)}
1268 \out_line{}
1269 \out_line{(COMMENT~Filename:~#2.\vpl_extension)}
1270 \out_line{(COMMENT~Created~by:~tex~\jobname)}
1271 \out_line{(COMMENT~Created~using:~\vpl_call)}
1272 \out_line{}
1273 \out_line{(COMMENT~This~file~can~be~turned~into~a~\vpl_font\space
1274 with)}
1275 \out_line{(COMMENT~\vpl_to_vf{#2})}
1276 \out_line{}
1277 \out_line{(COMMENT~THIS~FILE~CAN~THEN~BE~DELETED.)}
1278 \out_line{}
1279 \make_header{#1}
1280 \if_including_map_ \make_mapfonts{#1} \fi
1281 \make_fontdimens{#1}
1282 \make_ligtable{#1}
1283 \make_characters{#1}
1284 \make_tidy{#1}
1285 \out_line{}
1286 \out_line{(COMMENT~END~OF~FILE~#2.\vpl_extension)}
1287 \close_out{\vpl_Font}
1288 }
1289 \let\pre_first_etx_pass_hook\x_relax
1290 \let\pre_second_etx_pass_hook\x_relax
1291 \let\pre_third_etx_pass_hook\x_relax
1292 \let\pre_fourth_etx_pass_hook\x_relax
1293 \let\post_first_etx_pass_hook\x_relax
1294 \let\post_second_etx_pass_hook\x_relax
1295 \let\post_third_etx_pass_hook\x_relax
1296 \let\post_fourth_etx_pass_hook\x_relax
1297 \let\tidying_up_hook\x_relax
1298 \let\top_of_pl_hook\x_relax
1299 \def\make_assignments#1{
1300 \let\do_slot=\assign_slot
1301 \let\end_do_slot=\end_assign_slot
1302 \def\do_boundary{\bgroup
1303 \let\makerightboundary=\bad_makerightboundary
1304 }
1305 \let\endsetleftboundary=\egroup
1306 \let\makerightboundary=\assign_rboundary
1307 \pre_first_etx_pass_hook
1308 #1
1309 \post_first_etx_pass_hook
1310 \let\end_do_slot=\empty_command
1311 \let\do_boundary=\x_relax
1312 \let\endsetleftboundary=\x_relax
1313 \let\makerightboundary=\gobble_one
1314 }
1315 \def\assign_slot{\a_toks={\do}}
1316 \begingroup
1317 \catcode0=12
1318 \gdef\end_assign_slot{
1319 \ifisglyph\slot_name\then
1320 \lccode0=\slot_number
1321 \lowercase{
1322 \expandafter\add_to
1323 \csname slots-\slot_name\expandafter\endcsname
1324 \expandafter{\the\a_toks^^@}
1325 }
1326 \fi
1327 }
1328 \gdef\assign_rboundary#1{
1329 \lccode0=\slot_number
1330 \lowercase{\x_cs\add_to{slots-#1}{\rboundary_do^^@}}
1331 \x_setint{\percent_char boundarychar}\slot_number
1332 \a_toks={\rbserver_do}
1333 }
1334 \endgroup
1335 \def\bad_makerightboundary#1{
1336 \errhelp={The~left~boundary~is~not~a~slot,~so~it~cannot~serve~
1337 as~right~boundary.}
1338 \errmessage{Incorrect~use~of~\string\makerightboundary}
1339 }
1340 \def\get_slot_num#1{
1341 \global\result=-1
1342 \bgroup
1343 \def\do{\global\result=`}
1344 \let\rbserver_do=\do
1345 \let\rboundary_do=\gobble_one
1346 \csname slots-#1\endcsname
1347 \egroup
1348 }
1349 \def\ifisinslot#1#2\then{
1350 \ifx \makerightboundary\gobble_one
1351 \eval_expr{#2}
1352 \begingroup
1353 \def\do##1{\ifnum `##1=\result \let\do=\gobble_one \fi}
1354 \def\rbserver_do{\do}
1355 \let\rboundary_do=\gobble_one
1356 \csname slots-#1\endcsname
1357 \expandafter\endgroup
1358 \ifx \do\gobble_one
1359 \expandafter\expandafter \expandafter\if_true
1360 \else
1361 \expandafter\expandafter \expandafter\if_false
1362 \fi
1363 \else
1364 \expandafter\gobble_if
1365 \fi
1366 }
1367 \newdimen\mapfont_scaling
1368 \mapfont_scaling=1pt
1369 \newdimen\rawfont_scaling
1370 \def\vpl_real#1{R~\expandafter\lose_measure\the#1}
1371 \def\vpl_int#1{D~\the#1}
1372 \newdimen\side_bearings
1373 \newdimen\curr_bearings
1374 \def\make_header#1{
1375 \global\font_count=0
1376 \setdim{designsize}{10pt}
1377 \a_dimen=\dim{designsize}
1378 \out_line{(DESIGNSIZE~\vpl_real\a_dimen)}
1379 \x_setstr{codingscheme}{UNKNOWN}
1380 \out_line{(CODINGSCHEME~\str{codingscheme})}
1381 \ifisint{\percent_char boundarychar}\then
1382 \a_count=\int{\percent_char boundarychar}
1383 \out_line{(BOUNDARYCHAR~\vpl_int\a_count)}
1384 \fi
1385 \x_setint{letterspacing}{0}
1386 \side_bearings=\make_factor{\int{letterspacing}}\half_point
1387 \x_setint{minimumkern}{0}
1388 \minimum_kern=\int{minimumkern}
1389 \out_line{}
1390 }
1391 \def\make_mapfonts#1{
1392 \let\saved_scale\vpl_scale
1393 \let\saved_mapfont\vpl_mapfont
1394 \let\do_slot=\do_mapfont
1395 \pre_second_etx_pass_hook
1396 #1
1397 \post_second_etx_pass_hook
1398 \out_line{}
1399 }
1400 \def\do_mapfont{
1401 \ifisglyph\slot_name\then
1402 \mapfonts\slot_name
1403 \fi
1404 }
1405 \def\vpl_scale#1#2{{
1406 \mapfont_scaling=\make_factor{#1}\mapfont_scaling
1407 #2
1408 }}
1409 \def\vpl_mapfont#1#2{
1410 \a_dimen=#2
1411 \if_undefined{\the\mapfont_scaling-#1}\then
1412 \global\x_cs\mathchardef{\the\mapfont_scaling-#1}=\font_count
1413 \x_cs\xdef{f-\the\font_count}{\the\mapfont_scaling-#1}
1414 \out_line{(MAPFONT~\vpl_int\font_count\space
1415 (FONTNAME~#1)~
1416 (FONTDSIZE~\vpl_real\a_dimen)~
1417 (FONTAT~\vpl_real\mapfont_scaling))}
1418 \record_usage{#1}
1419 \global\advance\font_count by 1
1420 \fi
1421 }
1422 \def\pl_mapfont#1#2{\global\rawfont_scaling=\mapfont_scaling}
1423 \newcount\font_count
1424 \newcount\next_mapfont
1425 \newcount\prev_mapfont
1426 \def\make_fontdimens#1{
1427 \out_line{(FONTDIMEN}
1428 \a_count=1
1429 \loop\ifnum 256>\a_count
1430 \ifisint{fontdimen(\the\a_count)}\then
1431 \out_lline{(PARAMETER~\vpl_int\a_count\space
1432 R~\make_factor{\int{fontdimen(\the\a_count)}})}
1433 \fi
1434 \advance \a_count \@ne
1435 \repeat
1436 \out_lline{)}
1437 \out_line{}
1438 }
1439 \def\make_ligtable#1{
1440 \begingroup
1441 \out_line{(LIGTABLE}
1442 \let\do_slot=\bgroup
1443 \let\end_do_slot=\vpl_kerning
1444 \def\do_boundary{\bgroup \let\vpl_liglabel=\boundary_liglabel}
1445 \let\endsetleftboundary=\vpl_kerning
1446 \let\ligature=\vpl_ligature
1447 \let\k=\vpl_kern
1448 \let\rbserver_do=\vpl_rbserver_do
1449 \let\rboundary_do=\vpl_rboundary_do
1450 \pre_third_etx_pass_hook
1451 #1
1452 \post_third_etx_pass_hook
1453 \out_lline{)}
1454 \endgroup
1455 \out_line{}
1456 }
1457 \def\vpl_rbserver_do#1{
1458 \do{#1}
1459 \let\rboundary_do=\wrn_rboundary_do
1460 }
1461 \def\vpl_rboundary_do#1{
1462 \do{#1}
1463 \let\rbserver_do=\wrn_rboundary_do
1464 }
1465 \def\wrn_rboundary_do#1{
1466 \do{#1}
1467 \immediate\write16{Boundarychar~slot~usage~collision~in~
1468 `\slot_name'~ligkern~program.}
1469 }
1470 \def\vpl_ligature#1#2#3{
1471 \get_slot_num{#3}
1472 \ifnum -1=\result
1473 \immediate\write16{Warning:~\string\ligature\space
1474 for~unknown~slot~`#3'.}
1475 \else
1476 \x_cs\ifx{slots-#2}\x_relax
1477 \immediate\write16{Warning:~\string\ligature\space
1478 for~unknown~slot~`#2'.}
1479 \else
1480 \def\do##1{
1481 \vpl_liglabel
1482 \out_lline{(#1~D~\number`##1~\space\vpl_int\result)~
1483 (COMMENT~#2~#3)}
1484 }
1485 \csname slots-#2\endcsname
1486 \fi
1487 \fi
1488 }
1489 \def\vpl_kerning{
1490 \let\do=\vpl_kern_do
1491 \csname~r-\slot_name\endcsname
1492 \vpl_ligstop
1493 \egroup
1494 }
1495 \def\vpl_kern#1#2{
1496 \edef\a_macro{\expandafter\gobble_three\string#1}
1497 \a_count=\expandafter\gobble_one\string#2\x_relax
1498 \ifnum \ifnum -\a_count>\a_count - \fi\a_count>\minimum_kern
1499 \edef\b_macro{~R~\make_factor\a_count}
1500 \csname slots-\a_macro\endcsname
1501 \fi
1502 \x_cs\let{slots-\a_macro}=\x_relax
1503 }
1504 \def\vpl_kern_do#1{
1505 \vpl_liglabel
1506 \out_lline{
1507 (KRN~D~\number`#1~\b_macro)~
1508 (COMMENT~\a_macro)
1509 }
1510 }
1511 \def\out_liglabel{
1512 \out_lline{(LABEL~\vpl_int\slot_number)~(COMMENT~\slot_name)}
1513 \let\vpl_liglabel=\x_relax
1514 \let\vpl_ligstop=\out_ligstop
1515 }
1516 \def\boundary_liglabel{
1517 \out_lline{(LABEL~BOUNDARYCHAR)~(COMMENT~\slot_name)}
1518 \let\vpl_liglabel=\x_relax
1519 \let\vpl_ligstop=\out_ligstop
1520 }
1521 \let\vpl_liglabel=\out_liglabel
1522 \def\out_ligstop{\out_lline{(STOP)}
1523 \let\vpl_liglabel=\out_liglabel
1524 \let\vpl_ligstop=\x_relax}
1525 \let\vpl_ligstop=\x_relax
1526 \def\make_characters#1{
1527 \bgroup
1528 \let\do_slot=\do_character
1529 \let\end_do_slot=\end_do_character
1530 \let\nextlarger=\vpl_nextlarger
1531 \let\varchar=\vpl_varchar
1532 \let\endvarchar=\end_vpl_varchar
1533 \let\vartop=\vpl_vartop
1534 \let\varmid=\vpl_varmid
1535 \let\varbot=\vpl_varbot
1536 \let\varrep=\vpl_varrep
1537 \if_including_map_
1538 \let\saved_raw\vpl_raw
1539 \let\saved_rule\vpl_rule
1540 \let\saved_special\vpl_special
1541 \let\saved_warning\vpl_warning
1542 \let\saved_movert\vpl_movert
1543 \let\saved_moveup\vpl_moveup
1544 \let\saved_push\vpl_push
1545 \let\saved_pop\vpl_pop
1546 \else
1547 \def\do_character_map{
1548 \ifdim \rawfont_scaling=-\p@
1549 \mapfonts\slot_name
1550 \else
1551 \let\do_character_map=\x_relax
1552 \fi
1553 }
1554 \let\saved_mapfont\pl_mapfont
1555 \let\saved_scale\vpl_scale
1556 \fi
1557 \pre_fourth_etx_pass_hook
1558 #1
1559 \post_fourth_etx_pass_hook
1560 \egroup
1561 }
1562 \def\do_character{
1563 \if_undefined{g-\slot_name}\then
1564 \ifisint{requireglyphs}\then
1565 \fontinstwarning{ETX~to~(V)PL}{
1566 Undefined~glyph~`\slot_name'~requested\message_break
1567 for~slot~\the\slot_number\message_number}
1568 \fi
1569 \expandafter\gobble_setslot
1570 \else
1571 \ifx\slot_name\notdef_name\else
1572 \out_line{(CHARACTER~\vpl_int\slot_number\space
1573 (COMMENT~\slot_name)}
1574 \glyph_parameter\glyph_metrics\slot_name
1575 \a_dimen=\make_factor\a_count \p@
1576 \do_character_sidebearings
1577 \out_lline{(CHARWD~\vpl_real\a_dimen)}
1578 \ifnum \z@=\b_count \else
1579 \out_lline{(CHARHT~R~\make_factor\b_count)}
1580 \fi
1581 \ifnum \z@=\c_count \else
1582 \out_lline{(CHARDP~R~\make_factor\c_count)}
1583 \fi
1584 \ifnum \z@=\d_count \else
1585 \out_lline{(CHARIC~R~\make_factor\d_count)}
1586 \fi
1587 \do_character_map
1588 \fi
1589 \fi
1590 }
1591 \def\do_character_sidebearings{
1592 \ifisint{\slot_name-spacing}\then
1593 \curr_bearings=\make_factor{\int{\slot_name-spacing}}\half_point
1594 \else
1595 \curr_bearings=\side_bearings
1596 \fi
1597 \advance\a_dimen by 2\curr_bearings
1598 }
1599 \def\do_character_map{
1600 \global\prev_mapfont=0
1601 \out_lline{(MAP}
1602 \ifdim 0pt=\curr_bearings
1603 \mapcommands\slot_name
1604 \else
1605 \out_llline{(MOVERIGHT~\vpl_real\curr_bearings)}
1606 \mapcommands\slot_name
1607 \out_llline{(MOVERIGHT~\vpl_real\curr_bearings)}
1608 \fi
1609 \out_llline{)}
1610 }
1611 \long\def\gobble_setslot#1\endsetslot{\endsetslot}
1612 \def\end_do_character{
1613 \ifisglyph\slot_name\then
1614 \out_lline{)}
1615 \fi
1616 }
1617 \def\notdef_name{.notdef}
1618 \def\vpl_nextlarger#1{
1619 \get_slot_num{#1}
1620 \ifnum -1<\result
1621 \out_lline{(NEXTLARGER~D~\the\result)~(COMMENT~#1)}
1622 \else
1623 \immediate\write16{Warning:~\string\nextlarger\space
1624 for~unknown~slot~`#1'}
1625 \fi
1626 }
1627 \def\vpl_varchar{\out_lline{(VARCHAR}}
1628 \def\end_vpl_varchar{\out_llline{)}}
1629 \def\vpl_vartop#1{
1630 \get_slot_num{#1}
1631 \ifnum -1<\result
1632 \out_llline{(TOP~D~\the\result)~(COMMENT~#1)}
1633 \else
1634 \immediate\write16{Warning:~\string\vartop\space
1635 for~unknown~slot~`#1'}
1636 \fi
1637 }
1638 \def\vpl_varmid#1{
1639 \get_slot_num{#1}
1640 \ifnum -1<\result
1641 \out_llline{(MID~D~\the\result)~(COMMENT~#1)}
1642 \else
1643 \immediate\write16{Warning:~\string\varmid\space
1644 for~unknown~slot~`#1'}
1645 \fi
1646 }
1647 \def\vpl_varbot#1{
1648 \get_slot_num{#1}
1649 \ifnum -1<\result
1650 \out_llline{(BOT~D~\the\result)~(COMMENT~#1)}
1651 \else
1652 \immediate\write16{Warning:~\string\varbot\space
1653 for~unknown~slot~`#1'}
1654 \fi
1655 }
1656 \def\vpl_varrep#1{
1657 \get_slot_num{#1}
1658 \ifnum -1<\result
1659 \out_llline{(REP~D~\the\result)~(COMMENT~#1)}
1660 \else
1661 \immediate\write16{Warning:~\string\varrep\space
1662 for~unknown~slot~`#1'}
1663 \fi
1664 }
1665 \def\vpl_raw#1#2#3{
1666 \global\next_mapfont=\csname\the\mapfont_scaling-#1\endcsname
1667 \ifnum \next_mapfont=\prev_mapfont \else
1668 \out_llline{(SELECTFONT~\vpl_int\next_mapfont)~
1669 (COMMENT~#1~at~
1670 \expandafter\lose_measure \the\mapfont_scaling)}
1671 \fi
1672 \out_llline{(SETCHAR~D~#2)~(COMMENT~#3)}
1673 \global\prev_mapfont=\next_mapfont
1674 }
1675 \def\vpl_rule#1#2{
1676 \a_dimen=\make_factor{#2}\mapfont_scaling
1677 \b_dimen=\make_factor{#1}\mapfont_scaling
1678 \out_llline{(SETRULE~\vpl_real\a_dimen\space\vpl_real\b_dimen)}
1679 }
1680 \def\vpl_special#1{
1681 \out_llline{(SPECIAL~#1)}}
1682 \def\vpl_warning#1{
1683 \ifwarningspecials
1684 \out_llline{(SPECIAL~Warning:~#1)}
1685 \fi
1686 \immediate\write16{Warning:~#1.}
1687 }
1688 \newif\ifwarningspecials
1689 \warningspecialstrue
1690 \def\vpl_movert#1{
1691 \a_dimen=\make_factor{#1}\mapfont_scaling
1692 \out_llline{(MOVERIGHT~\vpl_real\a_dimen)}
1693 }
1694 \def\vpl_moveup#1{
1695 \a_dimen=\make_factor{#1}\mapfont_scaling
1696 \out_llline{(MOVEUP~\vpl_real\a_dimen)}
1697 }
1698 \def\vpl_push{\out_llline{(PUSH)}}
1699 \def\vpl_pop{\out_llline{(POP)}}
1700 \def\make_tidy#1{
1701 \tidying_up_hook
1702 \if_including_map_
1703 \a_count=0
1704 \loop\ifnum \a_count<\font_count
1705 \edef\a_macro{\csname~f-\the\a_count\endcsname}
1706 \global\x_cs\let\a_macro\x_relax
1707 \advance\a_count by 1
1708 \repeat
1709 \global\font_count=0
1710 \else
1711 \ifdim \rawfont_scaling<\z@
1712 \fontinstwarning{ETX~to~(V)PL}{The~font~
1713 \out_filename\space doesn't~contain~any~characters}
1714 \global\rawfont_scaling=\p@
1715 \fi
1716 \ifdim \rawfont_scaling=\p@ \else
1717 \out_line{(DESIGNUNITS~\vpl_real\rawfont_scaling)}
1718 \fi
1719 \fi
1720 }
1721 \newtoks\family_toks
1722 \def\installfonts{
1723 \bgroup
1724 \global\family_toks={}
1725 \gdef\prev_file_list{}
1726 \global\let\setsomething_global=\global
1727 }
1728 \def\installfamily#1#2#3{
1729 \global\family_toks=
1730 \expandafter{\the\family_toks\fd_family{#1}{#2}{#3}}
1731 \global\x_cs\let{#1-#2}\empty_command
1732 }
1733 \def\installfont#1#2#3#4#5#6#7#8{
1734 \global\let\setsomething_global=\x_relax
1735 \input_metrics{}{#2}
1736 \etxtovpl{#3}{#1}
1737 \installfontas{#1}{#4}{#5}{#6}{#7}{#8}
1738 \global\let\setsomething_global=\global
1739 }
1740 \def\installrawfont#1#2#3#4#5#6#7#8{
1741 \global\let\setsomething_global=\x_relax
1742 \xdef\out_filename{#1}
1743 \input_metrics{\let\storemapdata=\installraw_storemap}{#2}
1744 \let\storemapdata=\gobble_three
1745 \etxtopl{#3}{#1}
1746 \record_usage{#1}
1747 \installfontas{
1748 \ifdim \rawfont_scaling=\p@ \else
1749 [\expandafter\lose_measure\the\rawfont_scaling]~
1750 \fi #1
1751 }{#4}{#5}{#6}{#7}{#8}
1752 \global\let\setsomething_global=\global
1753 }
1754 \def\installraw_storemap#1#2#3{
1755 \def\a_macro{#1}
1756 \ifx \a_macro\out_filename \else
1757 \record_transform{\out_filename}{\string\frommtx{#1}}{}\if_false
1758 \fi
1759 }
1760 \def\input_metrics#1#2{
1761 \let\metrics=\file_list_metrics
1762 \xdef\curr_file_list{#2,}
1763 \let\metrics=\x_relax
1764 \ifx\prev_file_list\curr_file_list\else
1765 \egroup\bgroup
1766 #1
1767 \expandafter\process_csep_list \expandafter\input_mtx_file
1768 \curr_file_list\process_csep_list,
1769 \global\let\prev_file_list=\curr_file_list
1770 \fi
1771 }
1772 \def\file_list_metrics#1,{
1773 \iffalse{\fi}
1774 \a_toks=\expandafter{\curr_file_list\x_relax#1,}
1775 \xdef\curr_file_list{\the\a_toks \iffalse}\fi
1776 }
1777 \def\installfontas#1#2#3#4#5#6{
1778 \if_undefined{#2-#3-#4-#5}\then
1779 \let\do_shape=\x_relax
1780 \if_undefined{#2-#3}\then
1781 \x_cs\let{#2-#3}\empty_command
1782 \autoinstallfamily{#2}{#3}
1783 \fi
1784 \x_cs\xdef{#2-#3}{
1785 \csname#2-#3\endcsname
1786 \do_shape{#2}{#3}{#4}{#5}
1787 }
1788 \fi
1789 \let\do_size=\x_relax
1790 \x_cs\xdef{#2-#3-#4-#5}{
1791 \if_defined{#2-#3-#4-#5}\then
1792 \csname#2-#3-#4-#5\endcsname
1793 \fi
1794 \do_size{#6}{#1}
1795 }
1796 }
1797 \def\autoinstallfamily#1#2{\installfamily{#1}{#2}{}}
1798 \def\endinstallfonts{
1799 \global\let\setsomething_global=\x_relax
1800 \let\do_shape=\fd_shape
1801 \let\do_size=\fd_size
1802 \the\family_toks
1803 \global\family_toks{}
1804 \egroup
1805 }
1806 \def\input_mtx_file#1{
1807 \reset_modifiers_hook
1808 \ifx\x_relax#1\x_relax
1809 \else
1810 \identity_one{\get_file_name #1~}~\par
1811 \ifx \pl_encoding\empty_command
1812 \fromany\file_name
1813 \else
1814 \metrics_given_encoding{\file_name}{\pl_encoding}
1815 \fi
1816 \ifisstr{afm-name}\then
1817 \inputmtx{\str{afm-name}}
1818 \else
1819 \fontinsterror{\string\install...}{
1820 Font/MTX~file~\file_name\space not~found
1821 }{
1822 You~can~insert~an~\string\inputmtx\space command~here
1823 \messagebreak to~input~some~other~MTX~file~instead.
1824 \ifisint{rawscale}\then \messagebreak
1825 The~requested~raw~scaling~will~then~be~applied~on~that.
1826 \fi
1827 }
1828 \fi
1829 \fi
1830 }
1831 \def\metrics_given_encoding#1#2{
1832 \x_cs\edef{s-afm-name}{#1-#2}
1833 \if_file_exists{#1.pl}\then
1834 \generalpltomtx{#1}{#1-#2}{pl}{#2}
1835 \else
1836 \if_file_exists{#1.vpl}\then
1837 \generalpltomtx{#1}{#1-#2}{vpl}{#2}
1838 \else
1839 \unsetstr{afm-name}
1840 \fi\fi
1841 }
1842 \def\reset_modifiers_hook{
1843 \unsetint{rawscale}
1844 \let\glyph_name_modifier\identity_one
1845 \let\pl_encoding\empty_command
1846 \let\list_of_options\empty_command
1847 }
1848 \def\get_file_name #1~{
1849 \edef\file_name{#1}
1850 \get_keyword
1851 }
1852 \def\get_keyword #1~{
1853 \if_defined{IFKW-#1}\then
1854 \csname IFKW-#1 \expandafter\endcsname
1855 \else
1856 \fontinsterror{\string\install...}{
1857 `#1'~is~not~a~defined~keyword
1858 }{
1859 \error_help_a\messagebreak
1860 Extra~tokens~will~be~flushed.
1861 }
1862 \expandafter\gobble_keywords
1863 \fi
1864 }
1865 \def\gobble_keywords#1\par{}
1866 \x_cs\let{IFKW-}=\gobble_keywords
1867 \x_cs\def{IFKW-scaled}#1~{
1868 \ifnum #1=\one_thousand
1869 \unsetint{rawscale}
1870 \else
1871 \x_resetint{rawscale}{#1}
1872 \fi
1873 \get_keyword
1874 }
1875 \x_cs\def{IFKW-suffix}#1~{
1876 \def\glyph_name_modifier##1{##1#1}
1877 \get_keyword
1878 }
1879 \x_cs\def{IFKW-encoding}#1~{
1880 \def\pl_encoding{#1}
1881 \get_keyword
1882 }
1883 \let\pl_encoding=\empty_command
1884 \x_cs\def{IFKW-option}#1~{
1885 \add_to\list_of_options{\do{#1}}
1886 }
1887 \def\ifoption#1\then{
1888 \_a_false
1889 \edef\a_macro{#1}
1890 \def\do##1{
1891 \if_a_ \else
1892 \def\b_macro{##1}
1893 \ifx \a_macro\b_macro \_a_true \fi
1894 \fi
1895 }
1896 \list_of_options
1897 \if_a_
1898 }
1899 \let\list_of_options\empty_command
1900 \def\fd_family#1#2#3{
1901 \a_toks{#3}
1902 \edef\lowercase_file{\lowercase{
1903 \edef\noexpand\lowercase_file{#1#2.fd}}}
1904 \lowercase_file
1905 \open_out{\lowercase_file}
1906 \out_line{\percent_char~Filename:~\lowercase_file}
1907 \out_line{\percent_char~Created~by:~tex~\jobname}
1908 \out_line{\percent_char~Created~using~fontinst~v\fontinstversion}
1909 \out_line{}
1910 \out_line{\percent_char~THIS~FILE~SHOULD~BE~PUT~IN~A~TEX~INPUTS~
1911 DIRECTORY}
1912 \out_line{}
1913 \out_line{\string\ProvidesFile{\lowercase_file}}
1914 \out_lline{[
1915 \the\year/
1916 \ifnum10>\month0\fi\the\month/
1917 \ifnum10>\day0\fi\the\day\space
1918 Fontinst~v\fontinstversion\space
1919 font~definitions~for~#1/#2.
1920 ]}
1921 \out_line{}
1922 \out_line{\string\DeclareFontFamily{#1}{#2}{\the\a_toks}}
1923 {
1924 \csname #1-#2\endcsname
1925 \out_line{}
1926 \let\do_shape=\substitute_shape
1927 \csname #1-#2\endcsname
1928 \let\do_shape=\remove_shape
1929 \csname #1-#2\endcsname
1930 }
1931 \x_cs\g_let{#1-#2}\x_relax
1932 \out_line{}
1933 \out_line{\string\endinput}
1934 \close_out{Font~definitions}
1935 }
1936 \def\fd_shape#1#2#3#4{
1937 \out_line{}
1938 \out_line{\string\DeclareFontShape{#1}{#2}{#3}{#4}\left_brace_char}
1939 \csname #1-#2-#3-#4\endcsname
1940 \x_cs\g_let{#1-#2-#3-#4}\empty_command
1941 \out_line{\right_brace_char{}}
1942 }
1943 \def\fd_size#1#2{
1944 \x_cs\ifx{siz-#1}\x_relax
1945 \out_lline{#1~#2}
1946 \else
1947 \out_lline{\csname siz-#1\endcsname\space #2}
1948 \fi
1949 }
1950 \def\remove_shape#1#2#3#4{
1951 \x_cs\g_let{#1-#2-#3-#4}\x_relax
1952 }
1953 \def\substitute_shape#1#2#3#4{
1954 \edef\orig_shape{#4}
1955 \substitute_series{#1}{#2}{#3}{\orig_shape}
1956 \x_cs\ifx{sub-\orig_shape}\x_relax\else
1957 \edef\subst_shape{\csname sub-\orig_shape\endcsname}
1958 \x_cs\ifx{#1-#2-#3-\subst_shape}\x_relax
1959 \out_line{
1960 \string\DeclareFontShape{#1}{#2}{#3}{\subst_shape}{
1961 <->\csname typ-\orig_shape\endcsname\space
1962 *~#2/#3/\orig_shape
1963 }{}
1964 }
1965 \x_cs\let{#1-#2-#3-\subst_shape}\empty_command
1966 \substitute_shape{#1}{#2}{#3}{\subst_shape}
1967 \fi
1968 \fi
1969 }
1970 \def\substitute_series#1#2#3#4{
1971 \edef\orig_series{#3}
1972 \x_cs\ifx{sub-\orig_series}\x_relax\else
1973 \edef\subst_series{\csname sub-\orig_series\endcsname}
1974 \x_cs\ifx{#1-#2-\subst_series-#4}\x_relax
1975 \out_line{
1976 \string\DeclareFontShape{#1}{#2}{\subst_series}{#4}{
1977 <->\csname typ-\orig_series\endcsname\space
1978 *~#2/\orig_series/#4
1979 }{}
1980 }
1981 \x_cs\let{#1-#2-\subst_series-#4}\empty_command
1982 \substitute_series{#1}{#2}{\subst_series}{#4}
1983 \fi
1984 \fi
1985 }
1986 \def\substitute_generic#1#2#3{
1987 \edef\a_macro{#2}
1988 \edef\b_macro{#3}
1989 \ifx \a_macro \b_macro
1990 \x_cs\let{sub-#3}\undefined_command
1991 \else
1992 \x_cs\let{sub-#3}\a_macro
1993 \x_cs\def{typ-#3}{#1}
1994 \fi
1995 }
1996 \def\substitutesilent{\substitute_generic{ssub}}
1997 \def\substitutenoisy{\substitute_generic{sub}}
1998 \substitutesilent{bx}{b}
1999 \substitutesilent{b}{bx}
2000 \substitutesilent{b}{sb}
2001 \substitutesilent{b}{db}
2002 \substitutesilent{m}{mb}
2003 \substitutesilent{m}{l}
2004 \substitutenoisy{ui}{it}
2005 \substitutesilent{sl}{it}
2006 \substitutesilent{it}{sl}
2007 \def\declareencoding#1#2{\x_cs\edef{enc-#1}{#2}}
2008 \declareencoding{TEX~TEXT}{ot1}
2009 \declareencoding{TEX~TEXT~WITHOUT~F-LIGATURES}{ot1}
2010 \declareencoding{TEX~TYPEWRITER~TEXT}{ot1tt}
2011 \declareencoding{TEX~MATH~ITALIC}{oml}
2012 \declareencoding{TEX~MATH~SYMBOLS}{oms}
2013 \declareencoding{TEX~MATH~EXTENSION}{omx}
2014 \declareencoding{LATEX~SYMBOLS}{lasy}
2015 \declareencoding{TEX~TEXT~SUBSET}{eufrak}
2016 \declareencoding{TEX~MATH~ITALIC~SUBSET}{eurm}
2017 \declareencoding{TEX~MATH~SYMBOLS~SUBSET}{euscr}
2018 \declareencoding{EULER~SUBSTITUTIONS~ONLY}{euex}
2019 \declareencoding{EXTENDED~TEX~FONT~ENCODING~-~LATIN}{t1}
2020 \declareencoding{TEX~TEXT~COMPANION~SYMBOLS~1---TS1}{ts1}
2021 \declareencoding{TEXBASE1ENCODING}{8r}
2022 \declareencoding{TEX~TYPEWRITER~AND~WINDOWS~ANSI}{8y}
2023 \def\declaresize#1#2{\x_cs\edef{siz-#1}{#2}}
2024 \declaresize{}{<->}
2025 \declaresize{5}{<5>}
2026 \declaresize{6}{<6>}
2027 \declaresize{7}{<7>}
2028 \declaresize{8}{<8>}
2029 \declaresize{9}{<9>}
2030 \declaresize{10}{<10>}
2031 \declaresize{11}{<10.95>}
2032 \declaresize{12}{<12>}
2033 \declaresize{14}{<14.4>}
2034 \declaresize{17}{<17.28>}
2035 \declaresize{20}{<20.74>}
2036 \declaresize{25}{<24.88>}
2037 \def\NOFILES{
2038 \def\transformfont##1##2{
2039 \touch_file{##1.mtx}
2040 \touch_file{##1.pl}
2041 }
2042 \def\reglyphfont##1##2{\touch_file{##1.mtx}}
2043 \def\installfonts{}
2044 \def\endinstallfonts{}
2045 \def\installfont##1##2##3##4##5##6##7##8{
2046 \touch_file{##1.vpl}
2047 }
2048 \def\installrawfont##1##2##3##4##5##6##7##8{
2049 \touch_file{##1.pl}
2050 }
2051 \def\installfamily##1##2##3{\touch_file{##1##2.fd}}
2052 }
2053 \def\touch_file#1{
2054 \edef\lowercase_file{\lowercase{
2055 \edef\noexpand\lowercase_file{#1}}}
2056 \lowercase_file
2057 \open_out{\lowercase_file}
2058 \out_line{\percent_char~TEST~FILE.}
2059 \out_line{\percent_char~Created~whilst~debugging~fontinst.}
2060 \close_out{Test~file}
2061 }
2062 %%% From file: fitrig.dtx
2063 \chardef\nin@ty=90
2064 \chardef\@clxxx=180
2065 \chardef\@lxxi=71
2066 \mathchardef\@mmmmlxviii=4068
2067 \chardef\@coeffz=72
2068 \chardef\@coefb=42
2069 \mathchardef\@coefc=840
2070 \mathchardef\@coefd=5040
2071 \def\TG@rem@pt#1{\expandafter\lose_measure\the#1\space}
2072 \def\TG@term#1{
2073 \dimen@\@tempb\dimen@
2074 \advance\dimen@ #1\p@
2075 }
2076 \def\TG@series{
2077 \dimen@\@lxxi\dimen@
2078 \divide \dimen@ \@mmmmlxviii
2079 \edef\@tempa{\TG@rem@pt\dimen@}
2080 \dimen@\@tempa\dimen@
2081 \edef\@tempb{\TG@rem@pt\dimen@}
2082 \divide\dimen@\@coeffz
2083 \advance\dimen@\m@ne\p@
2084 \TG@term\@coefb
2085 \TG@term{-\@coefc}%
2086 \TG@term\@coefd
2087 \dimen@\@tempa\dimen@
2088 \divide\dimen@ \@coefd
2089 }
2090 \def\CalculateSin#1{{%
2091 \if_undefined{sin(\number#1)}\then
2092 \dimen@=#1\p@
2093 \TG@@sin
2094 \x_cs\xdef{sin(\number#1)}{\TG@rem@pt\dimen@}
2095 \fi
2096 }}
2097 \def\CalculateCos#1{{%
2098 \if_undefined{cos(\number#1)}\then
2099 \dimen@=\nin@ty\p@
2100 \advance \dimen@ -#1\p@
2101 \TG@@sin
2102 \x_cs\xdef{cos(\number#1)}{\TG@rem@pt\dimen@}
2103 \fi
2104 }}
2105 \def\TG@@sin{%
2106 \ifdim\TG@reduce>+%
2107 \else\ifdim\TG@reduce<-%
2108 \else\TG@series\fi\fi
2109 }
2110 \def\TG@reduce#1#2{
2111 \dimen@#1#2\nin@ty\p@
2112 \advance\dimen@#2-\@clxxx\p@
2113 \dimen@-\dimen@
2114 \TG@@sin
2115 }
2116 \def\UseSin#1{\csname sin(\number#1)\endcsname}
2117 \def\UseCos#1{\csname cos(\number#1)\endcsname}
2118 \chardef\z@num\z@
2119 \x_cs\let{sin(0)} \z@num
2120 \x_cs\let{cos(0)} \@ne
2121 \x_cs\let{sin(90)} \@ne
2122 \x_cs\let{cos(90)} \z@num
2123 \x_cs\let{sin(-90)}\m@ne
2124 \x_cs\let{cos(-90)}\z@num
2125 \x_cs\let{sin(180)}\z@num
2126 \x_cs\let{cos(180)}\m@ne
2127 \def\CalculateTan#1{{%
2128 \if_undefined{tan(\number#1)}\then
2129 \CalculateSin{#1}%
2130 \CalculateCos{#1}%
2131 \a_dimen\UseCos{#1}\p@
2132 \divide \a_dimen \@iv
2133 \b_dimen\UseSin{#1}\p@
2134 \b_dimen\two@fourteen\b_dimen
2135 \divide\b_dimen\a_dimen
2136 \x_cs\xdef{tan(\number#1)}{\TG@rem@pt\b_dimen}
2137 \fi
2138 }}
2139 \def\UseTan#1{\csname tan(\number#1)\endcsname}
2140 \mathchardef\two@fourteen=16384
2141 \chardef\@iv=4
2142 \x_cs\def{tan(90)}{\errmessage{Infinite tan !}}
2143 \expandafter\let
2144 \csname tan(-90)\expandafter\endcsname \csname tan(90)\endcsname
2145 %%% From file: ficonv.dtx
2146 \def\afmtomtx#1#2{{
2147 \let\setsomething_global=\x_relax
2148 \open_out{\temp_prefix#2.mtx}
2149 \edef\raw_font_name{#2}
2150 \edef\source_font_name{#1}
2151 \x_resetint{italicslant}{0}
2152 \let\italcorr_expression=\uprightitalcorr
2153 \x_setint{minimumkern}{0}
2154 \minimum_kern=\int{minimumkern}
2155 \out_line{\percent_char~Filename:~#2.mtx}
2156 \out_line{\percent_char~Created~by:~tex~\jobname}
2157 \out_line{\percent_char~Created~using:~\string\afmtomtx{#1}{#2}}
2158 \out_line{}
2159 \out_line{\percent_char~This~file~contains~the~
2160 information~of~#1.afm~in~a~form}
2161 \out_line{\percent_char~more~easily~read~by~TeX.~
2162 It~is~used~by~the~fontinst~package.}
2163 \out_line{}
2164 \out_line{\percent_char~THIS~FILE~CAN~BE~DELETED.}
2165 \out_line{}
2166 \out_line{\string\relax}
2167 \out_line{\string\metrics}
2168 \out_line{}
2169 \out_line{\string\needsfontinstversion{\fontinstversion}}
2170 \out_line{}
2171 \catcode`\^^M=12
2172 \catcode`\ =10
2173 \expandafter\afm_line\primitiveinput #1.afm\x_relax
2174 \out_line{}
2175 \out_line{\endmetrics_text}
2176 \close_out{Metrics}
2177 }}
2178 \newcount\minimum_kern
2179 \def\afm_length#1#2{
2180 \a_dimen=#2\afm_unit_dimen
2181 #1=\a_dimen
2182 \divide #1 by \afm_unit_dimen
2183 \advance \a_dimen by -#1\afm_unit_dimen
2184 \ifdim \a_dimen>0.5\afm_unit_dimen
2185 \advance #1 by 1
2186 \else \ifdim \a_dimen<-0.5\afm_unit_dimen
2187 \advance #1 by -1
2188 \fi\fi
2189 \x_relax
2190 }
2191 \newdimen\afm_unit_dimen
2192 \afm_unit_dimen=1000sp
2193 {\catcode`\^^M=12 \gdef\afm_line#1
2194 {\afm_command#1~\end_of_line\afm_line}}
2195 \def\afm_command#1~{\csname~afm-#1\endcsname\gobble_one_line}
2196 \def\gobble_one_line#1\end_of_line{}
2197 \x_cs\def{afm-EndFontMetrics}#1\afm_line{\endinput}
2198 \def\afm_def#1(#2)#3{
2199 \x_cs\def{afm-#1}\gobble_one_line#2\end_of_line{#3}
2200 }
2201 \def\afm_let#1#2{
2202 \expandafter\let \csname afm-#1\expandafter\endcsname
2203 \csname afm-#2\endcsname
2204 }
2205 \afm_def{CharWidth}(#1){\afm_length\char_x_width{#1}}
2206 \afm_def{ItalicAngle}(#1~){\calculate_it_slant{#1}}
2207 \afm_def{XHeight}(#1){
2208 \afm_length\a_count{#1}
2209 \out_line{\string\setint{xheight}{\the\a_count}}}
2210 \afm_def{CapHeight}(#1){
2211 \afm_length\a_count{#1}
2212 \out_line{\string\setint{capheight}{\the\a_count}}}
2213 \afm_def{Ascender}(#1){
2214 \afm_length\a_count{#1}
2215 \out_line{\string\setint{ascender}{\the\a_count}}}
2216 \afm_def{Descender}(#1){
2217 \afm_length\a_count{#1}
2218 \out_line{\string\setint{descender_neg}{\the\a_count}}}
2219 \afm_def{UnderlineThickness}(#1){
2220 \afm_length\a_count{#1}
2221 \out_line{\string\setint{underlinethickness}{\the\a_count}}}
2222 \afm_def{FontBBox}(#1~#2~#3~#4){
2223 \afm_length\a_count{#4}
2224 \out_line{\string\setint{maxheight}{\the\a_count}}
2225 \afm_length\a_count{#2}
2226 \out_line{\string\setint{maxdepth_neg}{\the\a_count}}}
2227 \afm_def{StdVW}(#1){
2228 \afm_length\a_count{#1}
2229 \out_line{\string\setint{verticalstem}{\the\a_count}}}
2230 \afm_def{IsFixedPitch}(#1){
2231 \if\first_char#1=f
2232 \else\out_line{\string\setint{monowidth}{1}}
2233 \fi
2234 }
2235 \afm_def{FontName}(#1~){
2236 \record_transform{\raw_font_name}
2237 {\string\fromafm{\source_font_name}{#1}}{}\iftrue
2238 }
2239 \afm_def{KP}(#1~#2~#3~#4){
2240 \if\first_char#1=.\else
2241 \if\first_char#2=.\else
2242 \afm_length\a_count{#3}
2243 \ifnum \a_count>\minimum_kern
2244 \afm_write_setkern{#1}{#2}{\the\a_count}
2245 \else\ifnum \a_count<-\minimum_kern
2246 \afm_write_setkern{#1}{#2}{\the\a_count}
2247 \fi\fi
2248 \fi\fi
2249 }
2250 \afm_let{KPX}{KP}
2251 \def\afm_write_setkern#1#2#3{\out_line{\string\setkern{#1}{#2}{#3}}}
2252 \afm_def{C}(#1~;#2){\init_afm{#1}\do_list[#2]\afm_char}
2253 \afm_def{CH}(<#1>~;#2){\uppercase{\init_afm{"#1}}\do_list[#2]\afm_char}
2254 \afm_def{CC}(#1~#2~;#3){\init_cc{#1}\do_list[#3]\cc_char}
2255 \newcount\char_slot
2256 \newcount\char_x_width
2257 \newcount\x_width
2258 \newcount\bbox_llx
2259 \newcount\bbox_lly
2260 \newcount\bbox_urx
2261 \newcount\bbox_ury
2262 \let\char_name=\empty_command
2263 \def\init_afm#1{
2264 \char_slot=#1\x_relax
2265 \x_width=\char_x_width
2266 \bbox_llx=0
2267 \bbox_lly=0
2268 \bbox_urx=0
2269 \bbox_ury=0
2270 \let\char_name=\empty_command
2271 }
2272 \def\afm_char{
2273 \eval_expr{
2274 \italcorr_expression\x_width\bbox_llx\bbox_urx\bbox_lly\bbox_ury
2275 }
2276 \out_line{
2277 \ifnum -1<\char_slot
2278 \string\setrawglyph
2279 \else
2280 \string\setnotglyph
2281 \fi
2282 {\char_name}
2283 {\raw_font_name}
2284 {10pt}
2285 {\the\char_slot}
2286 {\the\x_width}
2287 {\the\bbox_ury}
2288 {\number -\bbox_lly}
2289 {\the\result}
2290 }
2291 }
2292 \def\init_cc#1{%
2293 \out_line{\string\setglyph{#1}}
2294 \def\char_name{#1}
2295 }
2296 \def\cc_char{%
2297 \out_lline{\string\samesize{\char_name-not}}
2298 \out_line{\string\endsetglyph}
2299 }
2300 \def\uprightitalcorr#1#2#3#4#5{0}
2301 \def\slanteditalcorr#1#2#3#4#5{\max{\sub{#3}{#1}}{0}}
2302 \def\calculate_it_slant#1{
2303 \edef\theangle{#1}
2304 \CalculateTan{\theangle}
2305 \a_dimen=-\one_thousand sp
2306 \a_dimen=\UseTan{\theangle}\a_dimen
2307 \a_count=\a_dimen
2308 \out_line{\string\setint{italicslant}{\the\a_count}}
2309 \x_resetint{italicslant}{\a_count}
2310 \ifnum 0<\a_count
2311 \let\italcorr_expression=\slanteditalcorr
2312 \else
2313 \let\italcorr_expression=\uprightitalcorr
2314 \fi
2315 }
2316 \def\do_list[~#1~#2;~#3]{
2317 \csname~list-#1\endcsname\gobble_one_semi#2;
2318 \ifx\x_relax#3\x_relax\expandafter\gobble_one
2319 \else\expandafter\identity_one\fi
2320 {\do_list[~#3]}
2321 }
2322 \def\gobble_one_semi#1;{}
2323 \def\list_def#1(#2)#3{\x_cs\def{list-#1}\gobble_one_semi#2~;{#3}}
2324 \list_def{W}(#1~#2){\afm_length\x_width{#1}}
2325 \list_def{WX}(#1){\afm_length\x_width{#1}}
2326 \list_def{WY}(#1){}
2327 \list_def{N}(#1){\def\char_name{#1}}
2328 \list_def{B}(#1~#2~#3~#4){
2329 \afm_length\bbox_llx{#1}
2330 \afm_length\bbox_lly{#2}
2331 \afm_length\bbox_urx{#3}
2332 \afm_length\bbox_ury{#4}
2333 }
2334 \list_def{PCC}(#1~#2~#3){
2335 \afm_length\a_count{#2}
2336 \afm_length\b_count{#3}
2337 \out_lline{\string\glyphpcc{#1}{\the\a_count}{\the\b_count}}
2338 }
2339 \def\definealias#1#2#3{
2340 \expandafter\def \csname GN-#1 \expandafter\endcsname
2341 \expandafter{ \csname g-#2 \expandafter\endcsname
2342 \csname i-#3\endcsname}
2343 }
2344 \def\glyph_alias#1{
2345 \expandafter\expandafter \expandafter\glyph_alias_i
2346 \csname GN-#1\endcsname
2347 }
2348 \def\glyph_alias_i#1#2{
2349 \expandafter\gobble_three \string#1
2350 }
2351 \let\charnameprefix\empty
2352 \def\charnamealias#1{
2353 \if_defined{GN-\charnameprefix#1}\then
2354 \glyph_alias{\charnameprefix#1}
2355 \else\if_defined{GN-#1}\then
2356 \glyph_alias{#1}
2357 \else
2358 #1
2359 \fi\fi
2360 }
2361 \def\alias_incr#1{
2362 \expandafter\expandafter \expandafter\alias_incr_i
2363 \csname GN-#1\endcsname
2364 }
2365 \def\alias_incr_i#1#2{
2366 \ifx#2\x_relax
2367 \mathchardef#2=\@ne
2368 \else
2369 \a_count=#2
2370 \advance\a_count\@ne
2371 \mathchardef#2=\a_count
2372 \fi
2373 }
2374 \def\alias_char_name#1{
2375 \if_defined{GN-\charnameprefix#1}\then
2376 \edef\char_name{
2377 \string\aliased{#1}{\glyph_alias{\charnameprefix#1}}
2378 }
2379 \alias_incr{\charnameprefix#1}
2380 \else\if_defined{GN-#1}\then
2381 \edef\char_name{
2382 \string\aliased{#1}{\glyph_alias{#1}}
2383 }
2384 \alias_incr{#1}
2385 \else
2386 \edef\char_name{#1}
2387 \fi\fi
2388 }
2389 \def\autoaliasafm{
2390 \begingroup
2391 \list_def{N}(##1){\alias_char_name{##1}}
2392 \def\afm_write_setkern##1##2##3{
2393 \out_line{
2394 \string\setkern{\charnamealias{##1}}{\charnamealias{##2}}{##3}
2395 }
2396 }
2397 \def\init_cc##1{%
2398 \edef\char_name{\charnamealias{##1}}
2399 \out_line{\string\setglyph{\char_name}}
2400 }
2401 \list_def{PCC}(##1~##2~##3){
2402 \afm_length\a_count{##2}
2403 \afm_length\b_count{##3}
2404 \out_lline{\string\glyphpcc
2405 {\charnamealias{##1}}{\the\a_count}{\the\b_count}}
2406 }
2407 }
2408 \def\endautoaliasafm{\endgroup}
2409 \def\generalpltomtx#1#2#3#4{{
2410 \let\setsomething_global=\x_relax
2411 \let\setfontdimen=\pl_setfontdimen
2412 \if _#4_ \else
2413 \def\do_slot{\x_cs\let{name-\the\slot_number}\slot_name}
2414 \def\do_boundary{\x_cs\let{name-BOUNDARYCHAR}\slot_name}
2415 \inputetx{#4}
2416 \let\CODINGSCHEME=\ignore_parens
2417 \fi
2418 \pl_to_mtx{#1}{#2}{#3}{\string\generalpltomtx{#1}{#2}{#3}{#4}}
2419 }}
2420 \def\pltomtx#1#2{\generalpltomtx{#1}{#2}{pl}{}}
2421 \def\pl_to_mtx#1#2#3#4{
2422 \edef\raw_font_name{#1}
2423 \open_out{\temp_prefix#2.mtx}
2424 \out_line{\percent_char~Filename:~#2.mtx}
2425 \out_line{\percent_char~Created~by:~tex~\jobname}
2426 \out_line{\percent_char~Created~using:~#4}
2427 \out_line{}
2428 \out_line{\percent_char~This~file~contains~the~
2429 information~of~#1.#3~in~a~form}
2430 \out_line{\percent_char~more~easily~read~by~TeX.~
2431 It~is~used~by~the~fontinst~package.}
2432 \out_line{}
2433 \out_line{\percent_char~THIS~FILE~CAN~BE~DELETED.}
2434 \out_line{}
2435 \out_line{\string\relax}
2436 \out_line{\string\metrics}
2437 \out_line{}
2438 \out_line{\string\needsfontinstversion{\fontinstversion}}
2439 \out_line{}
2440 \lowercase{
2441 \record_transform{#2}{
2442 \string\from#3 \x_cs\ifx{from#3}\frompl {#1} \fi
2443 }{}\iftrue
2444 }
2445 \out_line{}
2446 \catcode`\(=0 \catcode`\)=9
2447 \let\/=\ignore_parens
2448 \let\do_pl_glyph=\x_relax
2449 \primitiveinput #1.#3\x_relax
2450 \do_pl_glyph
2451 \out_line{}
2452 \ifisint{\percent_char boundarychar}\then
2453 \f_count=\int{\percent_char boundarychar}
2454 \x_cs\ifx{name-\the\f_count}\x_relax \else
2455 \out_line{\string\setstr{rightboundary}
2456 {\csname name-\the\f_count\endcsname}
2457 }
2458 \out_line{}
2459 \fi
2460 \fi
2461 \out_line{\endmetrics_text}
2462 \close_out{Metrics}
2463 }
2464 \def\ignore_parens{\bgroup\catcode`(=1 \catcode`)=2 \x_relax
2465 \expandafter\expandafter\expandafter\gobble_parens
2466 \iftrue\expandafter{\else}\fi}
2467 \def\gobble_parens#1{\egroup}
2468 \def\pl_real#1{\pl_realer(#1000)}
2469 \def\pl_realer(#1.#2#3#4#5){#1#2#3#4}
2470 \def\pl_rounded_real(#1.#2#3#4#5){
2471 \global\result=#1#2#3#4\relax
2472 \ifnum \first_char#5= >4
2473 \global\advance \result
2474 \if - \first_char#1= \m@ne \else \@ne \fi
2475 \fi
2476 }
2477 \def\pl_int#1#2{
2478 \ifx#1C `#2
2479 \else\ifx#1D #2
2480 \else\ifx#1O '#2
2481 \else\ifx#1H "#2
2482 \else -1\errmessage{Unknown~PL~number~prefix~`#1'}
2483 \fi\fi\fi\fi
2484 }
2485 \let\FAMILY=\ignore_parens
2486 \let\FACE=\ignore_parens
2487 \let\CHECKSUM=\ignore_parens
2488 \def\HEADER~#1~#2~#3~#4~{}
2489 \def\SEVENBITSAFEFLAG~#1~{}
2490 \let\COMMENT=\ignore_parens
2491 \let\LIG=\ignore_parens
2492 \let\NEXTLARGER=\ignore_parens
2493 \let\VARCHAR=\ignore_parens
2494 \let\VTITLE=\ignore_parens
2495 \let\MAPFONT=\ignore_parens
2496 \let\MAP=\ignore_parens
2497 \def\CODINGSCHEME{\bgroup\catcode`\)=12\x_relax\CODINGSCHEME_cont}
2498 \def\CODINGSCHEME_cont#1){
2499 \egroup
2500 \if_undefined{enc-#1}\then
2501 \errhelp{The~encoding~for~`#1'~has~not~been~declared.^^J
2502 You~should~declare~it~with~
2503 \string\declareencoding{#1}{ETXFILE}.^^J
2504 Press~<RETURN>~to~carry~on~with~fingers~crossed,^^J
2505 or~X~<RETURN>~to~exit.}
2506 \errmessage{Undeclared~encoding~`#1'}
2507 \else
2508 \def\do_slot{\x_cs\let{name-\the\slot_number}\slot_name}
2509 \def\do_boundary{\x_cs\let{name-BOUNDARYCHAR}\slot_name}
2510 \catcode`\(=12 \catcode`\)=12
2511 \x_cs\inputetx{enc-#1}\x_relax
2512 \catcode`\(=0 \catcode`\)=9
2513 \fi
2514 }
2515 \def\DESIGNSIZE~#1~#2~{
2516 \a_dimen=#2pt
2517 \out_line{\string\setdim{designsize}{\the\a_dimen}}
2518 }
2519 \def\DESIGNUNITS~#1~#2~{
2520 \b_dimen=#2pt\x_relax
2521 \ifdim 1pt=\b_dimen \else
2522 \fontinsterror{PL-to-MTX}{Nondefault~unit~used~in~PL~file}
2523 {You~may~continue,~but~the~metrics~for~this~font~will~be~wrong.}
2524 \fi
2525 \out_line{\string\setdim{designunits}{\the\b_dimen}}
2526 }
2527 \def\BOUNDARYCHAR~#1~#2~{
2528 \x_setint{\percent_char boundarychar}{\pl_int{#1}{#2}}
2529 }
2530 \def\pl_setfontdimen#1#2{\x_cs\def{fdimen-#1}{#2}}
2531 \def\PARAMETER~#1~#2~R~#3~{
2532 \f_count=\pl_int{#1}{#2}\x_relax
2533 \if_defined{fdimen-\the\f_count}\then
2534 \pl_rounded_real(#3 0000)
2535 \out_line{\string\setint{\csname fdimen-\the\f_count\endcsname}
2536 {\the\result}}
2537 \fi
2538 }
2539 \let\FONTDIMEN=\x_relax
2540 \def\SLANT{\PARAMETER D~1~}
2541 \pl_setfontdimen{1}{italicslant}
2542 \def\SPACE{\PARAMETER D~2~}
2543 \pl_setfontdimen{2}{interword}
2544 \def\STRETCH{\PARAMETER D~3~}
2545 \pl_setfontdimen{3}{stretchword}
2546 \def\SHRINK{\PARAMETER D~4~}
2547 \pl_setfontdimen{4}{shrinkword}
2548 \def\XHEIGHT{\PARAMETER D~5~}
2549 \pl_setfontdimen{5}{xheight}
2550 \def\QUAD{\PARAMETER D~6~}
2551 \pl_setfontdimen{6}{quad}
2552 \def\EXTRASPACE{\PARAMETER D~7~}
2553 \pl_setfontdimen{7}{extraspace}
2554 \def\NUM#1~#2~#3~{
2555 \ifcase #1\or
2556 \PARAMETER D~8~#2~#3~
2557 \or
2558 \PARAMETER D~9~#2~#3~
2559 \or
2560 \PARAMETER D~10~#2~#3~
2561 \fi
2562 }
2563 \def\DENOM#1~#2~#3~{
2564 \ifcase #1\or
2565 \PARAMETER D~11~#2~#3~
2566 \or
2567 \PARAMETER D~12~#2~#3~
2568 \fi
2569 }
2570 \def\SUP#1~#2~#3~{
2571 \ifcase #1\or
2572 \PARAMETER D~13~#2~#3~
2573 \or
2574 \PARAMETER D~14~#2~#3~
2575 \or
2576 \PARAMETER D~15~#2~#3~
2577 \fi
2578 }
2579 \def\SUB#1~#2~#3~{
2580 \ifcase #1\or
2581 \PARAMETER D~16~#2~#3~
2582 \or
2583 \PARAMETER D~17~#2~#3~
2584 \fi
2585 }
2586 \def\SUPDROP{\PARAMETER D~18~}
2587 \def\SUBDROP{\PARAMETER D~19~}
2588 \def\AXISHEIGHT{\PARAMETER D~22~}
2589 \def\DELIM#1~#2~#3~{
2590 \ifcase #1\or
2591 \PARAMETER D~20~#2~#3~
2592 \or
2593 \PARAMETER D~21~#2~#3~
2594 \fi
2595 }
2596 \def\DEFAULTRULETHICKNESS{\PARAMETER D~8~}
2597 \def\BIGOPSPACING#1~#2~#3~{
2598 \ifcase #1\or
2599 \PARAMETER D~9~#2~#3~
2600 \or
2601 \PARAMETER D~10~#2~#3~
2602 \or
2603 \PARAMETER D~11~#2~#3~
2604 \or
2605 \PARAMETER D~12~#2~#3~
2606 \or
2607 \PARAMETER D~13~#2~#3~
2608 \fi
2609 }
2610 \def\LABEL~#1{\ifx #1B
2611 \expandafter\LABEL_boundarychar
2612 \else
2613 \expandafter\LABEL_slot \expandafter#1
2614 \fi
2615 }
2616 \def\LABEL_slot #1~#2~{
2617 \f_count=\pl_int{#1}{#2}
2618 \edef\a_macro{\a_macro
2619 \x_cs\do_if_defined{name-\the\f_count}
2620 }
2621 }
2622 \def\LABEL_boundarychar OUNDARYCHAR{
2623 \edef\a_macro{\a_macro
2624 \x_cs\do_if_defined{name-BOUNDARYCHAR}
2625 }
2626 }
2627 \def\do_if_defined#1{\ifx #1\x_relax \else \do{#1} \fi}
2628 \def\LIGTABLE{\let\do=\never_do\let\a_macro\empty_command}
2629 \def\STOP{\let\a_macro\empty_command}
2630 \def\SKIP~#1~#2~{\immediate\write16{Warning:~SKIP~instruction~ignored.}}
2631 \def\KRN~#1~#2~R~#3~{
2632 \pl_rounded_real(#3 0000)
2633 \edef\do{\noexpand\write_pl_krn{\pl_int{#1}{#2}}{\the\result}}
2634 \a_macro
2635 \let\do=\never_do
2636 }
2637 \def\write_pl_krn#1#2#3{
2638 \f_count=#1\x_relax
2639 \x_cs\ifx{name-\the\f_count}\x_relax \else
2640 \out_line{\string\setkern{#3}
2641 {\csname name-\the\f_count\endcsname}{#2}
2642 }
2643 \fi
2644 }
2645 \def\CHARWD~R~#1~{\pl_rounded_real(#1 0000) \b_count=\result}
2646 \def\CHARHT~R~#1~{\pl_rounded_real(#1 0000) \c_count=\result}
2647 \def\CHARDP~R~#1~{\pl_rounded_real(#1 0000) \d_count=\result}
2648 \def\CHARIC~R~#1~{\pl_rounded_real(#1 0000) \e_count=\result}
2649 \def\CHARACTER~#1~#2~{
2650 \do_pl_glyph
2651 \a_count=\pl_int{#1}{#2}
2652 \b_count=0
2653 \c_count=0
2654 \d_count=0
2655 \e_count=0
2656 \let\do_pl_glyph=\write_pl_glyph
2657 }
2658 \def\write_pl_glyph{
2659 \x_cs\ifx{name-\the\a_count}\x_relax\else
2660 \out_line{\string\setrawglyph
2661 {\csname~name-\the\a_count\endcsname}
2662 {\raw_font_name}
2663 {\the\a_dimen}
2664 {\the\a_count}
2665 {\the\b_count}
2666 {\the\c_count}
2667 {\the\d_count}
2668 {\the\e_count}}
2669 \fi
2670 }
2671 \def\mtxtopl#1#2{{
2672 \let\setsomething_global=\x_relax
2673 \open_out{#2.pl}
2674 \top_of_pl_hook
2675 \out_line{(COMMENT~raw~font~#2~created~by~fontinst~
2676 v\fontinstversion)}
2677 \out_line{}
2678 \out_line{(COMMENT~Filename:~#2.pl)}
2679 \out_line{(COMMENT~Created~by:~tex~\jobname)}
2680 \out_line{(COMMENT~Created~using:~\string\mtxtopl{#1}{#2})}
2681 \out_line{}
2682 \out_line{(COMMENT~This~file~can~be~turned~into~
2683 a~ligless~TeX~font~with)}
2684 \out_line{(COMMENT~pltotf~#2.pl~#2.tfm)}
2685 \out_line{}
2686 \out_line{(COMMENT~THIS~FILE~CAN~THEN~BE~DELETED.)}
2687 \out_line{}
2688 \out_line{(DESIGNSIZE~R~10.0)}
2689 \out_line{}
2690 \let\setglyph=\iffalse
2691 \let\endsetglyph=\fi
2692 \let\setkern=\gobble_three
2693 \let\setscaledrawglyph=\first_pl_raw_glyph
2694 \def\setscalednotglyph##1##2##3##4##5##6##7##8##9{}
2695 \inputmtx{#1}
2696 \out_line{}
2697 \out_line{(COMMENT~END~OF~FILE~#2.pl)}
2698 \close_out{Raw~font}
2699 }}
2700 \def\first_pl_raw_glyph#1#2#3#4{
2701 \out_line{(DESIGNUNITS~R~\make_factor{#4})}
2702 \let\setscaledrawglyph=\pl_raw_glyph
2703 \pl_raw_glyph{#1}{#2}{#3}{#4}
2704 }
2705 \def\pl_raw_glyph#1#2#3#4#5#6#7#8#9{
2706 \out_line{(CHARACTER~D~\number#5~\space(COMMENT~#1)}
2707 \out_lline{(CHARWD~R~\make_factor{#6})}
2708 \out_lline{(CHARHT~R~\make_factor{#7})}
2709 \out_lline{(CHARDP~R~\make_factor{#8})}
2710 \out_lline{(CHARIC~R~\make_factor{#9})}
2711 \out_lline{)}
2712 }
2713 \def\transformfont#1#2{{
2714 \let\setsomething_global=\x_relax
2715 \unsetstr{afm-name}
2716 \unsetstr{etx-name}
2717 \x_resetint{x-scale}{\one_thousand}
2718 \x_resetint{y-scale}{\one_thousand}
2719 \x_resetint{slant-scale}{0}
2720 #2
2721 \ifisstr{afm-name}\then
2722 \mtxtomtx{\str{afm-name}}{#1}
2723 \mtxtopl{#1}{#1}
2724 \else
2725 \fontinsterror{Transformfont}{
2726 Failed~to~make~transformed~font~#1;\messagebreak
2727 source~font~metrics~file~not~found
2728 }\error_help_a
2729 \fi
2730 }}
2731 \def\fromafm#1{
2732 \if_file_exists{#1.afm}\then
2733 \x_setstr{afm-name}{#1}
2734 \afmtomtx{#1}{#1}
2735 \mtxtopl{#1}{#1}
2736 \fi
2737 }
2738 \def\frommtx#1{
2739 \if_file_exists{#1.mtx}\then \x_setstr{afm-name}{#1} \fi
2740 }
2741 \def\frompl#1{
2742 \if_file_exists{#1.pl}\then
2743 \x_setstr{afm-name}{#1}
2744 \generalpltomtx{#1}{#1}{pl}{}
2745 \fi
2746 }
2747 \def\fromplgivenetx#1#2{
2748 \if_file_exists{#1.pl}\then
2749 \x_setstr{afm-name}{#1}
2750 \generalpltomtx{#1}{#1}{pl}{#2}
2751 \fi
2752 }
2753 \def\fromany#1{
2754 \x_cs\edef{s-afm-name}{#1}
2755 \if_file_exists{#1.mtx}\then\else
2756 \if_file_exists{#1.pl}\then
2757 \generalpltomtx{#1}{#1}{pl}{}
2758 \else
2759 \if_file_exists{#1.afm}\then
2760 \afmtomtx{#1}{#1}
2761 \mtxtopl{#1}{#1}
2762 \else
2763 \if_file_exists{#1.vpl}\then
2764 \generalpltomtx{#1}{#1}{vpl}{}
2765 \else
2766 \unsetstr{afm-name}
2767 \fi\fi\fi\fi
2768 }
2769 \def\scalefont#1#2{
2770 \eval_expr_to\d_count{#1}
2771 \x_resetint{x-scale}{\scale{\d_count}{\int{x-scale}}}
2772 \x_resetint{y-scale}{\scale{\d_count}{\int{y-scale}}}
2773 \x_resetint{slant-scale}{\scale{\d_count}{\int{slant-scale}}}
2774 #2
2775 }
2776 \def\xscalefont#1#2{
2777 \x_resetint{x-scale}{\scale{#1}{\int{x-scale}}}
2778 #2
2779 }
2780 \def\yscalefont#1#2{
2781 \eval_expr_to\d_count{#1}
2782 \x_resetint{y-scale}{\scale{\d_count}{\int{y-scale}}}
2783 \x_resetint{slant-scale}{\scale{\d_count}{\int{slant-scale}}}
2784 #2
2785 }
2786 \def\slantfont#1#2{
2787 \x_resetint{slant-scale}{
2788 \add{\scale{#1}{\int{x-scale}}}{\int{slant-scale}}
2789 }
2790 #2
2791 }
2792 \def\reencodefont#1#2{
2793 #2
2794 \resetstr{etx-name}{#1}
2795 }
2796 \def\mtxtomtx#1#2{{
2797 \let\a_macro=\empty_command
2798 \_a_true
2799 \ifnum \int{x-scale}=\int{y-scale}
2800 \ifnum \int{slant-scale}=\z@
2801 \_a_false
2802 \fi \fi
2803 \if_a_
2804 \a_count=\int{x-scale}
2805 \l_inv_scale\a_count{\int{y-scale}}
2806 \b_count=\int{slant-scale}
2807 \l_inv_scale\b_count{\int{y-scale}}
2808 \edef\a_macro{\a_macro
2809 \string\transformfont{\the\a_count}{\the\b_count}
2810 }
2811 \fi
2812 \open_out{\temp_prefix#2.mtx}
2813 \edef\raw_font_name{#2}
2814 \out_line{\percent_char~Filename:~#2.mtx}
2815 \out_line{\percent_char~Created~by:~tex~\jobname}
2816 \out_line{\percent_char~Created~using:~\string\mtxtomtx{#1}{#2}}
2817 \out_line{}
2818 \out_line{\percent_char~This~file~is~used~by~the~fontinst~package.}
2819 \out_line{}
2820 \out_line{\percent_char~THIS~FILE~CAN~BE~DELETED.}
2821 \out_line{}
2822 \out_line{\string\relax}
2823 \out_line{\string\metrics}
2824 \out_line{}
2825 \out_line{\string\needsfontinstversion{\fontinstversion}}
2826 \out_line{}
2827 \ifisstr{etx-name}\then
2828 \def\do_slot{\x_cs\edef{slots-\slot_name}{\the\slot_number}}
2829 \def\declarepsencoding##1##2##3{
2830 \a_toks={{##1}{##2}{##3}}
2831 \out_line{\string\providepsencoding\the\a_toks}
2832 \ifnum \transform_record_file=\closed_stream \else
2833 \pout_line\transform_record_file
2834 {\string\providepsencoding\the\a_toks}
2835 \fi
2836 }
2837 \directfalse
2838 \inputetx{\str{etx-name}}
2839 \edef\a_macro{\a_macro\string\reencodefont{\str{etx-name}}}
2840 \fi
2841 \record_transform{#2}{\string\frommtx{#1}}{\a_macro}\iftrue
2842 \out_line{}
2843 \mtxtomtx_redefinitions
2844 \inputmtx{#1}
2845 \out_line{}
2846 \out_line{\endmetrics_text}
2847 \close_out{Transformed~metrics}
2848 }}
2849 \def\mtxtomtx_redefinitions{
2850 \let\setint=\mtxtomtx_setint
2851 \let\setdim=\mtxtomtx_setdim
2852 \let\setstr=\mtxtomtx_setstr
2853 \let\setscaledrawglyph=\mtxtomtx_setscaledrawglyph
2854 \let\setscalednotglyph=\mtxtomtx_setscaledrawglyph
2855 \let\setkern=\mtxtomtx_setkern
2856 \let\setglyph=\mtxtomtx_setglyph
2857 \let\glyphpcc=\mtxtomtx_glyphpcc
2858 \let\samesize=\mtxtomtx_samesize
2859 \let\endsetglyph=\mtxtomtx_endsetglyph
2860 \def\aliased{\string\aliased}
2861 }
2862 \let\aliased=\second_of_two
2863 \def\mtxtomtx_setint#1#2{
2864 \def\a_macro{#1}
2865 \ifx \a_macro\italicslant_name
2866 \eval_expr{#2}
2867 \global\multiply \result \int{x-scale}
2868 \a_count=\int{slant-scale}
2869 \multiply \a_count \one_thousand
2870 \advance \a_count \result
2871 \divide \a_count \int{y-scale}\x_relax
2872 \else
2873 \def\do##1{
2874 \def\b_macro{##1}
2875 \ifx \a_macro\b_macro \expandafter\if_false \fi
2876 }
2877 \gobble_one\iftrue \width_ints_list \if_true
2878 \eval_expr_to\a_count{\scale{#2}{\int{y-scale}}}
2879 \else
2880 \eval_expr_to\a_count{\scale{#2}{\int{x-scale}}}
2881 \fi
2882 \fi
2883 \out_line{\string\setint{#1}{\the\a_count}}
2884 }
2885 \def\italicslant_name{italicslant}
2886 \def\width_ints_list{
2887 \do{interword}\do{stretchword}\do{shrinkword}\do{quad}
2888 \do{extraspace}\do{digitwidth}\do{verticalstem}
2889 }
2890 \def\mtxtomtx_setdim#1#2{
2891 \out_line{\string\setdim{#1}{#2}}
2892 }
2893 \def\mtxtomtx_setstr#1#2{
2894 \out_line{\string\setstr{#1}{#2}}
2895 }
2896 \def\mtxtomtx_setscaledrawglyph#1#2#3#4#5#6#7#8#9{
2897 \eval_expr_to\a_count{\scale{#6}{\int{x-scale}}}
2898 \eval_expr_to\b_count{\scale{#7}{\int{y-scale}}}
2899 \eval_expr_to\c_count{\scale{#8}{\int{y-scale}}}
2900 \eval_expr_to\d_count{#9} \eval_expr{#7}
2901 \multiply \d_count \int{x-scale}
2902 \global\multiply \result \int{slant-scale}
2903 \global\advance \result \d_count
2904 \rounded_thousandths
2905 \d_count=\result
2906 \eval_expr{\scale{#4}{\int{y-scale}}}
2907 \ifisstr{etx-name}\then
2908 \bgroup
2909 \let\aliased=\first_of_two
2910 \if_undefined{slots-#1}\then
2911 \egroup \e_count=\m@ne
2912 \else
2913 \expandafter\egroup \expandafter\e_count
2914 \csname slots-#1\endcsname
2915 \fi
2916 \else
2917 \e_count=#5
2918 \fi
2919 \out_line{
2920 \ifnum \e_count>\m@ne
2921 \string\setscaledrawglyph
2922 \else
2923 \string\setscalednotglyph
2924 \fi
2925 {#1}{\raw_font_name}{#3}{\the\result}{\the\e_count}
2926 {\the\a_count}{\the\b_count}{\the\c_count}{\the\d_count}
2927 }
2928 }
2929 \def\mtxtomtx_setkern#1#2#3{
2930 \eval_expr{\scale{\int{x-scale}}{#3}}
2931 \out_line{\string\setkern{#1}{#2}{\the\result}}
2932 }
2933 \def\mtxtomtx_setglyph#1{\out_line{\string\setglyph{#1}}}
2934 \def\mtxtomtx_samesize#1{\out_lline{\string\samesize{#1}}}
2935 \def\mtxtomtx_endsetglyph{\out_line{\string\endsetglyph}}
2936 \def\mtxtomtx_glyphpcc#1#2#3{
2937 \eval_expr_to\b_count{\scale{\int{y-scale}}{#3}}
2938 \eval_expr_to\a_count{#2} \eval_expr{#3}
2939 \multiply \a_count \int{x-scale}
2940 \global\multiply \result \int{slant-scale}
2941 \global\advance \result \a_count
2942 \rounded_thousandths
2943 \out_lline{\string\glyphpcc{#1}{\the\result}{\the\b_count}}
2944 }
2945 \def\reglyphfonts{
2946 \begingroup
2947 \let\setsomething_global=\x_relax
2948 \x_setint{renameweight}{1}
2949 \x_setint{killweight}{-10}
2950 \setcommand\iftokeep##1\then{\ifnum -1<##1}
2951 }
2952 \def\endreglyphfonts{\endgroup}
2953 \def\offmtxcommand#1{
2954 \x_cs\offcommand{reglyph_\expandafter\gobble_one\string#1}
2955 }
2956 \def\onmtxcommand#1{
2957 \x_cs\oncommand{reglyph_\expandafter\gobble_one\string#1}
2958 }
2959 \begingroup
2960 \catcode`\-=11
2961 \gdef\renameglyph#1#2{
2962 \x_cs\edef{slots-#2}{
2963 \noexpand\rename_glyph{#1}\noexpand\i-renameweight
2964 }
2965 }
2966 \endgroup
2967 \def\renameglyphweighted#1#2#3{
2968 \eval_expr{#3}
2969 \x_cs\edef{slots-#2}{\noexpand\rename_glyph{#1}{\the\result}}
2970 }
2971 \begingroup
2972 \catcode`\-=11
2973 \gdef\killglyph#1{
2974 \x_cs\def{slots-#1}{\kill_glyph\i-killweight}
2975 }
2976 \endgroup
2977 \def\killglyphweighted#1#2{
2978 \eval_expr{#2}
2979 \x_cs\edef{slots-#1}{\noexpand\kill_glyph{\the\result}}
2980 }
2981 \def\reglyphfont#1#2{
2982 \fromany{#2}
2983 \ifisstr{afm-name}\then
2984 \reglyph_font{#1}{#2}
2985 \else
2986 \fontinsterror{Reglyph}{Could~not~find~font~metrics~for~#2.}
2987 \error_help_a
2988 \fi
2989 }
2990 \def\reglyph_font#1#2{{
2991 \open_out{\temp_prefix#1.mtx}
2992 \out_line{\percent_char~Filename:~#1.mtx}
2993 \out_line{\percent_char~Created~by:~tex~\jobname}
2994 \out_line{\percent_char~Created~using:~\string\reglyphfont{#1}{#2}}
2995 \out_line{}
2996 \out_line{\percent_char~This~file~is~used~by~the~fontinst~package.}
2997 \out_line{}
2998 \out_line{\percent_char~THIS~FILE~CAN~BE~DELETED.}
2999 \out_line{}
3000 \out_line{\string\relax}
3001 \out_line{\string\metrics}
3002 \out_line{}
3003 \out_line{\string\needsfontinstversion{\fontinstversion}}
3004 \out_line{}
3005 \record_transform{#1}{\string\frommtx{#2}}{\string\reglyphfont}
3006 \iftrue
3007 \out_line{}
3008 \reglyph_redefinitions
3009 \inputmtx{#2}
3010 \out_line{}
3011 \out_line{\endmetrics_text}
3012 \close_out{Reglyphed~metrics}
3013 }}
3014 \def\reglyph_redefinitions{
3015 \let\setint=\reglyph_setint
3016 \let\setdim=\reglyph_setdim
3017 \let\setstr=\reglyph_setstr
3018 \let\setscaledrawglyph=\reglyph_setscaledrawglyph
3019 \let\setscalednotglyph=\reglyph_setscaledrawglyph
3020 \let\setkern=\reglyph_setkern
3021 \let\setglyph=\reglyph_setglyph
3022 \let\glyphpcc=\reglyph_glyphpcc
3023 \let\samesize=\reglyph_samesize
3024 \let\endsetglyph=\reglyph_endsetglyph
3025 }
3026 \def\reglyph_setint#1#2{\out_line{\string\setint{#1}{#2}}}
3027 \def\reglyph_setdim#1#2{\out_line{\string\setdim{#1}{#2}}}
3028 \def\reglyph_setstr#1#2{\out_line{\string\setstr{#1}{#2}}}
3029 \newcount\command_survivance
3030 \def\rename_glyph#1{\def\glyphname{#1}\kill_glyph}
3031 \def\kill_glyph#1{\advance \command_survivance #1\x_relax}
3032 \def\reglyph_setscaledrawglyph#1#2#3#4#5#6#7#8#9{
3033 \command_survivance=0
3034 \def\glyphname{#1}
3035 \csname slots-#1\endcsname
3036 \iftokeep\command_survivance\then
3037 \out_line{
3038 \ifnum #5<\z@
3039 \string\setscalednotglyph
3040 \else
3041 \string\setscaledrawglyph
3042 \fi
3043 {\glyphname}{#2}{#3}{\number#4}{#5}{#6}{#7}{#8}{#9}
3044 }
3045 \fi
3046 }
3047 \def\reglyph_setkern#1#2#3{
3048 \command_survivance=0
3049 \def\glyphname{#1}
3050 \csname slots-#1\endcsname
3051 \let\a_macro=\glyphname
3052 \def\glyphname{#2}
3053 \csname slots-#2\endcsname
3054 \iftokeep\command_survivance\then
3055 \out_line{\string\setkern{\a_macro}{\glyphname}{#3}}
3056 \fi
3057 }
3058 \def\reglyph_setglyph#1{
3059 \command_survivance=0
3060 \def\glyphname{#1}
3061 \csname slots-#1\endcsname
3062 \edef\a_macro{\noexpand\out_line{\string\setglyph{\glyphname}}}
3063 \a_toks=\expandafter{\a_macro}
3064 }
3065 \x_cs\def{off-\string\reglyph_setglyph}#1{\gobble_glyph}
3066 \def\reglyph_glyphpcc#1#2#3{
3067 \def\glyphname{#1}
3068 \csname slots-#1\endcsname
3069 \edef\a_macro{\noexpand\out_lline{
3070 \string\glyphpcc{\glyphname}{#2}{#3}
3071 }}
3072 \a_toks=\expandafter{\the\expandafter\a_toks \a_macro}
3073 }
3074 \def\reglyph_samesize#1{
3075 \def\glyphname{#1}
3076 \csname slots-#1\endcsname
3077 \edef\a_macro{\noexpand\out_lline{
3078 \string\samesize{\glyphname}
3079 }}
3080 \a_toks=\expandafter{\the\expandafter\a_toks \a_macro}
3081 }
3082 \def\reglyph_endsetglyph{
3083 \iftokeep\command_survivance\then
3084 \the\a_toks
3085 \out_line{\string\endsetglyph}
3086 \fi
3087 \a_toks={}
3088 }
3089 %%% From file: filtfam.dtx
3090 \def\latinfamily#1#2{{
3091 \edef\a_macro{#1}
3092 \expandafter\parse_family\a_macro
3093 \empty_command\empty_command\end_parse_family
3094 \installfonts
3095 \if_file_exists{\raw_encoding.mtx}\then
3096 \installfamily{\raw_encoding}{\latex_family}{#2}
3097 \fi
3098 \installfamily{OT1}{\latex_family}{#2}
3099 \installfamily{T1}{\latex_family}{#2}
3100 \installfamily{TS1}{\latex_family}{#2}
3101 \latin_weights
3102 \endinstallfonts
3103 }}
3104 \def\parse_family #1#2#3#4#5\end_parse_family{
3105 \gdef\font_family{#1#2#3}
3106 \gdef\font_variant{#4#5}
3107 \gdef\raw_variant{#4#5}
3108 \gdef\latex_family{#1#2#3#4#5}
3109 \_expert_false
3110 \_oldstyle_false
3111 \ifx#4x
3112 \_expert_true
3113 \gdef\raw_variant{#5}
3114 \gdef\font_variant{#5}
3115 %\setcommand\digit##1{##1}
3116 \else\ifx#4j
3117 \_expert_true
3118 \_oldstyle_true
3119 \gdef\raw_variant{#5}
3120 \gdef\font_variant{#5}
3121 %\setcommand\digit##1{##1oldstyle}
3122 \else\ifx#49
3123 \gdef\latex_family{#1#2#3j#5}
3124 \_expert_true
3125 \_oldstyle_true
3126 \gdef\raw_variant{#5}
3127 \gdef\font_variant{#5}
3128 %\setcommand\digit##1{##1oldstyle}
3129 \else
3130 \_expert_false
3131 \_oldstyle_false
3132 %\setcommand\digit##1{##1}
3133 \fi\fi\fi
3134 \if_oldstyle_
3135 \immediate\write16{INFO>~parse~family~<#1#2#3><#5>~(oldstyle)}
3136 \else\if_expert_
3137 \immediate\write16{INFO>~parse~family~<#1#2#3><#5>~(expert)}
3138 \else
3139 \immediate\write16{INFO>~parse~family~<#1#2#3><#4#5>}
3140 \fi\fi
3141 }
3142 \newif\if_expert_
3143 \newif\if_oldstyle_
3144 \def\latin_weight#1#2{
3145 \gdef\font_weight{#1}%
3146 \gdef\latex_weight{#2}%
3147 \latin_widths
3148 }
3149 \def\latin_width#1#2{
3150 \gdef\font_width{#1}
3151 \gdef\latex_width{#2}
3152 \latin_shapes
3153 }
3154 \def\latin_shape#1#2#3#4#5{
3155 \gdef\font_shape{#1}
3156 \gdef\raw_shape{#2}
3157 \gdef\encoding_shape{#3}
3158 \if_oldstyle_
3159 \gdef\encoding_shape{#3\oldstyle_shape}
3160 \fi
3161 \gdef\latex_shape{#4}
3162 \gdef\encoding_switches{#5}
3163 \immediate\write16{
3164 INFO>~to~make~LaTeX~font~shape~<\latex_family,
3165 \latex_weight,\latex_shape,\latex_width>~seek~
3166 \font_family\font_weight\raw_shape
3167 \raw_variant\raw_encoding\font_width.mtx}
3168 \csname fake_width_\font_width\endcsname
3169 \csname fake_shape_\raw_shape\endcsname
3170 \if_file_exists{
3171 \font_family\font_weight\raw_shape
3172 \raw_variant\raw_encoding\font_width.mtx
3173 }\then
3174 \latin_encodings
3175 \fi
3176 }
3177 \def\fake_shape_{
3178 \if_file_exists{
3179 \font_family\font_weight\raw_shape\raw_variant
3180 \adobe_encoding\font_width.afm
3181 }\then
3182 \fake_shape_raw_encoding
3183 \fi
3184 \if_expert_
3185 \if_file_exists{
3186 \font_family\font_weight\raw_shape\raw_variant
3187 \expert_encoding\font_width.afm
3188 }\then
3189 \fake_shape_expert_encoding
3190 \fi
3191 \fi
3192 \if_oldstyle_
3193 \gdef\oldstyle_variant{\oldstyle_shape}
3194 \if_file_exists{
3195 \font_family\font_weight\raw_shape\oldstyle_variant
3196 \adobe_encoding\font_width.afm
3197 }\then
3198 \fake_shape_oldstyle_encoding
3199 \else
3200 \gdef\oldstyle_variant{\caps_shape}
3201 \if_file_exists{
3202 \font_family\font_weight\raw_shape\oldstyle_variant
3203 \adobe_encoding\font_width.afm
3204 }\then
3205 \fake_shape_oldstyle_encoding
3206 \fi
3207 \fi
3208 \fi
3209 }
3210 \def\fake_shape_raw_encoding{
3211 \if_file_exists{
3212 \font_family\font_weight\raw_shape\raw_variant
3213 \raw_encoding\font_width.mtx
3214 }\then % no action required
3215 \else
3216 \immediate\write16{
3217 INFO>~run~\string\transformfont\space\space
3218 <\font_family\font_weight\raw_shape\raw_variant
3219 \raw_encoding\font_width>~from~
3220 <\font_family\font_weight\raw_shape\raw_variant
3221 \adobe_encoding\font_width>
3222 }
3223 \transformfont{
3224 \font_family\font_weight\raw_shape\raw_variant
3225 \raw_encoding\font_width
3226 }{
3227 \reencodefont{\raw_encoding}{
3228 \fromafm{
3229 \font_family\font_weight\raw_shape\raw_variant
3230 \adobe_encoding\font_width
3231 }
3232 }
3233 }
3234 \if_file_exists{ \raw_encoding.mtx }\then
3235 \immediate\write16{
3236 INFO>~run~\string\installrawfont\space
3237 <\font_family\font_weight\font_shape\raw_variant
3238 \raw_encoding\font_width>
3239 <\font_family\font_weight\raw_shape\raw_variant
3240 \raw_encoding\font_width,
3241 \raw_encoding>
3242 <\raw_encoding>
3243 <\raw_encoding>
3244 <\latex_family>
3245 <\latex_weight\latex_width>
3246 <\latex_shape>}
3247 \installrawfont{
3248 \font_family\font_weight\raw_shape\raw_variant
3249 \raw_encoding\font_width
3250 }{ \font_family\font_weight\raw_shape\raw_variant
3251 \raw_encoding\font_width,
3252 \raw_encoding
3253 }{ \raw_encoding
3254 }{ \raw_encoding
3255 }{ \latex_family
3256 }{ \latex_weight\latex_width
3257 }{ \latex_shape
3258 }{}
3259 \fi
3260 \fi
3261 }
3262 \def\fake_shape_expert_encoding{
3263 \if_file_exists{
3264 \font_family\font_weight\raw_shape\raw_variant
3265 \expert_encoding\font_width.mtx
3266 }\then % no action required
3267 \else
3268 \fromafm{
3269 \font_family\font_weight\raw_shape\raw_variant
3270 \expert_encoding\font_width
3271 }
3272 \fi
3273 }
3274 \def\fake_shape_oldstyle_encoding{
3275 \if_file_exists{
3276 \font_family\font_weight\raw_shape\oldstyle_variant
3277 \adobe_encoding\font_width.mtx
3278 }\then % no action required
3279 \else
3280 \immediate\write16{
3281 INFO>~run~\string\transformfont\space\space
3282 <\font_family\font_weight\raw_shape\oldstyle_variant
3283 \raw_encoding\font_width>~from~
3284 <\font_family\font_weight\raw_shape\oldstyle_variant
3285 \adobe_encoding\font_width>
3286 }
3287 \transformfont{
3288 \font_family\font_weight\raw_shape\oldstyle_variant
3289 \raw_encoding\font_width
3290 }{
3291 \reencodefont{\raw_encoding}{
3292 \fromafm{
3293 \font_family\font_weight\raw_shape\oldstyle_variant
3294 \adobe_encoding\font_width
3295 }
3296 }
3297 }
3298 \fi
3299 }
3300 \def\fake_shape_c{
3301 \if_file_exists{
3302 \font_family\font_weight\raw_shape\raw_variant
3303 \adobe_encoding\font_width.afm
3304 }\then
3305 \fake_shape_
3306 \else
3307 % If real smallcaps font doesn't exist, fake it from the roman.
3308 \gdef\raw_shape{}
3309 \if_oldstyle_
3310 \gdef\encoding_shape{cj}
3311 \else
3312 \gdef\encoding_shape{c}
3313 \fi
3314 \fake_shape_
3315 \fi
3316 }
3317 \def\fake_shape_o{
3318 \if_file_exists{
3319 \font_family\font_weight\raw_shape\raw_variant
3320 \adobe_encoding\font_width.afm
3321 }\then
3322 \fake_shape_
3323 \else
3324 \fake_shape_o_raw_encoding
3325 \if_expert_
3326 \fake_shape_o_expert_encoding
3327 \fi
3328 \if_oldstyle_
3329 \fake_shape_o_oldstyle_encoding
3330 \fi
3331 \fi
3332 }
3333 \def\fake_shape_o_raw_encoding{
3334 \if_file_exists{
3335 \font_family\font_weight\raw_variant
3336 \raw_encoding\font_width.mtx
3337 }\then
3338 \if_file_exists{
3339 \font_family\font_weight\font_shape\raw_variant
3340 \raw_encoding\font_width.mtx
3341 }\then % no action required
3342 \else
3343 \immediate\write16{
3344 INFO>~run~\string\transformfont\space\space
3345 <\font_family\font_weight\font_shape\raw_variant
3346 \raw_encoding\font_width>~from~
3347 <\font_family\font_weight\raw_variant
3348 \raw_encoding\font_width>~(faking~oblique)
3349 }
3350 %%% WARNING: famtool.pl relies on this message format!!!
3351 \immediate\write16{
3352 Faking~oblique~font~
3353 \font_family\font_weight\font_shape\raw_variant
3354 \raw_encoding\font_width
3355 \space from~
3356 \font_family\font_weight\raw_variant
3357 \raw_encoding\font_width
3358 }
3359 \transformfont{
3360 \font_family\font_weight\font_shape\raw_variant
3361 \raw_encoding\font_width
3362 }{
3363 \slantfont{\SlantAmount}{
3364 \frommtx{
3365 \font_family\font_weight\raw_variant
3366 \raw_encoding\font_width
3367 }
3368 }
3369 }
3370 \if_file_exists{ \raw_encoding.mtx }\then
3371 \immediate\write16{
3372 INFO>~run~\string\installrawfont\space
3373 <\font_family\font_weight\font_shape\raw_variant
3374 \raw_encoding\font_width>
3375 <\font_family\font_weight\font_shape\raw_variant
3376 \raw_encoding\font_width,
3377 \raw_encoding>
3378 <\raw_encoding>
3379 <\raw_encoding>
3380 <\latex_family>
3381 <\latex_weight\latex_width>
3382 <\latex_shape>}
3383 \installrawfont{
3384 \font_family\font_weight\font_shape\raw_variant
3385 \raw_encoding\font_width
3386 }{ \font_family\font_weight\font_shape\raw_variant
3387 \raw_encoding\font_width,
3388 \raw_encoding
3389 }{ \raw_encoding
3390 }{ \raw_encoding
3391 }{ \latex_family
3392 }{ \latex_weight\latex_width
3393 }{ \latex_shape
3394 }{}
3395 \fi
3396 \fi
3397 \fi
3398 }
3399 \def\fake_shape_o_expert_encoding{
3400 \if_file_exists{
3401 \font_family\font_weight\raw_variant
3402 \expert_encoding\font_width.mtx
3403 }\then
3404 \if_file_exists{
3405 \font_family\font_weight\font_shape\raw_variant
3406 \expert_encoding\font_width.mtx
3407 }\then % no action required
3408 \else
3409 \immediate\write16{
3410 INFO>~run~\string\transformfont\space\space
3411 <\font_family\font_weight\font_shape\raw_variant
3412 \expert_encoding\font_width>~from~
3413 <\font_family\font_weight\raw_variant
3414 \expert_encoding\font_width>~(faking~oblique)
3415 }
3416 %%% WARNING: famtool.pl relies on this message format!!!
3417 \immediate\write16{
3418 Faking~oblique~font~
3419 \font_family\font_weight\font_shape\raw_variant
3420 \expert_encoding\font_width
3421 \space from~
3422 \font_family\font_weight\raw_variant
3423 \expert_encoding\font_width
3424 }
3425 \transformfont{
3426 \font_family\font_weight\font_shape\raw_variant
3427 \expert_encoding\font_width
3428 }{
3429 \slantfont{\SlantAmount}{
3430 \frommtx{
3431 \font_family\font_weight\raw_variant
3432 \expert_encoding\font_width
3433 }
3434 }
3435 }
3436 \fi
3437 \fi
3438 }
3439 \def\fake_shape_o_oldstyle_encoding{
3440 \if_file_exists{
3441 \font_family\font_weight\oldstyle_variant
3442 \raw_encoding\font_width.mtx
3443 }\then
3444 \if_file_exists{
3445 \font_family\font_weight\font_shape\oldstyle_variant
3446 \raw_encoding\font_width.mtx
3447 }\then % no action required
3448 \else
3449 \immediate\write16{
3450 INFO>~run~\string\transformfont\space\space
3451 <\font_family\font_weight\font_shape\oldstyle_variant
3452 \raw_encoding\font_width>~from~
3453 <\font_family\font_weight\oldstyle_variant
3454 \raw_encoding\font_width>~(faking~oblique)
3455 }
3456 %%% WARNING: famtool.pl relies on this message format!!!
3457 \immediate\write16{
3458 Faking~oblique~font~
3459 \font_family\font_weight\font_shape\oldstyle_variant
3460 \raw_encoding\font_width
3461 \space from~
3462 \font_family\font_weight\oldstyle_variant
3463 \raw_encoding\font_width
3464 }
3465 \transformfont{
3466 \font_family\font_weight\font_shape\oldstyle_variant
3467 \raw_encoding\font_width
3468 }{
3469 \slantfont{\SlantAmount}{
3470 \frommtx{
3471 \font_family\font_weight\oldstyle_variant
3472 \raw_encoding\font_width
3473 }
3474 }
3475 }
3476 \fi
3477 \fi
3478 }
3479 \let\fake_shape_i\fake_shape_ % We must do this again!
3480 \newif\if_fake_narrow_
3481 \_fake_narrow_false
3482 \def\fakenarrow#1{
3483 \_fake_narrow_true
3484 \gdef\fake_narrow_width{#1}
3485 }
3486 \def\fake_width_{}
3487 \def\fake_width_c{}
3488 \def\fake_width_n{
3489 \if_fake_narrow_
3490 \if_file_exists{
3491 \font_family\font_weight\raw_shape\raw_variant
3492 \adobe_encoding\font_width.afm
3493 }\then % no action required
3494 \else
3495 \fake_width_n_raw_encoding
3496 \if_expert_
3497 \fake_width_n_expert_encoding
3498 \fi
3499 \fi
3500 \fi
3501 }
3502 \def\fake_width_n_raw_encoding{
3503 \if_file_exists{
3504 \font_family\font_weight\font_shape\raw_variant
3505 \raw_encoding.mtx
3506 }\then
3507 \if_file_exists{
3508 \font_family\font_weight\font_shape\raw_variant
3509 \raw_encoding\font_width.mtx
3510 }\then % no action required
3511 \else
3512 \immediate\write16{
3513 INFO>~run~\string\transformfont\space\space
3514 <\font_family\font_weight\font_shape\raw_variant
3515 \raw_encoding\font_width>~from~
3516 <\font_family\font_weight\font_shape\raw_variant
3517 \raw_encoding>~(faking~narrow)
3518 }
3519 %%% WARNING: famtool.pl relies on this message format!!!
3520 \immediate\write16{
3521 Faking~narrow~font~
3522 \font_family\font_weight\font_shape\raw_variant
3523 \raw_encoding\font_width
3524 \space from~
3525 \font_family\font_weight\font_shape\raw_variant
3526 \raw_encoding
3527 }
3528 \transformfont{
3529 \font_family\font_weight\font_shape\raw_variant
3530 \raw_encoding\font_width
3531 }{
3532 \xscalefont{\fake_narrow_width}{
3533 \frommtx{
3534 \font_family\font_weight\font_shape\raw_variant
3535 \raw_encoding
3536 }
3537 }
3538 }
3539 \if_file_exists{ \raw_encoding.mtx }\then
3540 \immediate\write16{
3541 INFO>~run~\string\installrawfont\space
3542 <\font_family\font_weight\font_shape\raw_variant
3543 \raw_encoding\font_width>
3544 <\font_family\font_weight\font_shape\raw_variant
3545 \raw_encoding\font_width,
3546 \raw_encoding>
3547 <\raw_encoding>
3548 <\raw_encoding>
3549 <\latex_family>
3550 <\latex_weight\latex_width>
3551 <\latex_shape>}
3552 \installrawfont{
3553 \font_family\font_weight\font_shape\raw_variant
3554 \raw_encoding\font_width
3555 }{ \font_family\font_weight\font_shape\raw_variant
3556 \raw_encoding\font_width,
3557 \raw_encoding
3558 }{ \raw_encoding
3559 }{ \raw_encoding
3560 }{ \latex_family
3561 }{ \latex_weight\latex_width
3562 }{ \latex_shape
3563 }{}
3564 \fi
3565 \fi
3566 \fi
3567 }
3568 \def\fake_width_n_expert_encoding{
3569 \if_file_exists{
3570 \font_family\font_weight\font_shape\raw_variant
3571 \expert_encoding.mtx
3572 }\then
3573 \if_file_exists{
3574 \font_family\font_weight\font_shape\raw_variant
3575 \expert_encoding\font_width.mtx
3576 }\then % no action required
3577 \else
3578 \immediate\write16{
3579 INFO>~run~\string\transformfont\space\space
3580 <\font_family\font_weight\font_shape\raw_variant
3581 \expert_encoding\font_width>~from~
3582 <\font_family\font_weight\font_shape\raw_variant
3583 \expert_encoding>~(faking~narrow)
3584 }
3585 %%% WARNING: famtool.pl relies on this message format!!!
3586 \immediate\write16{
3587 Faking~narrow~font~
3588 \font_family\font_weight\font_shape\raw_variant
3589 \expert_encoding\font_width
3590 \space from~
3591 \font_family\font_weight\font_shape\raw_variant
3592 \expert_encoding
3593 }
3594 \transformfont{
3595 \font_family\font_weight\font_shape\raw_variant
3596 \expert_encoding\font_width
3597 }{
3598 \xscalefont{\fake_narrow_width}{
3599 \frommtx{
3600 \font_family\font_weight\font_shape\raw_variant
3601 \expert_encoding
3602 }
3603 }
3604 }
3605 \fi
3606 \fi
3607 }
3608 \def\latin_encoding#1#2#3#4#5{
3609 \gdef\latex_encoding{#4}
3610 \gdef\latex_mtx{#5}
3611 \if_oldstyle_
3612 \gdef\font_encoding{#3}
3613 \else\if_expert_
3614 \gdef\font_encoding{#2}
3615 \else
3616 \gdef\font_encoding{#1}
3617 \fi\fi
3618 \gdef\expert_font{}
3619 \gdef\oldstyle_font{}
3620 \if_expert_
3621 \if_file_exists{
3622 \font_family\font_weight\raw_shape\raw_variant
3623 \expert_encoding\font_width.mtx
3624 }\then
3625 \gdef\expert_font{
3626 \font_family\font_weight\raw_shape\raw_variant
3627 \expert_encoding\font_width,
3628 }
3629 \fi
3630 \fi
3631 \if_oldstyle_
3632 \if_file_exists{
3633 \font_family\font_weight\raw_shape\oldstyle_variant
3634 \raw_variant\raw_encoding\font_width.mtx
3635 }\then
3636 \gdef\oldstyle_font{
3637 unsetnum,
3638 \font_family\font_weight\raw_shape\oldstyle_variant
3639 \raw_variant\raw_encoding\font_width,
3640 resetosf,
3641 }
3642 \fi
3643 \fi
3644 \immediate\write16{
3645 INFO>~run~\string\installfont\space
3646 <\font_family\font_weight\font_shape\font_variant
3647 \font_encoding\font_width>
3648 <\font_family\font_weight\raw_shape\raw_variant
3649 \raw_encoding\font_width,
3650 \if_oldstyle_
3651 \ifx\raw_shape\caps_shape
3652 resetosf,
3653 \fi
3654 \fi
3655 \expert_font
3656 \oldstyle_font
3657 \latex_mtx>
3658 <\latex_encoding\encoding_shape>
3659 <\latex_encoding>
3660 <\latex_family>
3661 <\latex_weight\latex_width>
3662 <\latex_shape>}
3663 \installfont{
3664 \font_family\font_weight\font_shape\font_variant
3665 \font_encoding\font_width
3666 }{
3667 \font_family\font_weight\raw_shape\raw_variant
3668 \raw_encoding\font_width,
3669 \if_oldstyle_
3670 \ifx\raw_shape\caps_shape
3671 resetosf,
3672 \fi
3673 \fi
3674 \expert_font
3675 \oldstyle_font
3676 \latex_mtx
3677 }{
3678 \latex_encoding\encoding_shape
3679 }{
3680 \latex_encoding
3681 }{
3682 \latex_family
3683 }{
3684 \latex_weight\latex_width
3685 }{
3686 \latex_shape
3687 }{}
3688 }
3689 \def\latin_weights{
3690 \latin_weight{r}{m}
3691 \latin_weight{k}{m}
3692 \latin_weight{b}{b}
3693 \latin_weight{s}{sb}
3694 \latin_weight{d}{db} % was {d}{sb}, SPQR changed
3695 \latin_weight{m}{mb} % was {m}{m}, UV changed
3696 \latin_weight{c}{eb} % UV added
3697 \latin_weight{h}{eb} % UV added
3698 \latin_weight{x}{eb}
3699 \latin_weight{u}{ub}
3700 \latin_weight{l}{l}
3701 %\latin_weight{j}{el}
3702 %\latin_weight{a}{ul} % UV added
3703 }
3704 \def\latin_widths{
3705 \latin_width{}{}
3706 \latin_width{n}{c}
3707 %latin_width{c}{c}
3708 %latin_width{x}{x}
3709 }
3710 \def\latin_shapes{
3711 \latin_shape{} {} {} {n} {\_textcomp_true }
3712 \latin_shape{c}{c}{} {sc}{\_textcomp_false}
3713 \latin_shape{o}{o}{} {sl}{\_textcomp_true }
3714 \latin_shape{i}{i}{i}{it}{\_textcomp_true }
3715 }
3716 \def\latin_encodings{
3717 \latin_encoding{7t}{9t}{9o}{OT1}{newlatin}
3718 \latin_encoding{8t}{9e}{9d}{T1} {newlatin}
3719 \encoding_switches
3720 \if_textcomp_
3721 \latin_encoding{8c}{9c}{9c}{TS1}{textcomp}
3722 \fi
3723 }
3724 \newif\if_textcomp_
3725
3726 \def\raw_encoding{8r}
3727 \def\adobe_encoding{8a}
3728 \def\expert_encoding{8x}
3729
3730 \def\caps_shape{c}
3731 \def\oldstyle_shape{j}
3732 \def\SlantAmount{167}
3733 %%% From file: fimapgen.dtx
3734 \def\mapfrags_subsystem{Map~fragments~writer}
3735 \def\recordtransforms#1{\open_pout\transform_record_file{#1}}
3736 \def\endrecordtransforms{
3737 \close_pout\transform_record_file{Font~transformation~records}
3738 }
3739 \chardef\transform_record_file=\closed_stream
3740 \let\storemapdata=\gobble_three
3741 \def\record_transform#1#2#3#4{
3742 \ifnum \transform_record_file=\closed_stream \else
3743 \pout_line\transform_record_file{\string\storemapdata{#1}{#2}{#3}}
3744 \fi
3745 #4 \out_line{\string\storemapdata{#1}{#2}{#3}} \fi
3746 }
3747 \def\record_usage#1{
3748 \ifnum \transform_record_file=\closed_stream \else
3749 \pout_line\transform_record_file{\string\makemapentry{#1}}
3750 \fi
3751 }
3752 \let\declarepsencoding=\gobble_three
3753 \let\providepsencoding=\gobble_three
3754 %%% From file: fibasics.dtx
3755 \def\needsfontinstversion#1{{
3756 \a_dimen=#1pt
3757 \b_dimen=\fontinstversion~pt\x_relax
3758 \ifnum\a_dimen>\b_dimen
3759 \immediate\write16{}
3760 \immediate\write16{Warning:~This~file~needs~fontinst~version~#1.}
3761 \immediate\write16{Warning:~You~are~using~version~
3762 \fontinstversion.}
3763 \immediate\write16{Warning:~This~may~cause~errors.}
3764 \immediate\write16{}
3765 \fi
3766 }}
3767 \if_file_exists{fontinst.rc}\then
3768 \primitiveinput fontinst.rc
3769 \else
3770 \immediate\write16{No~file~fontinst.rc.}
3771 \fi
3772 \normalcc
3773 \endinput
3774 %%
3775 %% End of file `xfntinst.sty'.