summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex
blob: 945be8c04806a1391146f92d1ae5c3fadf3ba2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis

\ProvidesFile{mitthesis-lucida.tex}[2024/10/13 v1.04 Load Lucida fonts]

%% Lucida Bright and Lucida Bright Math fonts (available from the TeX Users Group)

\ClassNoteNoLine{\ClassName}{Lucida Bright and Lucida Bright Math fonts}

\ifpdftex
	\RequirePackage[LY1]{fontenc}
	\RequirePackage[expert,vargreek,altbullet]{lucidabr}   % switch text and math fonts 
	% some other options: seriftt (much larger quad size!), lucidasmallscale % 2024/10/13
	\RequirePackage{bm}
\else
    \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
    % suppress tiresome warnings about lack of integration between mathtools and unicode-math
    % unicode-math loads the fontspec package

    % FEATURE 	DESCRIPTION 											DEFAULT
    % dlig 		discretionary ligatures (f-ligatures in typewriter fnt) off
    % liga 		standard ligatures (f-ligatures, not monospaced fonts) 	on
    % onum 		old style numbers (Lucida Bright only)					off
    % smcp 		small caps 	(Lucida Bright, upright only)				off
    % zero 		slashed zero (sans and monospaced fonts)				off
    % locl 		script/language specific (localized) forms 				on
    %
    % FEATURE 	FONT 						DESCRIPTION
    % ss01 		Lucida Sans & Typewriter 	use dotted zero: 𝟶 vs. default 0.
    % ss01 		use Lucida-standard shapes:
    % 			Lucida Grande Mono 			ØOQ vs. default 0OQ;
    % 			Lucida Console 				ØOQ vs. default 0OQ.
    
    \setmainfont{LucidaBrightOT}[% main rm
          Ligatures=TeX,
          Extension=.otf,
          UprightFont=*,
          ItalicFont=*-Italic,
          BoldFont=*-Demi,
    	  BoldItalicFont=*-DemiItalic,
    %     BoldItalicFeatures={Color=Purple4}, % fixed 2024/10/13
    %     UprightFeatures={Color=Salmon3},
    	  Scale=0.93,% increased from 0.92, 2024/10/13
    %	  Numbers ={OldStyle}, 
      ]
    %
    \setsansfont{LucidaSansOT}[% main sans
          Ligatures=TeX,
          Extension=.otf,
          UprightFont=*,
          ItalicFont=*-Italic,
          BoldFont=*-Demi,
    	  BoldItalicFont=*-DemiItalic,
    	  Scale=MatchUppercase,
      ]
    %
    \setmonofont{LucidaSansTypewriterOT}[% main typewriter
          Ligatures=TeX,
          Extension=.otf,
          UprightFont=*,
          ItalicFont=*-Oblique,
          BoldFont=*-Bold,
          BoldItalicFont=*-BoldOblique,
          Scale=MatchLowercase,% changed from MatchUppercase, 2024/10/13
      ]
    
    %% MATH FONTS
    %
    % ss01 	alternate Latin lower case math italic identical to text italic. This option is not recommended as Greek 𝜈 (nu) and Latin 𝑣 (vee) become too similar
    % ss02 	smaller arrows (original Type 1 size): ⇑ vs. default ⇑.
    % ss03 	attempt to imitate Type 1 fonts
    % ss04 	calligraphic alternative (similar to the Type 1 design) to the math script alphabet
    % ss05 	use a slashed-zero style for the empty set character (U+2205): Ø vs. default ∅
    % ss08 	emphasize right and bottom edges of the d’Alembertian operator (U+29E0, \laplac), to follow the design of the Laplace operator (U+2206, \increment, Δ); the default design emphasizes the left and upper edges. Also available in the bold math font.
    %
    \setmathfont{LucidaBrightMathOT}[% main math
    	  Scale=MatchUppercase,
    	  Extension=.otf,
    	  BoldFont=LucidaBrightMathOT-Demi.otf,
%    	  BoldFeatures={Color=Chartreuse4},
    	  RawFeature ={+ss04,+ss08}, %
    ]
 
%% LucidaMath-OT contains a *serif* typerwriter font. If you prefer a sans serif typerwriter font, you can use the following two settings. 
% 
%    \setmathfont{LucidaSansTypewriterOT}[% <== NB: setting a text font where math font should go.
%    	  Scale=MatchUppercase,
%          range=tt,
%    	  Color=NavyBlue,
%          Extension=.otf,
%          script-features = {},     
%          sscript-features = {},     
%    	  BoldFont=LucidaSansTypewriterOT-Bold.otf,
%    	  BoldFeatures={Color=Salmon3},
%    ]
%    %
%    \setmathfontface\mathtt{LucidaSansTypewriterOT-Bold}[% bold upright typewriter font in boldmath.
%    	  version=bold,
%    	  Scale=MatchUppercase,
%          Extension=.otf,    
%    ]
	%
    \setmathfont{LucidaBrightMathOT}[%
    	  range={scr},% to make scr differ from cal
    	  RawFeature={-ss04},
    	  Scale=MatchUppercase,
          Extension=.otf,
    	  BoldFont=LucidaBrightMathOT-Demi.otf,% could be overridden by bold separate version
    ]
    \setmathfont{LucidaBrightMathOT}[% -Demi .. sufficient this way, since bold set above.
    	  range={bfscr},% need to call \symbfscr manually - bug in unicode-math version & range interaction
    	  RawFeature={-ss04},
    	  Scale=MatchUppercase,
          Extension=.otf,
    	  BoldFont=LucidaBrightMathOT-Demi.otf,
    ]
    %% Fix unicode-math operator font not set up for bold face (default \mathrm). See https://github.com/wspr/unicode-math/issues/468
    \setoperatorfont\normalfont
    %
    % note \mathbfit = \symbfit
    
    % The specialized one-off Lucida fonts:
    \newfontface\LucidaBlackletter{LucidaBlackletterOT}[%
    	Scale=0.95,% <== NB
    	Extension=.otf,
    	]
    \newfontface\LucidaCalligraphy{LucidaCalligraphyOT}[%
    	Scale=MatchUppercase,
    	Extension=.otf,
    	]
    \newfontface\LucidaHandwriting{LucidaHandwritingOT}[%
    	Scale=MatchUppercase,
    	Extension=.otf,
     	]
    % GrandeMono and Console fonts:
    \newfontface\LucidaGrandeMonoDK{LucidaGrandeMonoDK}[%	
    	Scale=MatchUppercase,
    	Extension=.otf,
        UprightFont=*,
        ItalicFont=*-Italic,
        BoldFont=*-Bold,
        BoldItalicFont=*-BoldItalic,
    	]
    \newfontface\LucidaConsole{LucidaConsoleDK}[%
    	Scale=MatchLowercase,% <=== NB
    	Extension=.otf,
        UprightFont=*,
        ItalicFont=*-Italic,
        BoldFont=*-Bold,
        BoldItalicFont=*-BoldItalic,
    	]
\fi