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

\ProvidesFile{mitthesis-termes.tex}[2026/11/20 v1.08 Load TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor monospaced font]

%% TeX Gyre Termes (Times-like) text font with Termes math font and Heros sans serif font and Cursor 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://www.gust.org.pl/projects/e-foundry/tex-gyre, https://ctan.org/pkg/newtx
%
\ifpdftex
	\ClassError{\ClassName}{The termes fontset requires LuaLaTeX. Falling back to the default Computer Modern fonts}{To use the class option [fontset=termes], use LuaLaTeX.}
    \LoadDefaultFonts % defined by class, loads latex defaults
\else
	\ClassNoteNoLine{\ClassName}{Loading TeX Gyre Termes text and math fonts, Heros sans serif font, and Cursor 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{TeXGyreTermesX}[ % from the newtx package, not TeX Gyre (they are very similar fonts)
        WordSpace = {1,1.4,1},%% This stretch matches newtxtext a little better.
        Extension = .otf,
        UprightFont = *-Regular,
        ItalicFont = *-Italic,
        BoldFont = *-Bold,
        BoldItalicFont = *-BoldItalic,
        SlantedFont = *-Slanted,
        BoldSlantedFont = *-BoldSlanted,
        Numbers = Lining,
	]
    \setsansfont{texgyreheros}[
        WordSpace = {1,1.4,1},
        Extension = .otf,
        UprightFont = *-regular,
        ItalicFont = *-italic,
        BoldFont = *-bold,
        BoldItalicFont = *-bolditalic,
        Numbers = Lining,% default
        Scale=0.91,% same as used in newtx; former value 0.9 too small 2022/01/15
	]        
    \setmonofont{texgyrecursor}[
        Scale=1.03, % adjusted 2024/10/12 to bring x-size closer to other fonts
        Extension = .otf,
        UprightFont = *-regular,
        ItalicFont = *-italic,
        BoldFont = *-bold, 
        BoldItalicFont = *-bolditalic,
%		BoldFeatures = { Color = VioletRed3 }, % example of coloring a font, color name from xcolor package
    ]             
    %%	This math font lacks a separate bold version (\symbf, \symbfit, etc. ordinarily cover most needs)
    \setmathfont{texgyretermes-math}[
        Scale=MatchUppercase,
        Extension = .otf,
    ]
    %   
    \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2}
\fi
