From 6a005aefeb56f575d0a1b27711a6a39276d275cd Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 26 Dec 2020 21:46:14 +0000 Subject: oswald (26dec20) git-svn-id: svn://tug.org/texlive/trunk@57232 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/oswald/Oswald.sty | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/oswald/Oswald.sty (limited to 'Master/texmf-dist/tex/latex/oswald/Oswald.sty') diff --git a/Master/texmf-dist/tex/latex/oswald/Oswald.sty b/Master/texmf-dist/tex/latex/oswald/Oswald.sty new file mode 100644 index 00000000000..f1bd88bc0e9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oswald/Oswald.sty @@ -0,0 +1,61 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{Oswald} + [2020/12/25 (Carl-Clemens Ebinger and autoinst) Style file for Oswald fonts.] + +\RequirePackage{xkeyval} +\newcommand*{\Zeroswald@scale}{1} +\DeclareOptionX{scale}{\renewcommand*{\Zeroswald@scale}{#1}} +\DeclareOptionX{scaled}{\renewcommand*{\Zeroswald@scale}{#1}} + +\DeclareOptionX{lining}{\edef\Zeroswald@figurestyle{LF}} +\DeclareOptionX{tabular}{\edef\Zeroswald@figurealign{T}} +\DeclareOptionX{mainfont}{ + \renewcommand{\familydefault}{\rmdefault} +} +\DeclareOptionX{semibold}{\edef\bfseries@rm{semibold}} +\DeclareOptionX{bold}{\edef\bfseries@rm{bold}} +\DeclareOptionX{medium}{\edef\mdseries@rm{medium}} +\DeclareOptionX{regular}{\edef\mdseries@rm{regular}} +\ExecuteOptionsX{lining,tabular} +\ProcessOptionsX\relax + +\RequirePackage{fontenc,textcomp} +\RequirePackage{ifthen} +\RequirePackage{mweights} + +\IfFileExists{fontaxes.sty}{ + \RequirePackage{fontaxes} + \fa@naming@exception{figures}{{superior}{proportional}}{Sup} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\supfigures{\@nomath\supfigures + \fontfigurestyle{superior}\selectfont} + \let\sufigures\supfigures + \DeclareTextFontCommand{\textsup}{\supfigures} + \let\textsu\textsup + \let\textsuperior\textsup + +}{} + +% Here we implement the scale=MatchLowercase option. +% If this is given, we must compute the correct value of +% the "\Zeroswald@scale" parameter before loading the .fd files; +% but to determine that value we of course need the font's x-height. +% To avoid triggering the loading of .fd files, +% we use plain TeX's \font primitive to load the testfont. +% We then compute the ratio of the current x-height to our font's x-height; +% this is the "\Zeroswald@scale" we will pass to the .fd files. +\ifthenelse{\equal{\Zeroswald@scale}{MatchLowercase}} + { \newlength{\Zeroswald@currentx} + \settoheight{\Zeroswald@currentx}{x} + \newlength{\Zeroswald@xheight} + \settoheight{\Zeroswald@xheight} + {{\font\testfont=0swald-Regular-tlf-ot1 at \f@size pt\testfont x}} + \renewcommand*{\Zeroswald@scale} + {\strip@pt\dimexpr\number\numexpr\number\dimexpr\Zeroswald@currentx\relax*65536/\number\dimexpr\Zeroswald@xheight\relax\relax sp\relax}} + {} + +\renewcommand* + {\rmdefault} + {Zeroswald-\Zeroswald@figurealign\Zeroswald@figurestyle} + +\endinput -- cgit v1.2.3