From 7571ecdabae562573faef0838904d34e19cd4210 Mon Sep 17 00:00:00 2001 From: Adrien Burgun Date: Wed, 1 Feb 2023 14:03:37 +0100 Subject: [PATCH] :bug: Support the google fonts version of Tahoma --- README.md | 18 ++++++++++++------ report.tex | 8 +++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b3ac781..5e2eca4 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,21 @@ Report for my fourth-year internship, in latex. ```sh # Download required programs and libraries sudo pacman -S texlive-core texlive-latexextra texlive-fontsextra texlive-langextra -git clone https://github.com/pinam45/utbm-latex-internship-report-covers git clone https://aur.archlinux.org/ttf-tahoma.git +git clone https://aur.archlinux.org/ttf-adobe-source-sans-fonts.git +git clone https://github.com/pinam45/utbm-latex-internship-report-covers git clone https://git.shadamethyst.xyz/amethyst/ST40-report +# Download and install the Tahoma font +cd ttf-tahoma +makepkg -si +cd .. + +# Download and install the Source Sans Pro font +cd ttf-adobe-source-sans-fonts +makepkg -si +cd .. + # Copy the utbmcovers library to the texmf folder cd utbm-latex-internship-report-covers mkdir -p ~/texmf/tex/latex/ @@ -18,11 +29,6 @@ cp -r utbmcovers ~/texmf/tex/latex/ sudo mktexlsr cd .. -# Download and install the Tahoma font -cd ttf-tahoma -makepkg -si -cd .. - # Build the report cd ST40-report make diff --git a/report.tex b/report.tex index fd20801..8e83715 100644 --- a/report.tex +++ b/report.tex @@ -78,7 +78,13 @@ \newfontfamily{\Tahoma}{Tahoma} \newfontfamily{\SourceSans}{Source Sans Pro} -\newfontfamily{\SourceSansSB}[UprightFont={* Semibold}]{Source Sans Pro} +% Looks like the font from google fonts has a different case, +% so I'm stuck with scanning for existing fonts +\IfFontExistsTF{Source Sans Semibold}{ + \newfontfamily{\SourceSansSB}[UprightFont={* Semibold}]{Source Sans Pro} +}{ + \newfontfamily{\SourceSansSB}[UprightFont={* SemiBold}]{Source Sans Pro} +} \setmainfont{Source Sans Pro} % \newfontfamily{\ossb}[UprightFont={* Semibold}]{Open Sans} \newcommand{\entity}[1]{{\SourceSansSB #1}}