diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fira/FiraSans.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fira/FiraSans.sty | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fira/FiraSans.sty b/Master/texmf-dist/tex/latex/fira/FiraSans.sty new file mode 100644 index 00000000000..c793f3c00f7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fira/FiraSans.sty @@ -0,0 +1,183 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{FiraSans} + [2014/03/16 (Bob Tennent and autoinst) Style file for Fira Sans fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\iffira@otf +\ifxetex + \fira@otftrue +\else\ifluatex + \fira@otftrue +\else % [pdf]LaTeX + \fira@otffalse +\fi\fi + +\newif\iffira@lining \fira@liningfalse +\newif\iffira@tabular \fira@tabularfalse +\newif\iffira@medium \fira@mediumfalse +\newif\iffira@light \fira@lightfalse +\newif\iffira@default \fira@defaultfalse + +\newcommand*{\FiraSansOT@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\FiraSansOT@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\FiraSansOT@scale}{#1}} +\DeclareOptionX{type1}{\fira@otffalse} +\DeclareOptionX{lining}{\fira@liningtrue} +\DeclareOptionX{lf}{\fira@liningtrue} +\DeclareOptionX{oldstyle}{\fira@liningfalse} +\DeclareOptionX{osf}{\fira@liningfalse} +\DeclareOptionX{tabular}{\fira@tabulartrue} +\DeclareOptionX{t}{\fira@tabulartrue} +\DeclareOptionX{proportional}{\fira@tabularfalse} +\DeclareOptionX{p}{\fira@tabularfalse} +\DeclareOptionX{medium}{\fira@mediumtrue} +\DeclareOptionX{mb}{\fira@mediumtrue} +\DeclareOptionX{light}{\fira@lighttrue} +\DeclareOptionX{l}{\fira@lighttrue} +\DeclareOptionX{default}{\fira@defaulttrue} +\DeclareOptionX{sfdefault}{\fira@defaulttrue} + + +\ProcessOptionsX + +\iffira@otf + \iffira@lining + \def\fira@figurestyle{Lining} + \else + \def\fira@figurestyle{OldStyle} + \fi + \iffira@tabular + \def\fira@figurealign{Monospaced} + \else + \def\fira@figurealign{Proportional} + \fi +\else % type1 + \iffira@lining + \def\fira@figurestyle{LF} + \else + \def\fira@figurestyle{OsF} + \fi + \iffira@tabular + \def\fira@figurealign{T} + \else + \def\fira@figurealign{} + \fi +\fi + +\iffira@otf + \def\fira@boldstyle{Bold} + \iffira@medium\def\fira@boldstyle{Medium}\fi + \def\fira@regstyle{Regular} + \iffira@light\def\fira@regstyle{Light}\fi + +\else % type1 + + \def\bfseries@sf{b} + \iffira@medium\def\bfseries@sf{mb}\fi + \def\mdseries@sf{m} + \iffira@light\def\mdseries@sf{l}\fi +\fi + + +\iffira@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,mweights,fontaxes} +\fi + +\iffira@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \FiraSansOT@scale , + Extension = .otf } + \setsansfont + [ Numbers = {\fira@figurealign,\fira@figurestyle}, + UprightFont = *-\fira@regstyle , + ItalicFont = *-\fira@regstyle Italic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + % grab current family in case of subsequent change: + \let\firafamily\sfdefault + \iffira@default\renewcommand*\familydefault{\firafamily}\fi + + \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} + \newfontfamily\firaoldstyle + [ Numbers = {\fira@figurealign,OldStyle}, + UprightFont = *-\fira@regstyle , + ItalicFont = *-\fira@regstyle Italic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + \newfontfamily\firalining + [ Numbers = {\fira@figurealign,Lining}, + UprightFont = *-\fira@regstyle , + ItalicFont = *-\fira@regstyle Italic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + \newfontfamily\firatabular + [ Numbers = {Monospaced,\fira@figurestyle}, + UprightFont = *-\fira@regstyle , + ItalicFont = *-\fira@regstyle Italic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + \newfontfamily\firaproportional + [ Numbers = {Proportional,\fira@figurestyle}, + UprightFont = *-\fira@regstyle , + ItalicFont = *-\fira@regstyle Italic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + \newfontfamily\firalight + [ Numbers = {\fira@figurealign,\fira@figurestyle}, + UprightFont = *-Light , + ItalicFont = *-LightItalic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + \newfontfamily\firamedium + [ Numbers = {\fira@figurealign,\fira@figurestyle}, + UprightFont = *-Medium , + ItalicFont = *-MediumItalic , + BoldFont = *-\fira@boldstyle , + BoldItalicFont = *-\fira@boldstyle Italic , + ] + {FiraSansOT} + +\else % type1 + + \def\fira@family{FiraSansOT-\fira@figurealign\fira@figurestyle} + \renewcommand*\sfdefault{\fira@family} + \iffira@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi + + \fa@naming@exception{figures}{{superior}{proportional}}{Sup} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont} + + \def\firaoldstyle{\fontfamily{FiraSansOT-\fira@figurealign OsF}\selectfont} + \def\firalining{\fontfamily{FiraSansOT-\fira@figurealign LF}\selectfont} + \def\firatabular{\fontfamily{FiraSansOT-T\fira@figurestyle}\selectfont} + \def\firaproportional{\fontfamily{FiraSansOT-\fira@figurestyle}\selectfont} + + \def\firalight{\fontfamily{\fira@family}\fontseries{l}\selectfont} + \def\firamedium{\fontfamily{\fira@family}\fontseries{mb}\selectfont} + +\fi + + +\iffira@otf + \defaultfontfeatures{} +\fi + +\endinput |