summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/roboto/roboto.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/roboto/roboto.sty')
-rw-r--r--Master/texmf-dist/tex/latex/roboto/roboto.sty80
1 files changed, 71 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/roboto/roboto.sty b/Master/texmf-dist/tex/latex/roboto/roboto.sty
index 0b9e7f937f6..987c1613907 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}
- [2014/08/12 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.]
+ [2015/04/16 (Bob Tennent) Supports Roboto fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
@@ -13,6 +13,8 @@
\roboto@otffalse
\fi\fi
+\newif\ifroboto@lining \roboto@liningfalse
+\newif\ifroboto@tabular \roboto@tabularfalse
\newif\ifroboto@default \roboto@defaultfalse
\newcommand*{\Roboto@scale}{1}
@@ -38,8 +40,18 @@
\DeclareOptionX{regular}{\roboto@lightfalse\roboto@thinfalse}
\DeclareOptionX{condensed}{\roboto@condensedtrue\roboto@thinfalse}
\DeclareOptionX{rm}{\roboto@slabtrue}
+\DeclareOptionX{lining}{\roboto@liningtrue}
+\DeclareOptionX{nf}{\roboto@liningtrue}
+\DeclareOptionX{lf}{\roboto@liningtrue}
+\DeclareOptionX{oldstyle}{\roboto@liningfalse}
+\DeclareOptionX{osf}{\roboto@liningfalse}
+\DeclareOptionX{tabular}{\roboto@tabulartrue}
+\DeclareOptionX{t}{\roboto@tabulartrue}
+\DeclareOptionX{proportional}{\roboto@tabularfalse}
+\DeclareOptionX{p}{\roboto@tabularfalse}
-\ExecuteOptionsX{bold,regular}
+
+\ExecuteOptionsX{bold,regular,lining,proportional}
\ProcessOptionsX\relax
\ifroboto@otf
@@ -64,6 +76,31 @@
\fi
\ifroboto@otf
+ \ifroboto@lining
+ \def\roboto@figurestyle{Lining}
+ \else
+ \def\roboto@figurestyle{OldStyle}
+ \fi
+ \ifroboto@tabular
+ \def\roboto@figurealign{Monospaced}
+ \else
+ \def\roboto@figurealign{Proportional}
+ \fi
+\else % type1
+ \ifroboto@lining
+ \def\roboto@figurestyle{LF}
+ \else
+ \def\roboto@figurestyle{OsF}
+ \fi
+ \ifroboto@tabular
+ \def\roboto@figurealign{T}
+ \else
+ \def\roboto@figurealign{}
+ \fi
+\fi
+
+
+\ifroboto@otf
\RequirePackage{fontspec}
\else
\RequirePackage{fontenc,fontaxes,mweights}
@@ -77,14 +114,16 @@
Extension = .ttf }
\ifroboto@condensed
\setsansfont
- [ UprightFont = *-\roboto@regstyle ,
+ [ Numbers = {\roboto@figurealign,\roboto@figurestyle},
+ UprightFont = *-\roboto@regstyle ,
ItalicFont = *-\roboto@regstyle Italic ,
BoldFont = *-Bold ,
BoldItalicFont = *-BoldItalic ]
{RobotoCondensed}
\else
\setsansfont
- [ UprightFont = *-\roboto@regstyle ,
+ [ Numbers = {\roboto@figurealign,\roboto@figurestyle},
+ UprightFont = *-\roboto@regstyle ,
ItalicFont = *-\roboto@regstyle Italic ,
BoldFont = *-\roboto@boldstyle ,
BoldItalicFont = *-\roboto@boldstyle Italic ]
@@ -100,13 +139,15 @@
\fi
\ifroboto@default\renewcommand*\familydefault{\robotofamily}\fi
\newfontfamily\roboto
- [ UprightFont = *-\roboto@regstyle ,
+ [ Numbers = {\roboto@figurealign,\roboto@figurestyle},
+ UprightFont = *-\roboto@regstyle ,
ItalicFont = *-\roboto@regstyle Italic ,
BoldFont = *-\roboto@boldstyle ,
BoldItalicFont = *-\roboto@boldstyle Italic ]
{Roboto}
\newfontfamily\robotocondensed
- [ UprightFont = *-\roboto@regstyle ,
+ [ Numbers = {\roboto@figurealign,\roboto@figurestyle},
+ UprightFont = *-\roboto@regstyle ,
ItalicFont = *-\roboto@regstyle Italic ,
BoldFont = *-Bold ,
BoldItalicFont = *-BoldItalic ]
@@ -115,9 +156,26 @@
[ UprightFont = *-\roboto@regstyle ,
BoldFont = *-Bold ]
{RobotoSlab}
+ \newfontfamily\robotoOsF
+ [ Numbers = {\roboto@figurealign,OldStyle},
+ UprightFont = *-\roboto@regstyle ,
+ ItalicFont = *-\roboto@regstyle Italic ,
+ BoldFont = *-\roboto@boldstyle ,
+ BoldItalicFont = *-\roboto@boldstyle Italic ]
+ {Roboto}
+ \newfontfamily\robotoLF
+ [ Numbers = {\roboto@figurealign,Lining},
+ UprightFont = *-\roboto@regstyle ,
+ ItalicFont = *-\roboto@regstyle Italic ,
+ BoldFont = *-\roboto@boldstyle ,
+ BoldItalicFont = *-\roboto@boldstyle Italic ]
+ {Roboto}
+ \DeclareTextFontCommand{\oldstylenums}{\robotoOsF}
+ \DeclareTextFontCommand{\liningnums}{\robotoLF}
+
\else % type1
- \def\robotofamily{Roboto-LF}
- \def\robotocondensedfamily{RobotoCondensed-LF}
+ \def\robotofamily{Roboto-\roboto@figurealign\roboto@figurestyle}
+ \def\robotocondensedfamily{RobotoCondensed-\roboto@figurealign\roboto@figurestyle}
\def\robotoslabfamily{RobotoSlab-LF}
\newcommand*\roboto{\fontfamily{\robotofamily}\selectfont}
\newcommand*\robotocondensed{\fontfamily{\robotocondensedfamily}\selectfont}
@@ -126,10 +184,14 @@
\ifroboto@condensed\def\sfdefault{\robotocondensedfamily}\fi
\ifroboto@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi
\ifroboto@slab\edef\rmdefault{\robotoslabfamily}\fi
+
+ \DeclareTextFontCommand{\oldstylenums}{\fontfamily{Roboto-\roboto@figurealign OsF}\selectfont}
+ \DeclareTextFontCommand{\liningnums}{\fontfamily{Roboto-\roboto@figurealign LF}\selectfont}
+
\fi
\ifroboto@otf
-% turn off defaults in case other fonts are selected:
+ % turn off defaults in case other fonts are selected:
\defaultfontfeatures{}
\fi