diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lato/lato.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lato/lato.sty | 192 |
1 files changed, 101 insertions, 91 deletions
diff --git a/Master/texmf-dist/tex/latex/lato/lato.sty b/Master/texmf-dist/tex/latex/lato/lato.sty index 5cc69384c90..cf17d183d22 100644 --- a/Master/texmf-dist/tex/latex/lato/lato.sty +++ b/Master/texmf-dist/tex/latex/lato/lato.sty @@ -1,5 +1,5 @@ %% lato.sty -%% Copyright 2017 Mohamed El Morabity +%% Copyright 2019 Mohamed El Morabity % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License, either version 1.3 of this license or (at your option) @@ -15,7 +15,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lato}[2017/10/22 Style file for Lato.] +\ProvidesPackage{lato}[2019/06/15 Style file for Lato.] \RequirePackage{fontaxes} \RequirePackage{ifluatex} @@ -24,13 +24,13 @@ \newif\iflato@otf \ifxetex - \lato@otftrue + \lato@otftrue \else - \ifluatex - \lato@otftrue - \else - \lato@otffalse - \fi + \ifluatex + \lato@otftrue + \else + \lato@otffalse + \fi \fi \newif\iflato@lining @@ -47,6 +47,7 @@ \newcommand*{\lato@scale}{1} \DeclareOptionX{scale}{\renewcommand*{\lato@scale}{#1}} +\DeclareOptionX{scaled}{\renewcommand*{\lato@scale}{#1}} \DeclareOptionX{default}{\lato@defaulttrue} \DeclareOptionX{defaultsans}{\lato@defaultsanstrue} @@ -61,18 +62,18 @@ \relax \iflato@tabular - \newcommand*{\lato@figurewidth@otf}{Monospaced} - \newcommand*{\lato@figurewidth@pfb}{T} + \newcommand*{\lato@figurewidth@otf}{Monospaced} + \newcommand*{\lato@figurewidth@pfb}{T} \else - \newcommand*{\lato@figurewidth@otf}{Proportional} - \newcommand*{\lato@figurewidth@pfb}{} + \newcommand*{\lato@figurewidth@otf}{Proportional} + \newcommand*{\lato@figurewidth@pfb}{} \fi \iflato@lining - \newcommand*{\lato@figurestyle@otf}{Lining} - \newcommand*{\lato@figurestyle@pfb}{LF} + \newcommand*{\lato@figurestyle@otf}{Lining} + \newcommand*{\lato@figurestyle@pfb}{LF} \else - \newcommand*{\lato@figurestyle@otf}{OldStyle} - \newcommand*{\lato@figurestyle@pfb}{OsF} + \newcommand*{\lato@figurestyle@otf}{OldStyle} + \newcommand*{\lato@figurestyle@pfb}{OsF} \fi \newcommand*{\lato@familyprefix}{lato} @@ -80,84 +81,93 @@ \newcommand*{\latofamily}{\lato@family{\lato@figurewidth@pfb\lato@figurestyle@pfb}} \iflato@otf - \RequirePackage{fontspec} - - \ifxetex - \XeTeXtracingfonts=1 - \fi - - \newcommand*{\lato@otf@features}{% - Ligatures=Common,% - Scale=\lato@scale,% - FontFace={ul}{n}{Lato Hairline},% - FontFace={ul}{it}{Lato Hairline Italic},% - FontFace={el}{n}{Lato Thin},% - FontFace={el}{it}{Lato Thin Italic},% - FontFace={l}{n}{Lato Light},% - FontFace={l}{it}{Lato Light Italic},% - FontFace={mb}{n}{Lato Medium},% - FontFace={mb}{it}{Lato Medium Italic},% - FontFace={sb}{n}{Lato Semibold},% - FontFace={sb}{it}{Lato Semibold Italic},% - FontFace={eb}{n}{Lato Heavy},% - FontFace={eb}{it}{Lato Heavy Italic},% - FontFace={ub}{n}{Lato Black},% - FontFace={ub}{it}{Lato Black Italic}% - } - - % Define family for each figure style/width, with corresponding - % NFSS family, for fontaxes support - \newfontfamily{\lato@otf@TLF}[% - \lato@otf@features,% - Numbers={Monospaced,Lining},% - NFSSFamily=\lato@family{TLF}% - ]{Lato} - \newfontfamily{\lato@otf@LF}[% - \lato@otf@features,% - Numbers={Proportional,Lining},% - NFSSFamily=\lato@family{LF}% - ]{Lato} - \newfontfamily{\lato@otf@TOsF}[% - \lato@otf@features,% - Numbers={Monospaced,OldStyle},% - NFSSFamily=\lato@family{TOsF}% + \RequirePackage{fontspec} + + \ifxetex + \XeTeXtracingfonts=1 + \fi + + \newcommand*{\lato@otf@features}{% + Extension=.ttf,% + Ligatures=Common,% + Scale=\lato@scale,% + FontFace={ul}{n}{*-Hairline},% + FontFace={ul}{it}{*-HairlineItalic},% + FontFace={el}{n}{*-Thin},% + FontFace={el}{it}{*-ThinItalic},% + FontFace={l}{n}{*-Light},% + FontFace={l}{it}{*-LightItalic},% + UprightFont={*-Regular},% + ItalicFont={*-Italic},% + FontFace={mb}{n}{*-Medium},% + FontFace={mb}{it}{*-MediumItalic},% + FontFace={sb}{n}{*-Semibold},% + FontFace={sb}{it}{*-SemiboldItalic},% + FontFace={b}{n}{*-Bold},% + FontFace={b}{it}{*-BoldItalic},% + BoldFont={*-Bold},% + BoldItalicFont={*-BoldItalic},% + FontFace={eb}{n}{*-Heavy},% + FontFace={eb}{it}{*-HeavyItalic},% + FontFace={ub}{n}{*-Black},% + FontFace={ub}{it}{*-BlackItalic}% + } + + % Define family for each figure style/width, with corresponding + % NFSS family, for fontaxes support + \newfontfamily{\lato@otf@TLF}[% + \lato@otf@features,% + Numbers={Monospaced,Lining},% + NFSSFamily=\lato@family{TLF}% + ]{Lato} + \newfontfamily{\lato@otf@LF}[% + \lato@otf@features,% + Numbers={Proportional,Lining},% + NFSSFamily=\lato@family{LF}% + ]{Lato} + \newfontfamily{\lato@otf@TOsF}[% + \lato@otf@features,% + Numbers={Monospaced,OldStyle},% + NFSSFamily=\lato@family{TOsF}% + ]{Lato} + \newfontfamily{\lato@otf@OsF}[% + \lato@otf@features,% + Numbers={Proportional,OldStyle},% + NFSSFamily=\lato@family{OsF}% + ]{Lato} + + \expandafter\let\expandafter\lato\csname lato@otf@\lato@figurewidth@pfb\lato@figurestyle@pfb\endcsname + + % Legacy compatibility + \newfontfamily{\flafamily}[% + \lato@otf@features,% + Numbers={Monospaced,Lining},% + NFSSFamily=fla% + ]{Lato} + + \iflato@defaultsans + \setsansfont[% + \lato@otf@features,% + Numbers={\lato@figurewidth@otf,\lato@figurestyle@otf},% ]{Lato} - \newfontfamily{\lato@otf@OsF}[% - \lato@otf@features,% - Numbers={Proportional,OldStyle},% - NFSSFamily=\lato@family{OsF}% + \fi + \iflato@default + \setmainfont[% + \lato@otf@features,% + Numbers={\lato@figurewidth@otf,\lato@figurestyle@otf},% ]{Lato} - - \expandafter\let\expandafter\lato\csname lato@otf@\lato@figurewidth@pfb\lato@figurestyle@pfb\endcsname - % Legacy compatibility - \newfontfamily{\flafamily}[% - Numbers={Monospaced,Lining},% - NFSSFamily=fla% - ]{Lato} - - \iflato@defaultsans - \setsansfont[% - \lato@otf@features,% - Numbers={\lato@figurewidth@otf,\lato@figurestyle@otf},% - ]{Lato} - \fi - \iflato@default - \setmainfont[% - \lato@otf@features,% - Numbers={\lato@figurewidth@otf,\lato@figurestyle@otf},% - ]{Lato} - \fi + \fi \else - \newcommand*{\lato}{\fontfamily{\latofamily}\selectfont} - % Legacy compatibility - \newcommand*{\flafamily}{\fontfamily{lato-TLF}\selectfont} - - \iflato@defaultsans - \renewcommand*{\sfdefault}{\latofamily} - \fi - \iflato@default - \renewcommand*{\familydefault}{\latofamily} - \fi + \newcommand*{\lato}{\fontfamily{\latofamily}\selectfont} + % Legacy compatibility + \newcommand*{\flafamily}{\fontfamily{lato-TLF}\selectfont} + + \iflato@defaultsans + \renewcommand*{\sfdefault}{\latofamily} + \fi + \iflato@default + \renewcommand*{\familydefault}{\latofamily} + \fi \fi \endinput |