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