summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/plain/pdcmac/pdcfsel.tex
blob: 3b68aada1abcbee40aaceb9deb809dc6df0f795e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
% pdcfsel.tex -- macros for loading fonts -*-tex-*-

%%%@TeX-document-file {
%%% title      = "PDC Font Selection Scheme",
%%% filename   = "$texmf/tex/plain/pdcmac/pdcfsel.tex",
%%% version    = "3.5",
%%% Date       = "1995/03/28",
%%% creator    = "pdcfsel.dtx",
%%% package    = "pdcmac 1.0",
%%% author     = "P. Damian Cugley",
%%% email      = "damian.cugley@comlab.ox.ac.uk",
%%% address    = "Oxford University Computing Laboratory,"
%%%               Parks Road, Oxford  OX1 3QD, UK",
%%% abstract   = "A file of definitions for managing font
%%%               selection in documents based on the plain
%%%               TeX macros.
%%%                 This file was generated by running
%%%               plain TeX on pdcfsel.dtx.",
%%% dependencies = ""
%%%}

\message{3.5 <pdc 1995/03/28>}
\def\expcs#1#2{\expandafter#1\csname#2\endcsname}
\def\noexpcs{\expcs\noexpand}
\newif\ifFSELautoload
\def\autoloadfonts{
    \FSELautoloadtrue
    \csname newwrite\endcsname \FSELfile
    \immediate\openout\FSELfile=\jobname.fnt
}
\def\loadfont#1#2{%
    \ifx#1\relax
        \FSELloadfont#1{#2}%
    \else\ifx#1\UNDEFINED
        \FSELloadfont#1{#2}%
    \fi\fi
}
\def\FSELloadfont#1#2{%
    \ifFSELautoload
        \edef#1{%
            \write\FSELfile{#2}%
            \def\noexpand\subfont{\global\font\noexpand#1cmr10 }%
            \global\font\noexpand#1#2\relax
            \noexpand\everyloadfont\noexpand#1{#2}%
            \noexpand#1%
        }%
    \else
        \global\font#1#2\relax  \everyloadfont#1{#2}%
    \fi
}
\def\everyloadfont#1#2{}
\def\xfontset#1#2#3{
    \def\f##1##2{\expcs\loadfont{#1##1}{##2#3}}
    \let\m=\f \let\M=\f
    \def\@##1##2##3{\expcs\loadfont{#1##2}{##3 at #3pt }}
    #2
}
% Set up a fontset -- define \#1fonts
\def\fontset#1#2#3#4#5#6{%
    \xfontset{#1}{#2}{#3}%
    \expcs\edef{#1fonts}{%
       \ifFSELautoload \noexpcs{#1mathsfonts}\fi
       \noexpand\FSELnicknames{#1}{#5}{#6}\noexpand#2%
       \noexpand\setbaselineskip{#4}%
       \noexpand\rm
    }%
    \ifFSELautoload
       \expcs\def{#1mathsfonts}{\FSELloadmaths{#1}{#5}{#6}#2}%
    \fi
}
\def\FSELnicknames#1#2#3{%
    \let\@\relax
    \def\f##1##2{%
       \expcs\edef{##1}{\noexpcs{#1##1}}%
    }%
    \def\m##1##2{%
       \expcs\textfont{##1fam}\csname#1##1\endcsname
       \expcs\scriptfont{##1fam}\csname#2##1\endcsname
       \expcs\edef{##1}{%
           \fam\expcs\noexpand{##1fam}%
           \expcs\noexpand{#1##1}%
       }%
    }%
    \def\M##1{%
       \expcs\scriptscriptfont{##1fam}\csname#3##1\endcsname
       \m{##1}%
    }%
}
\def\setbaselineskip#1{%
    \baselineskip#1\relax \normalbaselineskip\baselineskip
    \jot0.25\baselineskip
    \smallskipamount 0.25\baselineskip plus 0.083\baselineskip
       minus 0.083\baselineskip
    \medskipamount 0.5\baselineskip plus 0.167\baselineskip
       minus 0.167\baselineskip
    \bigskipamount 1\baselineskip plus 0.333\baselineskip
       minus 0.333\baselineskip
    \abovedisplayskip\medskipamount
    \abovedisplayshortskip\abovedisplayskip
    \advance\abovedisplayshortskip-1\abovedisplayskip
    \belowdisplayskip\medskipamount
    \belowdisplayshortskip\smallskipamount
}
\def\FSELloadmaths#1#2#3{%
    \let\@\relax \def\f##1##2{}%
    \def\m##1##2{\csname#1##1\endcsname \csname#2##1\endcsname}%
    \def\M##1{\csname#3##1\endcsname \m{##1}}%
    \global\expcs\let{#1mathsfonts}\relax
}
\chardef\rmfam=0 \chardef\mifam=1 \chardef\syfam=2