\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{Arvo} [2020/12/21 (Carl-Clemens Ebinger and autoinst) Style file for Arvo fonts.] \RequirePackage{xkeyval} \newcommand*{\Arvo@scale}{1} \DeclareOptionX{scale}{\renewcommand*{\Arvo@scale}{#1}} \DeclareOptionX{scaled}{\renewcommand*{\Arvo@scale}{#1}} \DeclareOptionX{lining}{\edef\Arvo@figurestyle{LF}} \DeclareOptionX{tabular}{\edef\Arvo@figurealign{T}} \DeclareOptionX{mainfont}{ \renewcommand{\familydefault}{\rmdefault} } \DeclareOptionX{bold}{\edef\bfseries@rm{bold}} \DeclareOptionX{regular}{\edef\mdseries@rm{regular}} \ExecuteOptionsX{lining,tabular} \ProcessOptionsX\relax \RequirePackage{fontenc,textcomp} \RequirePackage{ifthen} \RequirePackage{mweights} \IfFileExists{fontaxes.sty}{ \RequirePackage{fontaxes} }{} % Here we implement the scale=MatchLowercase option. % If this is given, we must compute the correct value of % the "\Arvo@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 "\Arvo@scale" we will pass to the .fd files. \ifthenelse{\equal{\Arvo@scale}{MatchLowercase}} { \newlength{\Arvo@currentx} \settoheight{\Arvo@currentx}{x} \newlength{\Arvo@xheight} \settoheight{\Arvo@xheight} {{\font\testfont=Arvo-tlf-ot1 at \f@size pt\testfont x}} \renewcommand*{\Arvo@scale} {\strip@pt\dimexpr\number\numexpr\number\dimexpr\Arvo@currentx\relax*65536/\number\dimexpr\Arvo@xheight\relax\relax sp\relax}} {} \renewcommand* {\rmdefault} {Arvo-\Arvo@figurealign\Arvo@figurestyle} \def\Arvotabular{\fontfamily{Arvo-TLF}\selectfont} \def\Arvoproportional{\fontfamily{Arvo-LF}\selectfont} \endinput