diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fira/FiraMono.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fira/FiraMono.sty | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fira/FiraMono.sty b/Master/texmf-dist/tex/latex/fira/FiraMono.sty new file mode 100644 index 00000000000..b4f6e062720 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fira/FiraMono.sty @@ -0,0 +1,129 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{FiraMono} + [2015/05/09 (Bob Tennent and autoinst) Style file for Fira Mono fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\iffiramono@otf +\ifxetex + \firamono@otftrue +\else\ifluatex + \firamono@otftrue +\else % [pdf]LaTeX + \firamono@otffalse +\fi\fi + +\newif\iffiramono@lining \firamono@liningfalse + +\newif\iffiramono@medium \firamono@mediumfalse + +\newcommand*{\FiraMono@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\FiraSans@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\FiraSans@scale}{#1}} +\DeclareOptionX{type1}{\firamono@otffalse} +\DeclareOptionX{lining}{\firamono@liningtrue} +\DeclareOptionX{lf}{\firamono@liningtrue} +\DeclareOptionX{oldstyle}{\firamono@liningfalse} +\DeclareOptionX{osf}{\firamono@liningfalse} + +\DeclareOptionX{medium}{\firamono@mediumtrue} +\DeclareOptionX{mb}{\firamono@mediumtrue} + +\ProcessOptionsX + +\iffiramono@otf + \iffiramono@lining + \def\firamono@figurestyle{Lining} + \else + \def\firamono@figurestyle{OldStyle} + \fi +\else % type1 + \iffiramono@lining + \def\firamono@figurestyle{LF} + \else + \def\firamono@figurestyle{OsF} + \fi +\fi + +\iffiramono@otf + \def\firamono@boldstyle{Bold} + \def\firamono@regstyle{Regular} + \iffiramono@medium\def\firamono@regstyle{Medium}\fi + +\else % type1 + + \def\bfseries@tt{b} + \def\mdseries@tt{m} + \iffiramono@medium\def\mdseries@tt{mb}\fi +\fi + + +\iffiramono@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,mweights,fontaxes} +\fi + +\iffiramono@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \FiraMono@scale , + Extension = .otf } + \setmonofont + [ Numbers = {Monospaced,\firamono@figurestyle}, + UprightFont = *-\firamono@regstyle , + ItalicFont = *-\firamono@regstyle , + BoldFont = *-\firamono@boldstyle , + BoldItalicFont = *-\firamono@boldstyle , + ] + {FiraMono} + % grab current family in case of subsequent change: + \let\firamonofamily\sfdefault + + \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} + \newfontfamily\firamonooldstyle + [ Numbers = {Monospaced,OldStyle}, + UprightFont = *-\firamono@regstyle , + ItalicFont = *-\firamono@regstyle , + BoldFont = *-\firamono@boldstyle , + BoldItalicFont = *-\firamono@boldstyle , + ] + {FiraMono} + \newfontfamily\firamonolining + [ Numbers = {Monospaced,Lining}, + UprightFont = *-\firamono@regstyle , + ItalicFont = *-\firamono@regstyle , + BoldFont = *-\firamono@boldstyle , + BoldItalicFont = *-\firamono@boldstyle , + ] + {FiraMono} + \newfontfamily\firamonomedium + [ Numbers = {Monospaced,\firamono@figurestyle}, + UprightFont = *-Medium , + ItalicFont = *-Medium , + BoldFont = *-\firamono@boldstyle , + BoldItalicFont = *-\firamono@boldstyle , + ] + {FiraMono} + +\else % type1 + + \def\firamono@family{FiraMono-T\firamono@figurestyle} + \def\ttdefault{\firamono@family} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont} + + \def\firamonooldstyle{\fontfamily{FiraMono-TOsF}\selectfont} + \def\firamonolining{\fontfamily{FiraMono-TLF}\selectfont} + + \def\firamonomedium{\fontfamily{\firamono@family}\fontseries{mb}\selectfont} +\fi + + +\iffiramono@otf + \defaultfontfeatures{} +\fi + +\endinput |