diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/roboto/roboto.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/roboto/roboto.sty | 394 |
1 files changed, 218 insertions, 176 deletions
diff --git a/Master/texmf-dist/tex/latex/roboto/roboto.sty b/Master/texmf-dist/tex/latex/roboto/roboto.sty index 7cf03f8a798..d92437dc4a7 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/03/01 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.] + [2019/04/05 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -38,8 +38,8 @@ \DeclareOptionX{thin}{\roboto@thintrue\roboto@lightfalse} \DeclareOptionX{light}{\roboto@lighttrue\roboto@thinfalse} \DeclareOptionX{regular}{\roboto@lightfalse\roboto@thinfalse} -\DeclareOptionX{condensed}{\roboto@condensedtrue\roboto@thinfalse} -\DeclareOptionX{rm}{\roboto@slabtrue} +\DeclareOptionX{condensed}{\roboto@condensedtrue\roboto@slabfalse\roboto@thinfalse} +\DeclareOptionX{rm}{\roboto@slabtrue\roboto@condensedfalse} \DeclareOptionX{lining}{\roboto@liningtrue} \DeclareOptionX{nf}{\roboto@liningtrue} \DeclareOptionX{lf}{\roboto@liningtrue} @@ -64,15 +64,23 @@ \else % type1 - \def\bfseries@sf{b} - \ifroboto@medium\def\bfseries@sf{mb}\fi - \ifroboto@black\def\bfseries@sf{k}\fi - \def\mdseries@sf{m} - \ifroboto@thin\def\mdseries@sf{t} - \ifroboto@slab\def\mdseries@rm{t}\fi\fi - \ifroboto@light\def\mdseries@sf{l} - \ifroboto@slab\def\mdseries@rm{l}\fi\fi - \def\seriesdefault{\mdseries@rm} + \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 @@ -113,7 +121,7 @@ \defaultfontfeatures{ Ligatures = TeX , Scale = \Roboto@scale , - Extension = .ttf } + Extension = .otf } \ifroboto@condensed \setsansfont [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, @@ -121,18 +129,7 @@ ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, BoldFont = *-Bold , BoldItalicFont = *-BoldItalic , - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic} ] + ] {RobotoCondensed} \else \setsansfont @@ -141,30 +138,7 @@ ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, BoldFont = *-\roboto@boldstyle , BoldItalicFont = *-\roboto@boldstyle Italic , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {t}{it}{*-ThinItalic}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {mb}{n}{*-Medium}, - FontFace = {mb}{sc}{*-Medium}, - FontFace = {mb}{sl}{*-Medium}, - FontFace = {mb}{it}{*-MediumItalic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic}, - FontFace = {k}{n}{*-Black}, - FontFace = {k}{sc}{*-Black}, - FontFace = {k}{sl}{*-Black}, - FontFace = {k}{it}{*-BlackItalic} ] + ] {Roboto} \fi % grab current family in case of subsequent change: @@ -173,18 +147,7 @@ \setmainfont [ UprightFont = *-\roboto@regstyle , BoldFont = *-Bold , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold} ] + ] {RobotoSlab} \fi \ifroboto@default\renewcommand*\familydefault{\robotofamily}\fi @@ -194,30 +157,7 @@ ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, BoldFont = *-\roboto@boldstyle , BoldItalicFont = *-\roboto@boldstyle Italic , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {t}{it}{*-ThinItalic}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {mb}{n}{*-Medium}, - FontFace = {mb}{sc}{*-Medium}, - FontFace = {mb}{sl}{*-Medium}, - FontFace = {mb}{it}{*-MediumItalic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic}, - FontFace = {k}{n}{*-Black}, - FontFace = {k}{sc}{*-Black}, - FontFace = {k}{sl}{*-Black}, - FontFace = {k}{it}{*-BlackItalic} ] + ] {Roboto} \newfontfamily\robotocondensed [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, @@ -225,104 +165,167 @@ ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, BoldFont = *-Bold , BoldItalicFont = *-BoldItalic , - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic} ] + ] {RobotoCondensed} \newfontfamily\robotoslab [ UprightFont = *-\roboto@regstyle , BoldFont = *-Bold , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold} ] + ] {RobotoSlab} - \newfontfamily\robotoOsF - [ Numbers = {\roboto@figurealign,OldStyle}, - UprightFont = *-\roboto@regstyle , - ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, - BoldFont = *-\roboto@boldstyle , - BoldItalicFont = *-\roboto@boldstyle Italic , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {t}{it}{*-ThinItalic}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {mb}{n}{*-Medium}, - FontFace = {mb}{sc}{*-Medium}, - FontFace = {mb}{sl}{*-Medium}, - FontFace = {mb}{it}{*-MediumItalic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic}, - FontFace = {k}{n}{*-Black}, - FontFace = {k}{sc}{*-Black}, - FontFace = {k}{sl}{*-Black}, - FontFace = {k}{it}{*-BlackItalic} ] - {Roboto} - \newfontfamily\robotoLF - [ Numbers = {\roboto@figurealign,Lining}, - UprightFont = *-\roboto@regstyle , - ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, - BoldFont = *-\roboto@boldstyle , - BoldItalicFont = *-\roboto@boldstyle Italic , - FontFace = {t}{n}{*-Thin}, - FontFace = {t}{sc}{*-Thin}, - FontFace = {t}{sl}{*-Thin}, - FontFace = {t}{it}{*-ThinItalic}, - FontFace = {l}{n}{*-Light}, - FontFace = {l}{sc}{*-Light}, - FontFace = {l}{sl}{*-Light}, - FontFace = {l}{it}{*-LightItalic}, - FontFace = {m}{n}{*-Regular}, - FontFace = {m}{sc}{*-Regular}, - FontFace = {m}{sl}{*-Regular}, - FontFace = {m}{it}{*-Italic}, - FontFace = {mb}{n}{*-Medium}, - FontFace = {mb}{sc}{*-Medium}, - FontFace = {mb}{sl}{*-Medium}, - FontFace = {mb}{it}{*-MediumItalic}, - FontFace = {b}{n}{*-Bold}, - FontFace = {b}{sc}{*-Bold}, - FontFace = {b}{sl}{*-Bold}, - FontFace = {b}{it}{*-BoldItalic}, - FontFace = {k}{n}{*-Black}, - FontFace = {k}{sc}{*-Black}, - FontFace = {k}{sl}{*-Black}, - FontFace = {k}{it}{*-BlackItalic} ] - {Roboto} - \DeclareTextFontCommand{\oldstylenums}{\robotoOsF} - \DeclareTextFontCommand{\liningnums}{\robotoLF} + \ifroboto@condensed + \newfontfamily\robotoregular + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Regular , + ItalicFont = *-Italic, + ] + {RobotoCondensed} + \newfontfamily\robotolight + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic, + ] + {RobotoCondensed} + \newfontfamily\robotobold + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Bold , + ItalicFont = *-BoldItalic, + ] + {RobotoCondensed} + \newfontfamily\robotoosf + [ Numbers = {Proportional,OldStyle}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {RobotoCondensed} + \newfontfamily\robotolf + [ Numbers = {Proportional,Lining}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {RobotoCondensed} + \newfontfamily\robototlf + [ Numbers = {Monospaced,Lining}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {RobotoCondensed} + \newfontfamily\robototosf + [ Numbers = {Monospaced,OldStyle}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {RobotoCondensed} + \else\ifroboto@slab + \newfontfamily\robotoregular + [ + UprightFont = *-Regular , + ] + {RobotoSlab} + \newfontfamily\robotothin + [ + UprightFont = *-Thin , + ] + {RobotoSlab} + \newfontfamily\robotolight + [ + UprightFont = *-Light , + ] + {RobotoSlab} + \newfontfamily\robotobold + [ + UprightFont = *-Bold , + ] + {RobotoSlab} + \newfontfamily\robotolf + [ Numbers = {Lining}, + UprightFont = *-\roboto@regstyle , + BoldFont = *-\roboto@boldstyle , + ] + {RobotoSlab} + \else + \newfontfamily\robotoregular + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Regular , + ItalicFont = *-Italic, + ] + {Roboto} + \newfontfamily\robotomedium + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Medium , + ItalicFont = *-MediumItalic, + ] + {Roboto} + \newfontfamily\robotothin + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Thin , + ItalicFont = *-ThinItalic, + ] + {Roboto} + \newfontfamily\robotolight + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic, + ] + {Roboto} + \newfontfamily\robotobold + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Bold , + ItalicFont = *-BoldItalic, + ] + {Roboto} + \newfontfamily\robotoblack + [ Numbers = {\roboto@figurealign,\roboto@figurestyle}, + UprightFont = *-Black , + ItalicFont = *-BlackItalic, + ] + {Roboto} + \newfontfamily\robotoosf + [ Numbers = {Proportional,OldStyle}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {Roboto} + \newfontfamily\robotolf + [ Numbers = {Proportional,Lining}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {Roboto} + \newfontfamily\robototlf + [ Numbers = {Monospaced,Lining}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {Roboto} + \newfontfamily\robototosf + [ Numbers = {Monospaced,OldStyle}, + UprightFont = *-\roboto@regstyle , + ItalicFont = *-\ifx\roboto@regstyle\roboto@regular Italic\else\roboto@regstyle Italic\fi, + BoldFont = *-\roboto@boldstyle , + BoldItalicFont = *-\roboto@boldstyle Italic , + ] + {Roboto} + \fi\fi + \else % type1 \def\robotofamily{Roboto-\roboto@figurealign\roboto@figurestyle} \def\robotocondensedfamily{RobotoCondensed-\roboto@figurealign\roboto@figurestyle} - \def\robotoslabfamily{RobotoSlab-LF} + \def\robotoslabfamily{RobotoSlab-TLF} \newcommand*\roboto{\fontfamily{\robotofamily}\selectfont} \newcommand*\robotocondensed{\fontfamily{\robotocondensedfamily}\selectfont} \newcommand*\robotoslab{\fontfamily{\robotoslabfamily}\selectfont} @@ -330,12 +333,51 @@ \ifroboto@condensed\def\sfdefault{\robotocondensedfamily}\fi \ifroboto@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi \ifroboto@slab\edef\rmdefault{\robotoslabfamily}\fi + + \ifroboto@slab + \def\robotoregular{\fontfamily{\rmdefault}\fontseries{regular}\selectfont} + \def\robotomedium{\fontfamily{\rmdefault}\fontseries{medium}\selectfont} + \def\robotothin{\fontfamily{\rmdefault}\fontseries{thin}\selectfont} + \def\robotolight{\fontfamily{\rmdefault}\fontseries{light}\selectfont} + \def\robotobold{\fontfamily{\rmdefault}\fontseries{bold}\selectfont} + \def\robotoblack{\fontfamily{\rmdefault}\fontseries{black}\selectfont} + \else + \def\robotoregular{\fontfamily{\sfdefault}\fontseries{regular}\selectfont} + \def\robotomedium{\fontfamily{\sfdefault}\fontseries{medium}\selectfont} + \def\robotothin{\fontfamily{\sfdefault}\fontseries{thin}\selectfont} + \def\robotolight{\fontfamily{\sfdefault}\fontseries{light}\selectfont} + \def\robotobold{\fontfamily{\sfdefault}\fontseries{bold}\selectfont} + \def\robotoblack{\fontfamily{\sfdefault}\fontseries{black}\selectfont} + \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} + \else\ifroboto@slab + \def\robototlf{\fontfamily{RobotoSlab-TLF}\selectfont} + \else + \def\robototlf{\fontfamily{Roboto-TLF}\selectfont} + \def\robotolf{\fontfamily{Roboto-LF}\selectfont} + \def\robotoosf{\fontfamily{Roboto-OsF}\selectfont} + \def\robototosf{\fontfamily{Roboto-TOsF}\selectfont} + \fi\fi - \DeclareTextFontCommand{\oldstylenums}{\fontfamily{Roboto-\roboto@figurealign OsF}\selectfont} - \DeclareTextFontCommand{\liningnums}{\fontfamily{Roboto-\roboto@figurealign LF}\selectfont} \fi +\DeclareTextFontCommand{\robotoRegular}{\robotoregular} +\DeclareTextFontCommand{\robotoMedium}{\robotomedium} +\DeclareTextFontCommand{\robotoThin}{\robotothin} +\DeclareTextFontCommand{\robotoLight}{\robotolight} +\DeclareTextFontCommand{\robotoBold}{\robotobold} +\DeclareTextFontCommand{\robotoBlack}{\robotoblack} +\DeclareTextFontCommand{\robotoTLF}{\robototlf} +\DeclareTextFontCommand{\robotoLF}{\robotolf} +\DeclareTextFontCommand{\robotoOsF}{\robotoosf} +\DeclareTextFontCommand{\robotoTOsF}{\robototosf} + \ifroboto@otf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} |