\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ibarra} [2022/10/01 (Bob Tennent) Supports IbarraRealNova Real Nova fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} \newif\ifibarra@otf \ifxetex \ibarra@otftrue \else\ifluatex \ibarra@otftrue \else % [pdf]LaTeX \ibarra@otffalse \fi\fi \newif\ifibarra@default \ibarra@defaultfalse \newif\ifibarra@semi \ibarra@semifalse \newif\ifibarra@lining \ibarra@liningtrue \newcommand*{\IbarraRealNova@scale}{1} \DeclareOptionX{scaled}{\renewcommand*{\IbarraRealNova@scale}{#1}} \DeclareOptionX{scale}{\renewcommand*{\IbarraRealNova@scale}{#1}} \DeclareOptionX{lining}{\ibarra@liningtrue} \DeclareOptionX{oldstyle}{\ibarra@liningfalse} \DeclareOptionX{type1}{\ibarra@otffalse} \DeclareOptionX{semibold}{\ibarra@semitrue} \ProcessOptionsX\relax \ifibarra@otf \def\ibarra@boldstyle{Bold} \ifibarra@semi\def\ibarra@boldstyle{SemiBold}\fi \ifibarra@lining \def\ibarra@figurestyle{Lining} \else \def\ibarra@figurestyle{OldStyle} \fi \else % type1 \def\bfseries@rm{b} \def\mdseries@rm{m} \ifibarra@semi\def\bfseries@rm{sb}\fi \ifibarra@lining \def\ibarra@figurestyle{LF} \else \def\ibarra@figurestyle{OsF} \fi \fi \ifibarra@otf \RequirePackage{fontspec} \else \RequirePackage{fontenc,fontaxes,mweights} \fi \ifibarra@otf \defaultfontfeatures{ Ligatures = TeX , Scale = \IbarraRealNova@scale , Extension = .otf } \setmainfont [ Numbers = {\ibarra@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-\ibarra@boldstyle , BoldItalicFont = *-\ibarra@boldstyle Italic ] {IbarraRealNova} % grab current family in case of subsequent change: \let\ibarrafamily\rmdefault \newfontfamily\ibarra [ Numbers = {\ibarra@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , BoldFont = *-\ibarra@boldstyle , BoldItalicFont = *-\ibarra@boldstyle Italic ] {IbarraRealNova} \newfontfamily\ibarraSemiBold [ Numbers = {\ibarra@figurestyle}, UprightFont = *-SemiBold , ItalicFont = *-SemiBoldItalic , BoldFont = *-SemiBold , BoldItalicFont = *-SemiBoldItalic ] {IbarraRealNova} \DeclareTextFontCommand{\oldstylenums}{\addfontfeatures{Numbers={OldStyle}}} \DeclareTextFontCommand{\liningnums}{\addfontfeatures{Numbers={Lining}}} \else % type1 \def\ibarrafamily{IbarraRealNova-\ibarra@figurestyle} \def\ibarra{\fontfamily{\ibarrafamily}\selectfont} \renewcommand*\rmdefault{\ibarrafamily} \def\ibarraSemiBold{\fontfamily{\ibarrafamily}\fontseries{sb}\selectfont} \DeclareTextFontCommand{\oldstylenums}{\fontfamily{IbarraRealNova-OsF}\selectfont} \DeclareTextFontCommand{\liningnums}{\fontfamily{IbarraRealNova-LF}\selectfont} \fi \ifibarra@otf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} \fi \endinput