Skip to content
Snippets Groups Projects
Commit 6e587de6 authored by John Swinbank's avatar John Swinbank
Browse files

Cache results of font check

parent fce6d4aa
No related branches found
No related tags found
1 merge request!31Use new logo; improve font check
...@@ -82,7 +82,12 @@ ...@@ -82,7 +82,12 @@
% Default font for ESCAPE documents is Calibri % Default font for ESCAPE documents is Calibri
% But if we can't find it (e.g. in CI), don't worry about it % But if we can't find it (e.g. in CI), don't worry about it
\IfFontExistsTF{Calibri}{\setmainfont{Calibri}}{} % Attempt to cache the results of the font check; it is very slow
\newcommand{\useCalibri}{}
\IfFontExistsTF{Calibri}{\renewcommand{\useCalibri}{\setmainfont{Calibri}}}{}
\newcommand{\useArial}{}
\IfFontExistsTF{Arial}{\renewcommand{\useArial}{\setmainfont{Arial}}}{}
\useCalibri
% %
...@@ -92,14 +97,14 @@ ...@@ -92,14 +97,14 @@
\fancyhf{} \fancyhf{}
\lhead{ \lhead{
\IfFontExistsTF{Arial}{\setmainfont{Arial}}{} \useArial
\fontsize{8}{10}\selectfont \fontsize{8}{10}\selectfont
\includegraphics[width=2.0cm]{escape-logo.png}\\ \includegraphics[width=2.0cm]{escape-logo.png}\\
\docNumber{} -- \docTitle{}} \docNumber{} -- \docTitle{}}
\rhead{ \rhead{
\raisebox{1.8cm}{ \raisebox{1.8cm}{
\IfFontExistsTF{Arial}{\setmainfont{Arial}}{} \useArial
\fontsize{8}{10}\selectfont \fontsize{8}{10}\selectfont
\renewcommand{\arraystretch}{1.5} \renewcommand{\arraystretch}{1.5}
\begin{tabular}{>{\raggedright}ll} \begin{tabular}{>{\raggedright}ll}
...@@ -109,7 +114,7 @@ ...@@ -109,7 +114,7 @@
}} }}
\cfoot{ \cfoot{
\IfFontExistsTF{Calibri}{\setmainfont{Calibri}}{} \useCalibri
\begin{tabularx}{\textwidth}{@{}lXll@{}} \begin{tabularx}{\textwidth}{@{}lXll@{}}
\includegraphics[width=1cm]{flag-eu}\hspace{0.3cm} & \includegraphics[width=1cm]{flag-eu}\hspace{0.3cm} &
\fontsize{8}{10}\selectfont \fontsize{8}{10}\selectfont
...@@ -139,7 +144,7 @@ ...@@ -139,7 +144,7 @@
\end{textblock*} \end{textblock*}
\begin{textblock*}{1\textwidth}(\sideMargin, 9cm){ \begin{textblock*}{1\textwidth}(\sideMargin, 9cm){
\IfFontExistsTF{Arial}{\setmainfont{Arial}}{} \useArial
\fontsize{10}{12}\selectfont \fontsize{10}{12}\selectfont
\renewcommand{\arraystretch}{1.5} \renewcommand{\arraystretch}{1.5}
\hyphenpenalty=10000 \hyphenpenalty=10000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment