% A pure minimalistic LaTeX-Beamer theme for everyone to use.
% Copyright (C) 2020 Kai Norman Clasen

% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.

% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <https://www.gnu.org/licenses/>.

% This file is part of beamerthemepureminimalistic.

% If problems/bugs are found or enhancements are desired, please contact
% me over: https://github.com/kai-tub/latex-beamer-pure-minimalistic

\ProvidesPackage{beamerfontthemepureminimalistic}[v1.2.4]
\RequirePackage{ifthen}
\mode<presentation>

\newboolean{nofirafonts}
\setboolean{nofirafonts}{false}
\newboolean{helvetica}
\setboolean{helvetica}{false}

\DeclareOptionBeamer{nofirafonts}{\setboolean{nofirafonts}{true}}
\DeclareOptionBeamer{helvetica}{\setboolean{helvetica}{true}}
\ProcessOptionsBeamer

\RequirePackage{silence}
% I have no clue how I can fix this warning
\WarningFilter{latex}{Font shape declaration has incorrect series value}

\ifthenelse{\boolean{helvetica}}{%
    % If Helvetica overwrites the fira fonts settings
    \RequirePackage[T1]{fontenc}
    \RequirePackage[scaled]{helvet}
}{%
    \ifthenelse{\boolean{nofirafonts}}{%
        % Load default fonts
    }{%
        % By default load Fira
        \RequirePackage[T1]{fontenc}
        \RequirePackage[sfdefault]{FiraSans}
        \RequirePackage{FiraMono}
    }
}

\renewcommand\normalsize{\fontsize{12pt}{14pt}\selectfont}
\renewcommand\small{\fontsize{10pt}{12pt}\selectfont}
\renewcommand\large{\fontsize{14pt}{16pt}\selectfont}
\renewcommand\Large{\fontsize{16pt}{18pt}\selectfont}

\setbeamerfont{normal text}{family=\sffamily,size*={12pt}{14pt},series=\mdseries}
\setbeamerfont{alerted text}{parent=normal text}

\setbeamerfont{structure}{parent=normal text,series=\mdseries}

\setbeamerfont{footline}{parent=structure,size*={8pt}{10pt}}

\setbeamerfont{title}{size*={14pt}{16pt},parent=alerted text,shape=\scshape}
\setbeamerfont{title in head/foot}{parent=footline,series=\bfseries}

\setbeamerfont{subtitle}{parent=title,shape=\upshape}

\setbeamerfont{section in toc}{parent=normal text}
\setbeamerfont{subsection in toc}{parent=section in toc}
\setbeamerfont{subsubsection in toc}{parent=subsection in toc}

\setbeamerfont{author}{parent=normal text}
\setbeamerfont{author in head/foot}{parent=footline}
\setbeamerfont*{institute}{parent=normal text}

\setbeamerfont{frametitle}{parent=alerted text,size*={16pt}{18pt}}
\setbeamerfont{caption}{series=\normalfont, size=\small}
\setbeamerfont{caption name}{series=\normalfont, size=\small}

\setbeamerfont*{itemize/enumerate body}{parent=normal text}
\setbeamerfont*{itemize/enumerate subbody}{parent=itemize/enumerate body}
\setbeamerfont*{itemize/enumerate subsubbody}{parent=itemize/enumerate subbody}

\mode<all>