1 % The UCW Macro Collection: Interface to OFS (Olsak's Font System)
2 % Written by Martin Mares <mj@ucw.cz> in 2010 and placed into public domain
3 % -------------------------------------------------------------------------
7 \ifx\OFSversion\undefined
13 % We extend OFS's default CM family by several fonts: cmb, cmcsc
15 \ofsputfamlist{^^JUCW:}
17 \ofsdeclarefamily [CMRomanUCW] {% ------------ Computer Modern Roman (UCW extended version)
18 \loadtextfam cmr\fotenc;%
21 cmbxti\fotenc;\defaultextraenc;%
22 \newvariant8 \sl (Slanted) cmsl\fotenc;\defaultextraenc;%
23 \newvariant9 \bxsl (BoldSlanted) cmbxsl\fotenc;\defaultextraenc;%
24 \newvariant a \bo (BoldNormal) cmb\fotenc;\defaultextraenc;%
25 \newvariant b \csc (CapsAndSmallCaps) cmcsc\fotenc;\defaultextraenc;%
26 \modifyenc 8z:csfont;%
30 \registertfm cmb8z - csb10
31 \registertfm cmb8z 0pt-6pt csb5
32 \registertfm cmb8z 6pt-7pt csb6
33 \registertfm cmb8z 7pt-8pt csb7
34 \registertfm cmb8z 8pt-9pt csb8
35 \registertfm cmb8z 9pt-10pt csb9
36 \registertfm cmb8z 10pt-12pt csb10
37 \registertfm cmb8z 12pt-17pt csb12
38 \registertfm cmb8z 17pt-* csb17
40 \registertfm cmcsc8z - cscsc10
41 \registertfm cmcsc8z 0pt-6pt cscsc5
42 \registertfm cmcsc8z 6pt-7pt cscsc6
43 \registertfm cmcsc8z 7pt-8pt cscsc7
44 \registertfm cmcsc8z 8pt-9pt cscsc8
45 \registertfm cmcsc8z 9pt-10pt cscsc9
46 \registertfm cmcsc8z 10pt-12pt cscsc10
47 \registertfm cmcsc8z 12pt-17pt cscsc12
48 \registertfm cmcsc8z 17pt-* cscsc17
50 \ofsdeclarefamily [BlackboardBold] {%
57 \registertfm bbm - bbm10
58 \registertfm bbm 0pt-6pt bbm5
59 \registertfm bbm 6pt-7pt bbm6
60 \registertfm bbm 7pt-8pt bbm7
61 \registertfm bbm 8pt-9pt bbm8
62 \registertfm bbm 9pt-10pt bbm9
63 \registertfm bbm 10pt-12pt bbm10
64 \registertfm bbm 12pt-17pt bbm12
65 \registertfm bbm 17pt-* bbm17
67 \setfonts[CMRomanUCW/]
69 % \bb - blackboard bold math font
75 \loadmathfam\bbfam[/bbm]%
79 % Recalculate line spacing for a given point size of the font (assuming CM-like metrics).
80 % Also sets \strut and \topskip.
84 \normalbaselineskip=1.2\dimen0
85 \normallineskip=0.1\dimen0
86 \setbox\strutbox=\hbox{\vrule height 0.85\dimen0 depth 0.35\dimen0 width 0pt}%
91 % Switch to a specified font size (including math, line spacing etc.)
99 \def\twelvepoint{\settextsize{12}}
101 % Re-define \tt, so that it works in both text and math mode
102 \loadmathfam\ttfam[/cmtt\fotenc]
103 \def\tt{\ifmmode\fam\ttfam\else\setfonts[CMTypewriter/]\fi}