diff --git a/otagofonts.sty b/otagofonts.sty index d32be2f..e8d4715 100644 --- a/otagofonts.sty +++ b/otagofonts.sty @@ -1,4 +1,4 @@ -\def\filedate{27 October 2022} +\def\filedate{20 January 2023} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Set up official Otago fonts based on what’s available. Fall back to close @@ -9,11 +9,12 @@ % Version History % v1.0 Initial version, rebuilt from deprecated lecturecommon package. % v1.1 Refactored font checking mechanism. +% v1.2 Fixed sans-serif scaling, added Noto Sans. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[2001/06/01] -\ProvidesPackage{otagofonts}[2022/10/27 Otago standard fonts v1.1] +\ProvidesPackage{otagofonts}[2023/01/20 Otago standard fonts v1.2] \RequirePackage{etoolbox} @@ -95,19 +96,24 @@ % font-specific defaults \defaultfontfeatures[Open Sans Light]{BoldFont={Open Sans}} +\defaultfontfeatures[Noto Sans Light]{BoldFont={Noto Sans}} \defaultfontfeatures[Roboto Light]{BoldFont={Roboto}} \renewcommand*{\do}[1]{% \PackageInfo{otagofonts}{Trying #1...} \IfFontExistsTF{#1}{% - \setsansfont{#1}[Ligatures=TeX, Scale=MatchUppercase]% + % Scale=Match{Upper|Lower}case doesn't work very well for the sans fonts. + % By experimentation Scale=0.912 seems a good compromise, and eliminates the + % weird upscaling of sans fonts in Texlive 2020, which didn't seem to affect + % the serif or monospace fonts (?!?!). + \setsansfont{#1}[Scale=0.912]% \PackageInfo{otagofonts}{Using #1 for sans-serif font}% \booltrue{foundsansfont}% \listbreak% }{}% } -\docsvlist{Open Sans Light,Roboto Light,Arial} +\docsvlist{Open Sans Light,Noto Sans Light,Roboto Light,Arial} \ifbool{foundsansfont}{}{% \PackageWarning{otagofonts}{Could not find any suitable sans-serif font.\MessageBreak%