diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/noto/noto-mono.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/noto/noto-mono.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto-mono.sty b/Master/texmf-dist/tex/latex/noto/noto-mono.sty new file mode 100644 index 00000000000..48b88797888 --- /dev/null +++ b/Master/texmf-dist/tex/latex/noto/noto-mono.sty @@ -0,0 +1,93 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{noto-mono} + [2018/02/19 (Bob Tennent) Supports NotoMono fonts for all LaTeX engines.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifnotomono@otf +\ifxetex + \notomono@otftrue +\else\ifluatex + \notomono@otftrue +\else % [pdf]LaTeX + \notomono@otffalse +\fi\fi + +\newcommand*{\NotoMono@scale}{1} +\DeclareOptionX{scaled}{\renewcommand*{\NotoMono@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\NotoMono@scale}{#1}} + +\DeclareOptionX{type1}{\notomono@otffalse} + +\DeclareOptionX{lining}{} +\DeclareOptionX{lf}{} +\DeclareOptionX{tabular}{} +\DeclareOptionX{tf}{} +\DeclareOptionX{proportional}{} +\DeclareOptionX{pf}{} +\DeclareOptionX{oldstyle}{} +\DeclareOptionX{osf}{} + +\DeclareOptionX{thin}{} +\DeclareOptionX{extralight}{} +\DeclareOptionX{light}{} +\DeclareOptionX{regular}{} +\DeclareOptionX{medium}{} +\DeclareOptionX{semibold}{} +\DeclareOptionX{extrabold}{} +\DeclareOptionX{black}{} +\DeclareOptionX{bold}{} + + +\ProcessOptionsX\relax + +\ifnotomono@otf +\else % type1 + \def\bfseries@tt{b} + \def\mdseries@tt{m} +\fi + +\ifnotomono@otf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,fontaxes,mweights} + \fa@naming@exception{figures}{{superior}{proportional}}{Sup} + \fa@naming@exception{figures}{{superior}{tabular}}{Sup} + \def\sufigures{\@nomath\sufigures + \fontfigurestyle{superior}\selectfont} + \DeclareTextFontCommand{\textsu}{\sufigures} + \let\textsuperior\textsu +\fi + +\ifnotomono@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \NotoMono@scale , + Extension = .otf } + \setmonofont + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic ] + {NotoMono} + \let\notomonofamily\ttdefault + \newfontfamily\notomono + [ UprightFont = *-Regular , + ItalicFont = *-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-BoldItalic ] + {NotoMono} +\else % type1 + \def\notomonofamily{NotoMono-TLF} + \newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont} + \def\ttdefault{\notomonofamily} +\fi + + +\ifnotomono@otf + % turn off defaults in case other fonts are selected: + \defaultfontfeatures{} +\fi + +\endinput |