\defaultfontfeatures{Ligatures=TeX}
\setmainfont[% main font
	 UprightFont=GFSNeohellenic,
         ItalicFont=GFSNeohellenicIt,
	 BoldFont=GFSNeohellenicBold,
	 BoldItalicFont=GFSNeohellenicBoldIt,	 
          RawFeature=+pnum,% variable width numbers
       WordSpace={0.75,0.75,1},%
       Scale=1.2,%use instead of 12pt 
SmallCapsFeatures={Numbers=OldStyle,WordSpace={0.75,0.75,1},LetterSpace=0.06}]{GFSNeohellenic.otf}
%\renewfontfamily\scshape[%
%	RawFeature=+smcp,RawFeature=+onum,WordSpace={0.75,0.75,1},LetterSpace=0.06,%
%       Scale=1.2%use instead of 12pt 
%]{GFSNeohellenic.otf}
\setmathfont[%
       Scale=1.2%use instead of 12pt 
]{GFSNeohellenicMath.otf}
\renewcommand{\baselinestretch}{1.086} %~1/0.92, use when at 10pt scaled by 1.2
%%%%%%%%% special symbols %%%%%%%%%%%%%%%%%%%%%
%fixes the delimiters so that all big sizes appear. TeX default is 5pt.
% run texdoc mathmode and check the "problems with parentheses" section
%\delimitershortfall=1pt
%\newcommand{\myvarnothing}{\symbol{"E000}}
\let\varnothing\undefined
\let\emptyset\undefined
\AtBeginDocument{
\def\varnothing{\symbol{"E000}}%
\def\emptyset{\symbol{"2205}}}
\DeclareRobustCommand\nrightrightarrows{\mathrel{\char"2B5A}}
\DeclareRobustCommand\nleftleftarrows{\mathrel{\char"2B5B}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\let\bigint\undefined
\DeclareRobustCommand\smallprod{\mathop{\char"2B5E}\nolimits}
\DeclareRobustCommand\smallcoprod{\mathop{\char"2B5F}\nolimits}
\DeclareRobustCommand\smallsum{\mathop{\char"2B60}\nolimits}
\DeclareRobustCommand\smallint{\mathop{\char"2B61}\nolimits}
\DeclareRobustCommand\Bigint{\mathop{\char"2B62}\nolimits}
\DeclareRobustCommand\biggint{\mathop{\char"2B63}\nolimits}
\DeclareRobustCommand\Biggint{\mathop{\char"2B64}\nolimits}
\DeclareRobustCommand\bigggint{\mathop{\char"2B65}\nolimits}
\renewcommand*{\LaTeX}{L\kern-.75ex\raisebox{.7ex}{\textsc{a}}\kern-.1ex\hbox{T}\kern-.4ex\raisebox{-.5ex}{E}\kern-.3exX}

%Fix for \upint and \lowint by egreg
% @ https://tex.stackexchange.com/questions/730716/declared-height-and-depth-of-operators-ignored-by-unicode-engines
%
%\makeatletter
\AtBeginDocument{%
  \NewCommandCopy{\lowint@}{\lowint}%
  \NewCommandCopy{\upint@}{\upint}%
  \RenewCommandCopy{\lowint}{\lowint@@}%
  \RenewCommandCopy{\upint}{\upint@@}%
}

\NewDocumentCommand{\lowint@@}{e{_^}}{\mathop{\mathpalette\lowint@@@{{#1}{#2}}}}
\newcommand{\lowint@@@}[2]{\lowint@@@@#1#2}
\newcommand{\lowint@@@@}[3]{%
  \begingroup
  \sbox\z@{$\m@th#1\int$}%
  \raisebox{-\ifx#1\displaystyle0.18\else0.36\fi\dp\z@}{%
    $\m@th#1\lowint@
    \IfValueT{#2}{_{\raisebox{\ifx#1\displaystyle0.35\else0.7\fi\dp\z@}{$\m@th\scriptstyle#2$}}}%
    \IfValueT{#3}{^{#3}}$%
  }%
  \endgroup
}
\NewDocumentCommand{\upint@@}{e{_^}}{\mathop{\mathpalette\upint@@@{{#1}{#2}}}}
\newcommand{\upint@@@}[2]{\upint@@@@#1#2}
\newcommand{\upint@@@@}[3]{%
  \begingroup
  \sbox\z@{$\m@th#1\int$}%
  \raisebox{\ifx#1\displaystyle0.16\else0.32\fi\dp\z@}{%
    $\m@th#1\upint@
    \IfValueT{#2}{_{#2}}%
    \IfValueT{#3}{^{\raisebox{-\ifx#1\displaystyle0.33\else0.66\fi\dp\z@}{$\m@th\scriptstyle#3$}}}$%
  }%
  \endgroup
}
%\makeatother
%%%%%%%%%%%%%%%%%%%%% End of fix %%%%%%%%%%%%%%%