% From mitthesis package
% Documentation: https://ctan.org/pkg/mitthesis

\ProvidesFile{mitthesis-stix2.tex}[2026/11/20 v1.09 Load STIX Two text and math fonts]

%% STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font
%
%	These fonts are in TeX Live and on CTAN. They are included in a complete LaTeX installation. 
%	They are also available at: 
%				https://github.com/stipub/stixfonts 
%				https://www.gust.org.pl/projects/e-foundry/tex-gyre 
%				https://ctan.org/tex-archive/fonts/inconsolata
%
\ifpdftex
	\ClassError{\ClassName}{The stix2 fontset requires LuaLaTeX. Defaulting to CMR fonts.}{Use LuaLaTeX to run with the class option [fontset=stix2]}
    \LoadDefaultFonts % defined by class, loads latex defaults
\else
	\ClassNoteNoLine{\ClassName}{Loading STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font}
	%
    \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket},mathbf=sym]{unicode-math}
    % suppress warnings about lack of integration between mathtools and unicode-math
    % unicode-math loads the fontspec package
	%
    \setmainfont{STIXTwoText}[
       	Extension = .otf,
    	UprightFont = *-Regular,
    	ItalicFont = *-Italic,
    	BoldFont = *-Bold,
    	BoldItalicFont = *-BoldItalic,
		SlantedFont = *-Italic,
		BoldSlantedFont = *-BoldItalic,
	]
	\setsansfont{texgyreheros}[ 
		WordSpace = {1,1.4,1},% adjust to suit taste
		Extension = .otf,
    	UprightFont = *-regular,
    	ItalicFont = *-italic,
    	BoldFont = *-bold,
    	BoldItalicFont = *-bolditalic,
		Numbers = Lining,% default
    	Scale=0.91,% 
	]        
	\setmonofont{Inconsolatazi4}[
        Scale=1.035,% 2024/10/13
        Extension = .otf,
        UprightFont = *-Regular,
        ItalicFont = *-Regular,% has no italic face
        BoldFont = *-Bold, 
    	BoldItalicFont = *-Bold,% has no bold italic face
	    StylisticSet = {1,2}% like RawFeature = {+ss01,+ss02}; drop +ss03 (upright quotes), 2025/04/18
    ]             
    %%	This font lacks a separate bold version (\symbf, \symbfit, etc. ordinarily cover most needs)
	\setmathfont{STIXTwoMath-Regular}[
    	Scale=MatchUppercase,
    	Extension = .otf,
%       Color=NavyBlue, % this color is from the xcolor package (an example of coloring a font)
   ]
   % +ss01 -- switch calligraphic to script; +ss02 -- use variants of g, u, v, w, z; +ss08 -- use upright integrals
    \setmathfont{STIXTwoMath-Regular}[Extension=.otf, Scale=MatchUppercase,
	    range={scr,bfscr}, StylisticSet=1]  % make script and calligraphic differ
   %
   \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2} 
\fi
