diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/roboto/roboto.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/roboto/roboto.sty | 83 |
1 files changed, 57 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/roboto/roboto.sty b/Master/texmf-dist/tex/latex/roboto/roboto.sty index d92437dc4a7..ac70a062c0a 100644 --- a/Master/texmf-dist/tex/latex/roboto/roboto.sty +++ b/Master/texmf-dist/tex/latex/roboto/roboto.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{roboto} - [2019/04/05 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.] + [2019/04/19 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -18,9 +18,8 @@ \newif\ifroboto@default \roboto@defaultfalse \newcommand*{\Roboto@scale}{1} -\newcommand*{\RobotoCondensed@scale}{1} -\DeclareOptionX{scaled}{\renewcommand*{\Roboto@scale}{#1}\renewcommand*{\RobotoCondensed@scale}{#1}} -\DeclareOptionX{scale}{\renewcommand*{\Roboto@scale}{#1}\renewcommand*{\RobotoCondensed@scale}{#1}} +\DeclareOptionX{scaled}{\renewcommand*{\Roboto@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\Roboto@scale}{#1}} \newif\ifroboto@light \roboto@lightfalse \newif\ifroboto@thin \roboto@thinfalse @@ -64,22 +63,29 @@ \else % type1 - \def\bfseries@sf{bold} - \ifroboto@medium\def\bfseries@sf{medium}\fi - \ifroboto@black\def\bfseries@sf{black}\fi - \ifroboto@slab - \def\mdseries@rm{regular} - \else - \def\mdseries@sf{regular} - \fi - \ifroboto@thin\def\mdseries@sf{thin} - \ifroboto@slab\def\mdseries@rm{thin}\fi\fi - \ifroboto@light\def\mdseries@sf{light} - \ifroboto@slab\def\mdseries@rm{light}\fi\fi - \ifroboto@slab - \def\seriesdefault{\mdseries@rm} - \else + \ifroboto@condensed + \def\bfseries@sf{boldcondensed} + \def\mdseries@sf{condensed} + \ifroboto@light\def\mdseries@sf{lightcondensed}\fi \def\seriesdefault{\mdseries@sf} + \else + \def\bfseries@sf{bold} + \ifroboto@medium\def\bfseries@sf{medium}\fi + \ifroboto@black\def\bfseries@sf{black}\fi + \ifroboto@slab + \def\mdseries@rm{regular} + \else + \def\mdseries@sf{regular} + \fi + \ifroboto@thin\def\mdseries@sf{thin} + \ifroboto@slab\def\mdseries@rm{thin}\fi\fi + \ifroboto@light\def\mdseries@sf{light} + \ifroboto@slab\def\mdseries@rm{light}\fi\fi + \ifroboto@slab + \def\seriesdefault{\mdseries@rm} + \else + \def\seriesdefault{\mdseries@sf} + \fi \fi \fi @@ -167,6 +173,14 @@ BoldItalicFont = *-BoldItalic , ] {RobotoCondensed} + \newfontfamily\robotoboldcondensed + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Bold , + ItalicFont = *-BoldItalic, + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic , + ] + {RobotoCondensed} \newfontfamily\robotoslab [ UprightFont = *-\roboto@regstyle , BoldFont = *-Bold , @@ -324,13 +338,12 @@ \else % type1 \def\robotofamily{Roboto-\roboto@figurealign\roboto@figurestyle} - \def\robotocondensedfamily{RobotoCondensed-\roboto@figurealign\roboto@figurestyle} \def\robotoslabfamily{RobotoSlab-TLF} \newcommand*\roboto{\fontfamily{\robotofamily}\selectfont} - \newcommand*\robotocondensed{\fontfamily{\robotocondensedfamily}\selectfont} \newcommand*\robotoslab{\fontfamily{\robotoslabfamily}\selectfont} + \newcommand*\robotocondensed{\fontseries{c}\selectfont} + \newcommand*\robotoboldcondensed{\fontseries{bc}\selectfont} \def\sfdefault{\robotofamily} - \ifroboto@condensed\def\sfdefault{\robotocondensedfamily}\fi \ifroboto@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi \ifroboto@slab\edef\rmdefault{\robotoslabfamily}\fi @@ -351,12 +364,15 @@ \fi \ifroboto@condensed - \def\robototlf{\fontfamily{RobotoCondensed-TLF}\selectfont} - \def\robotolf{\fontfamily{RobotoCondensed-LF}\selectfont} - \def\robotoosf{\fontfamily{RobotoCondensed-OsF}\selectfont} - \def\robotoTOsF{\fontfamily{RobotoCondensed-TOsF}\selectfont} + \def\robototlf{\fontfamily{Roboto-TLF}\fontseries{c}\selectfont} + \def\robotolf{\fontfamily{Roboto-LF}\fontseries{c}\selectfont} + \def\robotoosf{\fontfamily{Roboto-OsF}\fontseries{c}\selectfont} + \def\robotoTOsF{\fontfamily{Roboto-TOsF}\fontseries{c}\selectfont} \else\ifroboto@slab \def\robototlf{\fontfamily{RobotoSlab-TLF}\selectfont} + \def\robotottlf{\fontfamily{RobotoSlab-TLF}\selectfont} + \def\robotoosf{\fontfamily{RobotoSlab-OsF}\selectfont} + \def\robotosf{\fontfamily{RobotoSlab-TOsF}\selectfont} \else \def\robototlf{\fontfamily{Roboto-TLF}\selectfont} \def\robotolf{\fontfamily{Roboto-LF}\selectfont} @@ -378,6 +394,21 @@ \DeclareTextFontCommand{\robotoOsF}{\robotoosf} \DeclareTextFontCommand{\robotoTOsF}{\robototosf} +\def\robotoslablgr{\fontencoding{LGR}\fontfamily{RobotoSlab-TLF}\selectfont} + % use RobotoSlab-* even for otf +\ifroboto@lining + \def\robotolgr@figurestyle{LF} +\else + \def\robotolgr@figurestyle{OsF} +\fi +\ifroboto@tabular + \def\robotolgr@figurealign{T} +\else + \def\robotolgr@figurealign{} +\fi +\def\robotolgr{\fontencoding{LGR}\fontfamily{Roboto-\robotolgr@figurealign\robotolgr@figurestyle}\selectfont} + % use Roboto-* even for otf + \ifroboto@otf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} |