From 1776a53c2baec4adbb7c7b4eeff63bbbffd7608e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 13 Jul 2019 21:38:54 +0000 Subject: rosario (13jul19) git-svn-id: svn://tug.org/texlive/trunk@51632 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/fonts/rosario/Rosario.dtx | 586 +++++++++++++++++---- Master/texmf-dist/source/fonts/rosario/Rosario.ins | 5 +- 2 files changed, 486 insertions(+), 105 deletions(-) (limited to 'Master/texmf-dist/source/fonts') diff --git a/Master/texmf-dist/source/fonts/rosario/Rosario.dtx b/Master/texmf-dist/source/fonts/rosario/Rosario.dtx index 243621b0015..5ed8c00786e 100644 --- a/Master/texmf-dist/source/fonts/rosario/Rosario.dtx +++ b/Master/texmf-dist/source/fonts/rosario/Rosario.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: Rosario.dtx -% Copyright (C) 2016 Arash Esbati +% Copyright (C) 2016-2019 Arash Esbati % % This work may be distributed and/or modified under the conditions % of the LaTeX Project Public License (LPPL), either version 1.3c of @@ -15,16 +15,29 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{Rosario} -% [2016/05/01 v1.0 Support for Rosario fonts (AE)] +% [2019/07/07 v2.0 Support for Rosario fonts (AE)] % %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage[osf]{mathpazo} -\usepackage[scale=0.97]{Rosario} +\usepackage[osf,scale=0.97]{Rosario} \usepackage[utf8]{inputenc} \usepackage[OT1,LY1,T1]{fontenc} -\usepackage{textcomp,fonttable,zlmtt} +\usepackage{textcomp} +\usepackage{fonttable,lipsum,array,booktabs} +\usepackage{caption} +\captionsetup[table]{% + format = plain , + labelsep = period , + justification = centerlast , + width = 0.8\linewidth , + position = top , + skip = 5pt , + font = small , + labelfont = bf +} \usepackage[activate]{microtype} +\linespread{1.02} \usepackage{hypdoc} \newcommand*\pkg[1]{\textsf{#1}} \DisableCrossrefs @@ -71,7 +84,7 @@ % % \fi % -% \CheckSum{13} +% \CheckSum{253} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -94,6 +107,15 @@ % % \MakeShortVerb{\"} % +% \changes{v2.0}{2019/07/07}{Remove `Rosario.fontspec' from the bundle +% since the functionality is now provided by the package itself} +% \changes{v2.0}{2019/07/07}{Add the `scaled' key as requested by FMi} +% \changes{v2.0}{2019/07/07}{Use NFSS scheme for fonts mapping} +% \changes{v2.0}{2019/07/07}{Rewrite major part of the code supporting +% 8 fonts. Harmonize the usage of package options over different TeX +% engines} +% \changes{v2.0}{2019/07/07}{Update OTF fonts to version 1.004 now +% consisting of 8 fonts, 844 glyphs each} % \changes{v1.0}{2016/05/01}{Initial version} % % \title{Using \textsf{Rosario} fonts with LaTeX\thanks{This file has @@ -106,8 +128,8 @@ % \noindent % This package provides the necessary files to use the % \textsf{Rosario} fonts with LaTeX. \textsf{Rosario} is a set of -% four fonts provided by Héctor Gatti, Adobe Typekit \& Omnibus-Type -% Team under the Open Font License (OFL). +% eight fonts provided by Héctor Gatti, Adobe Fonts~\& +% Omnibus-Type Team under the Open Font License (OFL). % \end{abstract} % % \tableofcontents \clearpage @@ -115,22 +137,26 @@ % \section{Introduction} % \label{sec:introduction} % -% \textsf{Rosario}\footnote{Copyright \textcopyright\ 2012--2015, -% Omnibus-Type (\url{http://www.omnibus-type.com})} is a set of four +% \textsf{Rosario}\footnote{Copyright \textcopyright\ 2012--2019, +% Omnibus-Type (\url{https://www.omnibus-type.com})} is a set of eight % fonts created by Héctor Gatti, Adobe Typekit \& Omnibus-Type Team % and provided by Omnibus-Type\footnote{Many thanks to Omnibus-Type % team for their explicit permission to upload the files to CTAN.} % under the SIL Open Font License, Version 1.1. From the web page: % \begin{quote}\sffamily -% ``\textsf{Rosario} is a classic semiserif typeface, weak contrast -% and smooth endings. Produced carefully, nice and elegant, ideal -% for magazines and academic journals. \textsf{Rosario} is the name -% of the city where the designer lives.'' +% ``\textsf{Rosario} is a singular typeface with 4 weight variants, +% plus matching italics. Its grace lies in the classic proportions. +% Its weak endings make it subtle, yet dynamic. Named after a +% crowded city, it is suitable for diverse publishing contexts, such +% as popular magazines, poetry books, illustrated editions and +% academic journals. It was designed by Héctor Gatti initially for +% private use, later on developed by the Omnibus-Type Team, and +% optimized by Adobe Fonts.'' % \end{quote} % % The fonts were obtained from Omni-Type web -% page\footnote{\url{http://www.omnibus-type.com/fonts/rosario.php}}. -% (v1.001, 4~fonts, 249~glyphs each). +% page\footnote{\url{https://www.omnibus-type.com/fonts/rosario/}}. +% (v1.004, 8~fonts, 844~glyphs each variant). % % \section{Installation} % \label{sec:installation} @@ -144,36 +170,67 @@ % The fonts can be used with traditional (pdf)TeX engine and newer % XeTeX and LuaTeX engines which can access \textsc{otf} fonts % directly. They are described below. In general, this bundle tries -% not to be smart and loads only \pkg{kvoptions}. As the result, some -% work must be done by the user. +% not to be smart and loads only \pkg{kvoptions}, \pkg{ifxetex}, +% \pkg{ifluatex}, and depending on engine \pkg{fontaxes} and +% \pkg{mweights} or \pkg{fontspec}. As the result, some work must be +% done by the user. % -% \subsection{Under (pdf)LaTeX} -% \label{sec:under-pdflatex} +% \subsection{Engine independent options} +% \label{sec:engine-indep-opti} % % A package \pkg{Rosario.sty} is provided which can be loaded in the % preamble as usual: % \begin{quote} % "\usepackage{Rosario}" % \end{quote} -% Loading the package changes the document's sans serif font to -% \textsf{Rosario}. +% Loading the package changes the document's sans-serif font to +% \textsf{Rosario}. The package offers some options. +% +% \DescribeMacro{light\,\textbar\,regular} +% The default sans-serif font series is set with one of "light" or +% "regular" -- "regular" is the default. It can be changed like this: +% \begin{quote} +% "\usepackage[light]{Rosario}" +% \end{quote} % -% \DescribeMacro{familydefault}% +% \DescribeMacro{bold\,\textbar\,semibold} +% The default bold series is set with one of "bold" or "semibold"~-- +% "bold" is the default. +% +% \DescribeMacro{lining\,\textbar\,oldstyle} +% \DescribeMacro{proportional\,\textbar\,tabular} +% The alignment and style for the figures of the document are set by +% the options "lining" or "oldstyle" and "proportional" or "tabular". +% "lining" and "proportional" are the defaults. Short aliases "lf", +% "osf", "prop" and "tab" are also available. Being boolean options, +% following example results in proportional oldstyle figures: +% \begin{quote} +% "\usepackage[lining=false,tabular=false]{Rosario}" +% \end{quote} +% +% \DescribeMacro{familydefault} % The main font of a document can be switched to \textsf{Rosario} with -% package option "`familydefault'" or "`familydefault=true'", e.g.: +% package option "familydefault" or "familydefault=true", e.g.: % \begin{quote} % "\usepackage[familydefault]{Rosario}" % \end{quote} % -% \DescribeMacro{scale}% +% \DescribeMacro{opentype\,\textbar\,type1} +% If the automatic engine detection fails, it can be specified by the +% user with one of "opentype" or "type1". Note that these option do +% not take a boolean value "true" or "false". +% +% \DescribeMacro{scale\,\textbar\,scaled} % The size of the \textsf{Rosario} fonts can be adjusted with the -% "`scale'" option. This document uses Palatino as main font and -% scales \textsf{Rosario} with: +% "scale" or "scaled" option, e.g.: % \begin{quote} % "\usepackage[scale=0.97]{Rosario}" % \end{quote} % -% \textsc{ot1}, \textsc{ly1}, \textsc{t1} and \textsc{ts}1 encodings +% \subsection{(pdf)LaTeX specific notes} +% \label{sec:under-pdflatex} +% +% \textsc{ot1}, \textsc{ly1}, \textsc{t1} and \textsc{ts1} encodings % are supported. \pkg{Rosario.sty} does not load the respective % packages, it is up to user to load them, e.g.: % \begin{quote} @@ -182,50 +239,84 @@ % "\usepackage{textcomp}" % \end{quote} % -% \subsection{Under XeLaTeX and LuaLaTeX} +% \textsf{Rosario} fonts provide a rich set of figures (see +% table~\ref{tab:figures}). With traditional engines, +% \pkg{fontaxes.sty} is loaded and the command \cmd{\fontversion} is +% available to switch between "lining", "oldstyle", "tabular" and +% "proportional" styles and alignments. For other versions the +% following macros are provided: +% \begin{itemize} +% \item "\textsu" renders its argument in superior figures. +% "\textsu{123}" produces {\sffamily\textsu{123}}. The +% corresponding declaration is "\sufigures". +% \item "\textin" renders its argument in inferior figures. +% "\textin{123}" produces {\sffamily\textin{123}}. The +% corresponding declaration is "\infigures". +% \item "\textnu" renders its argument in numerator figures. +% "\textnu{123}" produces {\sffamily\textnu{123}}. The +% corresponding declaration is "\nufigures". +% \item "\textde" renders its argument in denominator figures. +% "\textde{123}" produces {\sffamily\textde{123}}. The +% corresponding declaration is "\defigures". +% \end{itemize} +% +% \subsection{XeLaTeX/LuaLaTeX specific notes} % \label{sec:under-xelat-lual} % -% Key message: Do not load \pkg{Rosario.sty} when using XeLaTeX or -% LuaLaTeX. -% -% These engines can access \textsc{otf} fonts directly. The standard +% These engines can access \textsc{OTF} fonts directly. The standard % interface for this purpose is -% \pkg{fontspec.sty}\footnote{\url{http://ctan.org/pkg/fontspec}}. -% \pkg{Rosario.sty} does not make any provision to load -% \pkg{fontspec.sty}. This bundle provides only a file called -% \pkg{Rosario.fontspec} which can be loaded by \pkg{fontspec.sty}. -% -% \pkg{Rosario.fontspec} contains the following lines: -% \begin{quote} -% "\defaultfontfeatures[Rosario]" \\ -% " {" \\ -% " Extension = .otf ," \\ -% " BoldFont = Rosario-Bold ," \\ -% " ItalicFont = Rosario-Italic ," \\ -% " BoldItalicFont = Rosario-BoldItalic ," \\ -% " UprightFont = Rosario-Regular" \\ -% " }" -% \end{quote} -% -% The following lines in the preamble set \textsf{Rosario} as the sans -% serif font: +% \pkg{fontspec.sty}\footnote{\url{https://ctan.org/pkg/fontspec}}. +% \pkg{Rosario.sty} detects if XeLaTeX or LuaLaTeX are used and passes +% options given to the package to "\setsansfont" via +% \cmd{\defaultfeature}. Other \pkg{fontspec.sty} options can be set +% with \cmd{\defaultfeature+}: % \begin{quote} -% "\usepackage{fontspec}" \\ -% "% Load Rosario.fontspec" \\ -% "\fontspec{Rosario}" \\ -% "\setsansfont{Rosario}" -% \end{quote} -% -% Other font features can be added to the font with the following -% lines: -% \begin{quote} -% "\usepackage{fontspec}" \\ -% "% Load Rosario.fontspec" \\ -% "\fontspec{Rosario}" \\ -% "% Add features beside the ones in Rosario.fontspec" \\ -% "\defaultfontfeatures+{Color=blue}" \\ -% "\setsansfont{Rosario}" +% "\usepackage{fontspec}" \\ +% "\usepackage{Rosario}" \\ +% "\defaultfontfeatures+[Rosario]{" \\ +% " Scale = MatchLowercase ," \\ +% " Color = blue" \\ +% "}" % \end{quote} +% ^^A +% Table \ref{tab:font-features} contains a list of available font +% features. +% \begin{table}[tbp] +% \centering +% \caption{Rosario font features} +% \label{tab:font-features} +% \begin{tabular}{@{}>{\ttfamily}ll@{}} +% \toprule +% aalt & Access All Alternates \\ +% case & Case-Sensitive Forms \\ +% ccmp & Glyph Composition/Decomposition \\ +% cpsp & Capital Spacing \\ +% dnom & Denominators \\ +% frac & Fractions \\ +% kern & Kerning \\ +% liga & Standard Ligatures \\ +% lnum & Lining Figures \\ +% mark & Mark Positioning \\ +% mkmk & Mark to Mark Positioning \\ +% numr & Numerators \\ +% onum & Oldstyle Figures \\ +% ordn & Ordinals \\ +% pnum & Proportional Figures \\ +% sinf & Scientific Inferiors \\ +% subs & Subscript \\ +% sups & Superscript \\ +% tnum & Tabular Figures \\ +% zero & Slashed Zero \\ +% \bottomrule +% \end{tabular} +% \end{table} +% +% LaTeX font selection macros like \cmd{\fontseries} work with these +% engines as well. +% +% Earlier versions of this package provided a file +% \pkg{Rosario.fontspec}. The functionality in now incorporated in +% the package. Hence, \pkg{Rosario.fontspec} is removed. % % \clearpage % @@ -251,10 +342,62 @@ % % \xfonttable{TS1}{Rosario-LF}{m}{n} % +% \clearpage +% +% \section{Text samples} +% \label{sec:text-samples} +% +% \subsection*{Regular} +% {\sffamily\lipsum[1]\lipsum*[2] \quad 1234567890} +% +% \subsection*{Italic} +% {\sffamily\itshape\lipsum[1]\lipsum*[2] \quad 1234567890} +% +% \subsection*{Bold} +% {\sffamily\bfseries\lipsum[1]\lipsum*[2] \quad 1234567890} +% +% \subsection*{Bold italic} +% {\sffamily\bfseries\itshape\lipsum[1]\lipsum*[2] \quad 1234567890} +% +% \subsection*{Semi Bold} +% {\sffamily\fontseries{sb}\selectfont\lipsum[1]\lipsum*[2] \quad +% 1234567890} +% +% \subsection*{Semi Bold italic} +% {\sffamily\fontseries{sb}\selectfont\itshape\lipsum[1]\lipsum*[2] +% \quad 1234567890} +% +% \subsection*{Light} +% {\sffamily\fontseries{l}\selectfont\lipsum[1]\lipsum*[2] \quad +% 1234567890} +% +% \subsection*{Light italic} +% {\sffamily\fontseries{l}\selectfont\itshape\lipsum[1]\lipsum*[2] +% \quad 1234567890} +% +% \subsection*{Figures} +% +% \begin{table}[!h] +% \centering +% \caption{Figure styles and alignments} +% \label{tab:figures} +% \begin{tabular}{@{}l>{\sffamily}l@{}} +% \toprule +% Proportional lining & \_\figureversion{prop,lf}0123456789\_ \\ +% Tabular lining & \_\figureversion{tab,lf}0123456789\_ \\ +% Proportional oldstyle & \_\figureversion{prop,osf}0123456789\_ \\ +% Tabular oldstyle & \_\figureversion{tab,osf}0123456789\_ \\ +% Superiors & \_\sufigures 0123456789\_ \\ +% Inferiors & \_\infigures 0123456789\_ \\ +% Numerators & \_\nufigures 0123456789\_ \\ +% Denominators & \_\defigures 0123456789\_ \\ +% \bottomrule +% \end{tabular} +% \end{table} +% % \StopEventually{^^A % \PrintChanges % } -% % \clearpage % % \section{Implementation} @@ -267,27 +410,20 @@ % --encoding=OT1,T1,LY1 \ % --ts1 \ % --sanserif \ -% --defaultlining \ -% --defaultproportional \ -% --nooldstyle \ -% --notabular \ % --nosmallcaps \ % --noswash \ % --notitling \ -% --nosuperiors \ -% --noinferiors \ +% --inferiors=subs \ % --fractions \ % --noornaments \ -% --noupdmap \ +% --ligatures \ % --verbose \ -% Rosario-*.otf +% Rosario-*.otf % \end{verbatim} % \vspace{-\baselineskip} % % We don't use the \pkg{Rosario.sty} generated by "autoinst" and use -% our version instead. We extract two files out of \pkg{Rosario.dtx}: -% \pkg{Rosario.sty} and \pkg{Rosario.fontspec}. -% +% our version instead. % % \subsection{Rosario.sty} % \label{sec:rosario.sty} @@ -296,9 +432,45 @@ %<*package> % \end{macrocode} % +% Require the packages \pkg{ifxetex.sty} and \pkg{ifluatex.sty}: +% \begin{macrocode} +\RequirePackage{ifxetex} +\RequirePackage{ifluatex} +% \end{macrocode} +% +% First, we need a switch to know which engine is used: +% \begin{macrocode} +\newif\ifRosario@otf +\ifxetex % we are in XeTeX + \Rosario@otftrue +\else + \ifluatex % we are in LuaTeX + \Rosario@otftrue + \else + \Rosario@otffalse + \fi +\fi +% \end{macrocode} +% +% Load the packages we rely on: +% \pkg{fontspec.sty}\footnote{\url{https://www.ctan.org/pkg/fontspec}} +% for LuaTeX and XeTeX, or +% \pkg{mweights.sty}\footnote{\url{https://www.ctan.org/pkg/mweights}} +% and +% \pkg{fontaxes.sty}\footnote{\url{https://www.ctan.org/pkg/fontaxes}} +% for (pdf)LaTeX: +% \begin{macrocode} +\ifRosario@otf + \RequirePackage{fontspec} +\else + \RequirePackage{mweights} + \RequirePackage{fontaxes} +\fi +% \end{macrocode} +% % We use -% \pkg{kvoptions}\footnote{\url{http://www.ctan.org/pkg/kvoptions}} -% for our purposes: +% \pkg{kvoptions}\footnote{\url{https://www.ctan.org/pkg/kvoptions}} +% for key handling: % \begin{macrocode} \RequirePackage{kvoptions} % \end{macrocode} @@ -310,52 +482,262 @@ } % \end{macrocode} % -% Declare the keys provided by the package und process them: +% The basic strategy for font and figure related keys is to declare +% them as complementary ones, i.e. "regular" vs. "light", "bold" +% vs. "semibold", "lining" vs. "oldstyle" and "proportional" +% vs. "tabular": +% \begin{macrocode} +\DeclareBoolOption{regular} +\DeclareComplementaryOption{light}{regular} +\DeclareBoolOption{bold} +\DeclareComplementaryOption{semibold}{bold} +\DeclareBoolOption{lining} +\DeclareComplementaryOption{oldstyle}{lining} +\DeclareBoolOption{tabular} +\DeclareComplementaryOption{proportional}{tabular} +% \end{macrocode} +% +% Alias keys are defined as boolean keys as well: +% \begin{macrocode} +\DeclareBoolOption{lf} +\DeclareComplementaryOption{osf}{lf} +\DeclareBoolOption{tab} +\DeclareComplementaryOption{prop}{tab} +% \end{macrocode} +% +% "scale" and "scaled" keys are special: With (pdf)LaTeX, "scale" is a +% string option, "scaled" is an alias and sets \cmd{\Rosario@scale} +% which is defined by the "scale" key. With XeLaTeX and LuaLaTeX, +% they set the macro \cmd{\Rosario@otf@scale} which is later used in +% \cmd{\defaultfontfeatures}. +% \begin{macrocode} +\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 +% \end{macrocode} +% +% "familydefault" switches the default font to \textsf{Rosario}: % \begin{macrocode} -\DeclareStringOption[1.0]{scale} \DeclareBoolOption{familydefault} +% \end{macrocode} +% +% The next 2 are for users where the automatic engine detection might +% fail: +% \begin{macrocode} +\DeclareVoidOption{opentype}{\Rosario@otftrue} +\DeclareVoidOption{type1}{\Rosario@otffalse} +% \end{macrocode} +% +% Execute the default options and process the rest. +% \begin{macrocode} +\setkeys{Rosario}{regular,bold,lining,proportional} \ProcessKeyvalOptions{Rosario} % \end{macrocode} % -% Switch the sans serif font to \textsf{Rosario}; the fonts provide -% only proportional lining figures, hence we hard-code them to our -% font: +% Process the alias keys and set the real one with \cmd{\kvsetkeys}: % \begin{macrocode} -\renewcommand*{\sfdefault}{Rosario-LF} +\ifRosario@lf + \kvsetkeys{Rosario}{lining=true} +\else + \kvsetkeys{Rosario}{lining=false} +\fi +\ifRosario@tab + \kvsetkeys{Rosario}{tabular=true} +\else + \kvsetkeys{Rosario}{tabular=false} +\fi % \end{macrocode} % -% Switch the default font if the respective key is given: +% We need some macros to store the figure alignment and style and font +% defintions: % \begin{macrocode} -\ifRosario@familydefault - \renewcommand*{\familydefault}{\sfdefault} +\newcommand*\Rosario@figurestyle{} +\newcommand*\Rosario@figurealign{} +\newcommand*\Rosario@otf@regular{} +\newcommand*\Rosario@otf@italic{} +\newcommand*\Rosario@otf@bold{} +\newcommand*\Rosario@otf@bolditalic{} +% \end{macrocode} +% +% Definition for "light" and "regular" keys for all engines: +% \begin{macrocode} +\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 % \end{macrocode} % +% Definition for "semibold" and "bold" keys for all engines: % \begin{macrocode} -% +\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 +% \end{macrocode} +% +% Definition for figure styles for all engines: +% \begin{macrocode} +\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 % \end{macrocode} % -% \subsection{Rosario.fontspec} -% \label{sec:rosario.fontspec} +% Definition for figure alignments for all engines: +% \begin{macrocode} +\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 +% \end{macrocode} % +% Standard setup for \pkg{fontaxes.sty}. This is only relevant for +% (pdf)LaTeX: % \begin{macrocode} -%<*fontspec> +\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 % \end{macrocode} % -% This is pretty straight forward: +% For XeLaTeX/LuaLaTeX, we define the font features depending on the +% given package options: % \begin{macrocode} -\defaultfontfeatures[Rosario] - { - Extension = .otf , - BoldFont = Rosario-Bold , - ItalicFont = Rosario-Italic , - BoldItalicFont = Rosario-BoldItalic , - UprightFont = Rosario-Regular +\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 % \end{macrocode} % +% Switch the sans serif font to \textsf{Rosario}. With +% \pkg{fontspec}, we delay the \cmd{\setsansfont} until +% "AtBeginDocument" so that user can provide additional features with +% \cmd{\defaultfontfeatures+}. % \begin{macrocode} -% +\ifRosario@otf + \AtBeginDocument{% + \setsansfont{Rosario}% + } +\else + \renewcommand*\sfdefault{% + Rosario-\Rosario@figurealign\Rosario@figurestyle + } +\fi +% \end{macrocode} +% +% Switch the default font if the respective key is given: +% \begin{macrocode} +\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 +% \end{macrocode} +% +% \begin{macrocode} +% % \end{macrocode} % % \Finale diff --git a/Master/texmf-dist/source/fonts/rosario/Rosario.ins b/Master/texmf-dist/source/fonts/rosario/Rosario.ins index a6f61044396..b9685b0c436 100644 --- a/Master/texmf-dist/source/fonts/rosario/Rosario.ins +++ b/Master/texmf-dist/source/fonts/rosario/Rosario.ins @@ -1,6 +1,6 @@ %% %% File: Rosario.ins -%% Copyright (c) 2016 Arash Esbati +%% Copyright (c) 2016-2019 Arash Esbati %% %% This work may be distributed and/or modified under the conditions %% of the LaTeX Project Public License (LPPL), either version 1.3c of @@ -16,7 +16,7 @@ \preamble -Copyright (C) 2016 Arash Esbati +Copyright (C) 2016-2019 Arash Esbati This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of @@ -28,7 +28,6 @@ version of this license is in the file: \endpreamble \generate{ \file{\jobname.sty}{\from{\jobname.dtx}{package}} - \file{\jobname.fontspec}{\from{\jobname.dtx}{fontspec}} } \obeyspaces -- cgit v1.2.3