\NeedsTeXFormat{LaTeX2e}[2020/02/02] \ProvidesPackage{geistmono-nfss} [2026/08/24 (autoinst) Style file for GeistMono fonts.] \RequirePackage{xkeyval} \newcommand*{\GeistMono@scale}{1} \DeclareOptionX{scale}{\renewcommand*{\GeistMono@scale}{#1}} \DeclareOptionX{scaled}{\renewcommand*{\GeistMono@scale}{#1}} \DeclareOptionX{lining}{\edef\GeistMono@figurestyle{LF}} \DeclareOptionX{tabular}{\edef\GeistMono@figurealign{T}} \edef\GeistMono@figurestyle{LF} \edef\GeistMono@figurealign{T} \DeclareOptionX{mainfont}{ \renewcommand{\familydefault}{\ttdefault} } \DeclareOptionX{black}{\edef\bfseries@tt{black}} \DeclareOptionX{extrabold}{\edef\bfseries@tt{extrabold}} \DeclareOptionX{semibold}{\edef\bfseries@tt{semibold}} \DeclareOptionX{bold}{\edef\bfseries@tt{bold}} \DeclareOptionX{medium}{\edef\mdseries@tt{medium}} \DeclareOptionX{regular}{\edef\mdseries@tt{regular}} \ProcessOptionsX\relax \RequirePackage[T1]{fontenc} \RequirePackage{textcomp} \RequirePackage{ifthen} \RequirePackage{xspace} \ExplSyntaxOn \IfFileExists{figureversions.sty}{ \RequirePackage{figureversions} \figureversions_new_figurestyle:nnn {superior} {Sup} {Sup} \def\supfigures{\@nomath\supfigures \fontfigurestyle{superior}\selectfont} \let\sufigures\supfigures \DeclareTextFontCommand{\textsup}{\supfigures} \let\textsu\textsup \let\textsuperior\textsup \let\@oldtextsuperscript\textsuperscript \def\textsuperscript{\@ifstar\@oldtextsuperscript\textsup} \def\@makefnmark{% \mbox{\footnotemarkfont\textsuperscript{\@thefnmark}}} \@ifundefined{ftntm@font}% {\let\footnotemarkfont\normalfont}% {\let\footnotemarkfont\ftntm@font} }{} \ExplSyntaxOff % Here we implement the scale=MatchLowercase option. % If this is given, we must compute the correct value of % the "\GeistMono@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 "\GeistMono@scale" we will pass to the .fd files. \ifthenelse{\equal{\GeistMono@scale}{MatchLowercase}} { \newlength{\GeistMono@currentx} \settoheight{\GeistMono@currentx}{x} \newlength{\GeistMono@xheight} \settoheight{\GeistMono@xheight} {{\font\testfont=GeistMono-Regular-tlf-t1 at \f@size pt\testfont x}} \renewcommand*{\GeistMono@scale} {\fpeval{\GeistMono@currentx / \GeistMono@xheight}}} {} \renewcommand* {\ttdefault} {GeistMono-\GeistMono@figurealign\GeistMono@figurestyle} \endinput