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 % -------------------------------------------------------------------------
5 \ifx\OFSversion\undefined
10 % We extend OFS's default CM family by several fonts: cmb, cmcsc
12 \ofsputfamlist{^^JUCW:}
14 \ofsdeclarefamily [CMRomanUCW] {% ------------ Computer Modern Roman (UCW extended version)
15 \loadtextfam cmr\fotenc;%
18 cmbxti\fotenc;\defaultextraenc;%
19 \newvariant8 \sl (Slanted) cmsl\fotenc;\defaultextraenc;%
20 \newvariant9 \bxsl (BoldSlanted) cmbxsl\fotenc;\defaultextraenc;%
21 \newvariant a \bo (BoldNormal) cmb\fotenc;\defaultextraenc;%
22 \newvariant b \csc (CapsAndSmallCaps) cmcsc\fotenc;\defaultextraenc;%
23 \modifyenc 8z:csfont;%
27 \registertfm cmb8z - csb10
28 \registertfm cmb8z 0pt-6pt csb5
29 \registertfm cmb8z 6pt-7pt csb6
30 \registertfm cmb8z 7pt-8pt csb7
31 \registertfm cmb8z 8pt-9pt csb8
32 \registertfm cmb8z 9pt-10pt csb9
33 \registertfm cmb8z 10pt-12pt csb10
34 \registertfm cmb8z 12pt-17pt csb12
35 \registertfm cmb8z 17pt-* csb17
37 \registertfm cmcsc8z - cscsc10
38 \registertfm cmcsc8z 0pt-6pt cscsc5
39 \registertfm cmcsc8z 6pt-7pt cscsc6
40 \registertfm cmcsc8z 7pt-8pt cscsc7
41 \registertfm cmcsc8z 8pt-9pt cscsc8
42 \registertfm cmcsc8z 9pt-10pt cscsc9
43 \registertfm cmcsc8z 10pt-12pt cscsc10
44 \registertfm cmcsc8z 12pt-17pt cscsc12
45 \registertfm cmcsc8z 17pt-* cscsc17
47 \ofsdeclarefamily [BlackboardBold] {%
54 \registertfm bbm - bbm10
55 \registertfm bbm 0pt-6pt bbm5
56 \registertfm bbm 6pt-7pt bbm6
57 \registertfm bbm 7pt-8pt bbm7
58 \registertfm bbm 8pt-9pt bbm8
59 \registertfm bbm 9pt-10pt bbm9
60 \registertfm bbm 10pt-12pt bbm10
61 \registertfm bbm 12pt-17pt bbm12
62 \registertfm bbm 17pt-* bbm17
64 \setfonts[CMRomanUCW/]
66 % \bb - blackboard bold math font
72 \loadmathfam\bbfam[/bbm]%
76 % Recalculate line spacing for a given point size of the font (assuming CM-like metrics).
77 % Also sets \strut and \topskip.
81 \normalbaselineskip=1.2\dimen0
82 \normallineskip=0.1\dimen0
83 \setbox\strutbox=\hbox{\vrule height 0.85\dimen0 depth 0.35\dimen0 width 0pt}%
88 % Switch to a specified font size (including math, line spacing etc.)
96 \def\twelvepoint{\settextsize{12}}
98 % Re-define \tt, so that it works in both text and math mode
99 \def\tt{\ifmmode\fam\ttfam\else\setfonts[CMTypewriter/]\fi}