%%
%% This is file `Rosario.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% Rosario.dtx  (with options: `package')
%% 
%% Copyright (C) 2016-2019 Arash Esbati <arash'at'gnu.org>
%% 
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License (LPPL), either version 1.3c of
%% this license or (at your option) any later version.  The latest
%% version of this license is in the file:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{Rosario}
  [2019/07/19 v2.1 Support for Rosario fonts (AE)]
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\newif\ifRosario@otf
\ifxetex                      % we are in XeTeX
  \Rosario@otftrue
\else
  \ifluatex                   % we are in LuaTeX
    \Rosario@otftrue
  \else
    \Rosario@otffalse
  \fi
\fi
\ifRosario@otf
  \RequirePackage{fontspec}
\else
  \RequirePackage{mweights}
  \RequirePackage{fontaxes}
\fi
\RequirePackage{kvoptions}
\SetupKeyvalOptions{%
  family = Rosario  ,
  prefix = Rosario@
}
\DeclareBoolOption{regular}
\DeclareComplementaryOption{light}{regular}
\DeclareBoolOption{bold}
\DeclareComplementaryOption{semibold}{bold}
\DeclareBoolOption{lining}
\DeclareComplementaryOption{oldstyle}{lining}
\DeclareBoolOption{tabular}
\DeclareComplementaryOption{proportional}{tabular}
\define@key{Rosario}{lf}[true]{%
  \kvsetkeys{Rosario}{lining=#1}%
}
\define@key{Rosario}{osf}[true]{%
  \kvsetkeys{Rosario}{oldstyle=#1}%
}
\define@key{Rosario}{tab}[true]{%
  \kvsetkeys{Rosario}{tabular=#1}%
}
\define@key{Rosario}{prop}[true]{%
  \kvsetkeys{Rosario}{proportional=#1}%
}
\ifRosario@otf
  \newcommand*\Rosario@otf@scale{}
  \define@key{Rosario}{scale}[1.0]{%
    \renewcommand*\Rosario@otf@scale{#1}%
  }
  \define@key{Rosario}{scaled}[1.0]{%
    \renewcommand*\Rosario@otf@scale{#1}%
  }
\else
  \DeclareStringOption[1.0]{scale}
  \define@key{Rosario}{scaled}[1.0]{%
    \renewcommand*\Rosario@scale{#1}%
  }
\fi
\DeclareBoolOption{familydefault}
\DeclareVoidOption{opentype}{\Rosario@otftrue}
\DeclareVoidOption{type1}{\Rosario@otffalse}
\setkeys{Rosario}{regular,bold,lining,proportional}
\ProcessKeyvalOptions{Rosario}
\newcommand*\Rosario@figurestyle{}
\newcommand*\Rosario@figurealign{}
\newcommand*\Rosario@otf@regular{}
\newcommand*\Rosario@otf@italic{}
\newcommand*\Rosario@otf@bold{}
\newcommand*\Rosario@otf@bolditalic{}
\ifRosario@regular
  \ifRosario@otf
    \def\Rosario@otf@regular{Regular}
    \def\Rosario@otf@italic{Italic}
  \else
    \def\mdseries@sf{m}
  \fi
\else
  \ifRosario@otf
    \def\Rosario@otf@regular{Light}
    \def\Rosario@otf@italic{LightItalic}
  \else
    \def\mdseries@sf{l}
  \fi
\fi
\ifRosario@bold
  \ifRosario@otf
    \def\Rosario@otf@bold{Bold}
    \def\Rosario@otf@bolditalic{BoldItalic}
  \else
    \def\bfseries@sf{b}
  \fi
\else
  \ifRosario@otf
    \def\Rosario@otf@bold{SemiBold}
    \def\Rosario@otf@bolditalic{SemiBoldItalic}
  \else
    \def\bfseries@sf{sb}
  \fi
\fi
\ifRosario@lining
  \ifRosario@otf
    \def\Rosario@figurestyle{Lining}
  \else
    \def\Rosario@figurestyle{LF}
  \fi
\else
  \ifRosario@otf
    \def\Rosario@figurestyle{OldStyle}
  \else
    \def\Rosario@figurestyle{OsF}
  \fi
\fi
\ifRosario@tabular
  \ifRosario@otf
    \def\Rosario@figurealign{Monospaced}
  \else
    \def\Rosario@figurealign{T}
  \fi
\else
  \ifRosario@otf
    \def\Rosario@figurealign{Proportional}
  \else
    \def\Rosario@figurealign{}
  \fi
\fi
\ifRosario@otf \else
  \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
  \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
  \def\sufigures{\@nomath\sufigures
    \fontfigurestyle{superior}\selectfont}
  \DeclareTextFontCommand{\textsu}{\sufigures}
  \let\textsuperior\textsu

  \fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
  \fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
  \def\infigures{\@nomath\infigures
    \fontfigurestyle{inferior}\selectfont}
  \DeclareTextFontCommand{\textin}{\infigures}
  \let\textinferior\textin

  \fa@naming@exception{figures}{{numerators}{proportional}}{Numr}
  \fa@naming@exception{figures}{{numerators}{tabular}}{Numr}
  \def\nufigures{\@nomath\nufigures
    \fontfigurestyle{numerators}\selectfont}
  \DeclareTextFontCommand{\textnu}{\nufigures}
  \let\textnumerator\textnu

  \fa@naming@exception{figures}{{denominators}{proportional}}{Dnom}
  \fa@naming@exception{figures}{{denominators}{tabular}}{Dnom}
  \def\defigures{\@nomath\defigures
    \fontfigurestyle{denominators}\selectfont}
  \DeclareTextFontCommand{\textde}{\defigures}
  \let\textdenominator\textde
\fi
\ifRosario@otf
  \defaultfontfeatures[Rosario]{%
    Extension      = .otf                        ,
    Ligatures      = {TeX,Common}                ,
    Scale          = \Rosario@otf@scale          ,
    UprightFont    = *-\Rosario@otf@regular      ,
    ItalicFont     = *-\Rosario@otf@italic       ,
    BoldFont       = *-\Rosario@otf@bold         ,
    BoldItalicFont = *-\Rosario@otf@bolditalic   ,
    FontFace       = {l}{n}{*-Light}             ,
    FontFace       = {l}{it}{*-LightItalic}      ,
    FontFace       = {m}{n}{*-Regular}           ,
    FontFace       = {m}{it}{*-Italic}           ,
    FontFace       = {b}{n}{*-Bold}              ,
    FontFace       = {b}{it}{*-BoldItalic}       ,
    FontFace       = {sb}{n}{*-SemiBold}        ,
    FontFace       = {sb}{it}{*-SemiBoldItalic} ,
    Numbers        = {\Rosario@figurestyle,\Rosario@figurealign}
  }
\fi
\ifRosario@otf
  \AtBeginDocument{%
    \setsansfont{Rosario}%
  }
\else
  \renewcommand*\sfdefault{%
    Rosario-\Rosario@figurealign\Rosario@figurestyle
  }
\fi
\ifRosario@familydefault
  \ifRosario@otf
    \AtBeginDocument{%
      \setmainfont{Rosario}%
    }
  \else
    \renewcommand*\familydefault{\sfdefault}
    \ifRosario@regular \else
      \edef\seriesdefault{\mdseries@sf}
    \fi
    \ifRosario@bold \else
      \edef\bfdefault{\bfseries@sf}
    \fi
  \fi
\fi
\endinput
%%
%% End of file `Rosario.sty'.
