fontideas.tex (2491B)
1 \Fhsize \Ftsize \Fssize \Fzsize 2 3 % \italcorr is like primitive \/, except it works with arbitrary intervening 4 % glues, kerns, and penalties. 5 % TODO: peek inside hboxes to insert italic correction 6 \newbox\@icsave 7 \def\italcorr{% 8 \ifvmode \errmessage{You can't use `\string\italcorr' in vertical mode}\fi 9 \setbox\@icsave=\hbox{}% 10 % while lastnodetype == glue|kern|penalty, save node in box 11 \loop\if1\ifcase\numexpr\lastnodetype-11\relax 12 1% glue 13 \skipA=\lastskip \unskip 14 \setbox\@icsave=\hbox{\hskip\skipA \unhbox\@icsave}% 15 \or 1% kern 16 \dimenA=\lastkern \unkern 17 \setbox\@icsave=\hbox{\kern\dimenA \unhbox\@icsave}% 18 \or 1% penalty 19 \countA=\lastpenalty \unpenalty 20 \setbox\@icsave=\hbox{\penalty\countA \unhbox\@icsave}% 21 \else 0% other 22 \fi 23 \repeat 24 \/\unhbox\@icsave 25 } 26 27 \newtoks\icblacklist \icblacklist={\\.\\,} 28 \newif\if@ic 29 \def\tryitalcorr{\ifvmode \else \ea\@tryitalcorrA \fi} 30 \def\@tryitalcorrA{\futurelet\@next\@tryitalcorrB} 31 \def\@tryitalcorrB{% 32 \@ictrue 33 \def\\##1{\if##1\@next \@icfalse \fi}% 34 \the\icblacklist 35 \if@ic \italcorr \fi 36 } 37 38 \newcount\Fscale 39 \def\@gobblesemi#1;{} 40 \def\\#1:#2 {% 41 \afterassignment\@gobblesemi \dimenA=#1pt;% 42 \ifdim\size<\dimenA 43 \font\f=#2 44 \def\\#1:#2 {} 45 \fi 46 } 47 48 \def\bold{\fmix\bf} 49 \def\ftoggle#1{} 50 \def\fmix#1{} 51 \def\stydef#1{% 52 \ea\newif\begcs ifsty\csstring#1\endcs 53 \ea\gdef\ea#1\ea{% 54 \begcs\csstring#1init\ea\endcs 55 \begcs\csstring#1text\ea\endcs 56 \begcs\csstring#1math\endcs 57 } 58 } 59 60 \propdef\it 61 \propdef\bf 62 \propdef\sc 63 64 ROMAN CLASS 65 rm 66 bf 67 it 68 it bf 69 sl 70 sl bf 71 sc 72 sc bf 73 74 SANS CLASS 75 ss 76 ss bf 77 ss it 78 ss it bf 79 ss sl 80 ss sl bf 81 ss sc 82 ss sc bf 83 84 MONO CLASS 85 tt 86 ... 87 88 MATH CLASS ? 89 rm var 90 bf var 91 bb 92 frak 93 cal 94 scr 95 96 97 \vardef=\FHcmr 98 \vardef\it=\FHcmti 99 \vardef\bf=\FHcmbx 100 \vardef\it\bf=\FHcmbxti 101 102 % Same thing: 103 \stydef\bf\it... 104 \stydef\it\bf... 105 106 \def\FHcmr{\optical \\5.5:cmr5 \\6.5:cmr6 \\7.5:cmr7 ... \\*:cmr17 } 107 108 \Foptical <5.5=cmr5 <6.5=cmr6 < 109 110 An "H font set" is a list of optical sizes of the same font; each font in the 111 list has an associated scale factor (times 1000) and arbitrary token list for 112 initializing the font (e.g., skewchar, hyphenchar, fontdimens, etc.). 113 We provide macros for deriving new font sets by scaling or adding code to the 114 token list of existing font sets. 115 An "M font set" is a tuple of three H font sets. 116 (H = horizontal, M = math; we could call H fonts "text fonts", but that is too 117 easily confusable with \textfont.) 118 119 \begfont[eurm] 120 \Flink[cal][eusm] 121 \endfont 122 123 \protected\def\rm{\rminit \rmtext \rmmath}