\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage{calc}
\usepackage{setspace}
\usepackage{fontspec}

\setmainfont[
  BoldFont       = texgyrepagella-bold.otf ,
  ItalicFont     = texgyrepagella-italic.otf ,
  BoldItalicFont = texgyrepagella-bolditalic.otf ]
            {texgyrepagella-regular.otf}

%\usepackage{sourcecodepro}


\usepackage{inconsolata}
\setmonofont[
  BoldFont = Inconsolatazi4-Bold.otf ]
            {Inconsolatazi4-Regular.otf}


%% \usepackage{nvidiasansx}
%% \setsansfont[
%%   Scale=MatchLowercase,
%%   BoldFont       = NVIDIASans-Medium-k.ttf,
%%   ItalicFont     = NVIDIASans-Italic-k.ttf ]
%% %  BoldItalicFont = NVIDIASans_MediumItalic-k.ttf ]
%%             {NVIDIASans-Regular-k.ttf}


%% nvxmn8t   NvidiaSans           <NVIDIASans-Regular-k.ttf   <T1-WGL4.enc
%% nvxbn8t   NvidiaSansBold       <NVIDIASans-Medium-k.ttf   <T1-WGL4.enc
%% nvxmit8t  NvidiaSansItalic     <NVIDIASans-Italic-k.ttf   <T1-WGL4.enc
%% nvxbit8t  NvidiaSansBoldItalic <NVIDIASans_MediumItalic-k.ttf <T1-WGL4.enc

%\setmonofont[StylisticSet=1]{Inconsolatazi4}

\usepackage{amsmath}
\usepackage{pifont}

%\usepackage
\usepackage{opensans}
%\usepackage{cabin}

%

% https://tex.stackexchange.com/questions/60360/how-to-use-fraktur-gothic-fonts-in-text-mode
% \usepackage{yfonts}

%\usepackage{mathpazo}

\newcommand\wstrut{\rule[-4pt]{0pt}{13pt}}
%\usepackage{cabin}

% https://tex.stackexchange.com/questions/50586/how-to-use-palatino-like-math-fonts-in-xelatex
%\setsansfont[Scale=MatchLowercase]{Open Sans}
%\setsansfont[Scale=MatchLowercase]{Source Sans Pro}
%\setsansfont[Scale=MatchLowercase]{Cabin}
%\setsansfont{Cabin}[Scale=MatchLowercase]

\newlength{\basefontsize}
\makeatletter
\setlength{\basefontsize}{\f@size pt}
\makeatother

\DeclareRobustCommand{\sfont}[1]{%
  \fontsize{#1\basefontsize}{#1\basefontsize * \real{1.4}}%
  \sffamily\selectfont}

\DeclareRobustCommand{\sifont}[1]{%
  \fontsize{#1\basefontsize}{#1\basefontsize * \real{1.4}}%
  \sffamily\selectfont}

% General scaling for current font:

\makeatletter
\newcommand{\scalefont}[2]{{%
    \@tempdima=\f@size pt
    \@tempdimb=\f@baselineskip
    \@tempdima=#1\@tempdima
    \@tempdimb=#1\@tempdimb
    \fontsize{\the\@tempdima}{\the\@tempdimb}%
    \selectfont #2}
}
\makeatother
  
