diff options
Diffstat (limited to 'Master/texmf-dist/tex/csplain/fonts/ff-mac.tex')
-rw-r--r-- | Master/texmf-dist/tex/csplain/fonts/ff-mac.tex | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex index 4d4a06d790c..8ebb89976ae 100644 --- a/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex +++ b/Master/texmf-dist/tex/csplain/fonts/ff-mac.tex @@ -40,47 +40,64 @@ \ifx\protected\undefined \let\tryprotected=\relax \ifx\addprotect\undefined \else - \addprotect\ffvars \addprotect\ffsetV \addprotect\ffsetY + \def\tryprotected#1#2{\addprotect#2#1#2} \fi \else \let\tryprotected=\protected \fi +\ifx\rfontskipat\undefined \input csfontsm \fi + \tryprotected\def\ffvars#1#2#3#4{% \def\ffvarY##1{\ifcase##1 #1\or#2\or#3\or#4\fi}% } \tryprotected\def\ffsetV#1#2{\expandafter\def\csname #1V\endcsname{#2}} -\long\def\ffsetX#1{\ifx#1\fam \ffsetY=\else +\long\def\ffsetX#1{\ifx#1\fam \ffsetY=\else \ifx#1\one \ffsetY+\else \ifx#1\rm \ffsetY0\else \ifx#1\bf \ffsetY1\else \ifx#1\it \ffsetY2\else \ifx#1\bi \ffsetY3\else - \ffsetZ#1\fi\fi\fi\fi\fi + \ffsetZ#1\fi\fi\fi\fi\fi\fi } -\def\ffsetZ#1\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi#1} +\def\ffsetZ#1\fi\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi\fi#1} +\ifx\one\undefined \def\one{1}\fi % Something more specific than \undefined. + % User can re-define it without problems. \tryprotected\def\ffsetY#1{% - \ifx=#1\ffsetW0\tenrm \ffsetW1\tenbf \ffsetW2\tenit \ffsetW3\tenbi - \else \edef\ffvarV{\ffvarY{#1}}% - \if!\ffvarV\else \ffsetF\ffmodfont\ffmodfont \fi - \fi -} -\def\ffsetF#1{% - \ifx\dgsize\undefined - \expandafter\readsizespec\sizespec at\relax - \font#1=\whichtfm{\ffnamegen} \sizespec\relax - \let\dgsize=\undefined - \else \font#1=\whichtfm{\ffnamegen} \sizezpec\relax - \fi + \ifx=#1\ffsetS \ffsetW0\tenrm \ffsetW1\tenbf \ffsetW2\tenit \ffsetW3\tenbi + \ffsetT{\tenrm}{\tenbf}{\tenit}{\tenbi}% + \else \ifx+#1\ffsetS \ffsetT{\ffsetX\rm}{\ffsetX\bf}{\ffsetX\it}{\ffsetX\bi}% + \else \edef\ffvarV{\ffvarY{#1}}% + \if!\ffvarV\else \def\ffvarN{#1}\ffsetF\ffmodfont\ffmodfont \fi + \fi\fi +} +\def\ffsetF#1#2{% + \ffnametest\iftrue + \ifx\dgsize\undefined + \expandafter\readsizespec\sizespec at\relax + \font#1=\whichtfm{\ffnamegen} \sizespec\relax + \let\dgsize=\undefined + \else \font#1=\whichtfm{\ffnamegen} \sizespec\relax + \fi #2\fi +} +\let\ffnametest=\relax + +\def\ffsetS{\expandafter\ifx\the\font\tenrm \def\ffvarN{0}% + \else \expandafter\ifx\the\font\tenbf \def\ffvarN{1}% + \else \expandafter\ifx\the\font\tenit \def\ffvarN{2}% + \else \expandafter\ifx\the\font\tenbi \def\ffvarN{3}\fi\fi\fi\fi +} +\def\ffsetT#1#2#3#4{\ifx\ffvarN\undefined \else + \ifcase\ffvarN\space #1\or#2\or#3\or#4\fi\fi } \def\readsizespec#1at#2\relax{\ifx!#2\def\dgsize{#1}\else \ifx\relax#2\relax \def\dgsize{10pt}\else \readsizespec#2!\relax\fi\fi } \def\ffsetW#1#2{\edef\ffvarV{\ffvarY{#1}}% - \expandafter\ifx\the\font#2\ffsetF#2#2\else\ffsetF#2\fi + \if!\ffvarV\else \ffsetF#2\relax\fi } \def\ismacro#1#2#3{\def\tmp{#2}\ifx#1\tmp} \def\ffletfont#1=#2#3{% {\def\sizespec{#3}\let\ffsetFa=\ffsetF - \def\ffsetF##1##2{\ffsetFa#1}\def\ffsetW##1##2{}% + \def\ffsetF##1##2{\ffsetFa#1\relax}\def\ffsetW##1##2{}% \ffsetX#2\global\let\tmp=#1}\let#1=\tmp } \ifx\regtfm\undefined %%%%% \regtfm, \whichtfm from ams-math.tex: @@ -132,7 +149,7 @@ \def\useff#1{} % do nothing with non U encoding -\ismacro\fotenc{U}\iftrue\else \endinput \fi %%%%%%%%%%%%%%%%%%% +\ismacro\fotenc{U}\iftrue\else \ismacro\fotenc{sU}\iftrue\else \endinput \fi\fi %%%%%% \ifx\directlua\undefined \else \ifx\luafonts\undefined \input luafonts \fi\fi % lua code to re-define \font primitive @@ -143,6 +160,5 @@ \def\useff#1{\ffsetU{#1}\ffsetX} \tryprotected\def\ffsetU#1{\edef\fontfeatures{\fontfeatures;#1}} -\ifx\tryprotected\relax \ifx\addprotect\undefined \else \addprotect\ffsetU \fi\fi \endinput |