summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noto/noto-mono.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/noto/noto-mono.sty')
-rw-r--r--Master/texmf-dist/tex/latex/noto/noto-mono.sty224
1 files changed, 183 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto-mono.sty b/Master/texmf-dist/tex/latex/noto/noto-mono.sty
index 5629eb20d57..7ff17110461 100644
--- a/Master/texmf-dist/tex/latex/noto/noto-mono.sty
+++ b/Master/texmf-dist/tex/latex/noto/noto-mono.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{noto-mono}
- [2019/04/22 (Bob Tennent) Supports NotoMono fonts for all LaTeX engines.]
+ [2019/05/18 (Bob Tennent) Supports NotoSansMono fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
@@ -13,41 +13,121 @@
\notomono@otffalse
\fi\fi
-\newcommand*{\NotoMono@scale}{1}
-\DeclareOptionX{scaled}{\renewcommand*{\NotoMono@scale}{#1}}
-\DeclareOptionX{scale}{\renewcommand*{\NotoMono@scale}{#1}}
+\newcommand*{\NotoSansMono@scale}{1}
+\DeclareOptionX{scaled}{\renewcommand*{\NotoSansMono@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\NotoSansMono@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}{}
+\newif\ifnotomono@oldstyle \notomono@oldstylefalse
+\newif\ifnotomono@proportional \notomono@proportionalfalse
+
+\DeclareOptionX{lining}{\notomono@oldstylefalse}
+\DeclareOptionX{lf}{\notomono@oldstylefalse}
+\DeclareOptionX{tabular}{\notomono@proportionalfalse}
+\DeclareOptionX{tf}{\notomono@proportionalfalse}
+\DeclareOptionX{proportional}{\notomono@proportionaltrue}
+\DeclareOptionX{pf}{\notomono@proportionaltrue}
+\DeclareOptionX{oldstyle}{\notomono@oldstyletrue}
+\DeclareOptionX{osf}{\notomono@oldstyletrue}
+
+\newif\ifnotomono@thin \notomono@thinfalse
+\newif\ifnotomono@extralight \notomono@extralightfalse
+\newif\ifnotomono@light \notomono@lightfalse
+\newif\ifnotomono@medium \notomono@mediumfalse
+\newif\ifnotomono@semibold \notomono@semiboldfalse
+\newif\ifnotomono@extrabold \notomono@extraboldfalse
+\newif\ifnotomono@black \notomono@blackfalse
+
+\newif\ifnotomono@condensed \notomono@condensedfalse
+\newif\ifnotomono@semicondensed \notomono@semicondensedfalse
+\newif\ifnotomono@extracondensed \notomono@extracondensedfalse
+
+\DeclareOptionX{thin}{\notomono@thintrue}
+\DeclareOptionX{extralight}{\notomono@extralighttrue}
+\DeclareOptionX{light}{\notomono@lighttrue}
+\DeclareOptionX{regular}{\notomono@lightfalse\notomono@thinfalse\notomono@extralightfalse\notomono@mediumfalse}
+\DeclareOptionX{medium}{\notomono@mediumtrue}
+\DeclareOptionX{semibold}{\notomono@semiboldtrue}
+\DeclareOptionX{extrabold}{\notomono@extraboldtrue}
+\DeclareOptionX{black}{\notomono@blacktrue}
+\DeclareOptionX{bold}{\notomono@blackfalse\notomono@semiboldfalse\notomono@extraboldfalse}
+\DeclareOptionX{condensed}{\notomono@condensedtrue}
+\DeclareOptionX{semicondensed}{\notomono@semicondensedtrue}
+\DeclareOptionX{extracondensed}{\notomono@extracondensedtrue}
\ProcessOptionsX\relax
\ifnotomono@otf
+ \def\notomono@boldstyle{Bold}
+ \ifnotomono@semibold\def\notomono@boldstyle{SemiBold}\fi
+ \ifnotomono@extrabold\def\notomono@boldstyle{ExtraBold}\fi
+ \ifnotomono@black\def\notomono@boldstyle{Black}\fi
+ \def\notomono@regstyle{Regular}
+ \ifnotomono@thin\def\notomono@regstyle{Thin}\fi
+ \ifnotomono@extralight\def\notomono@regstyle{ExtraLight}\fi
+ \ifnotomono@light\def\notomono@regstyle{Light}\fi
+ \ifnotomono@medium\def\notomono@regstyle{Medium}\fi
+
\else % type1
- \def\bfseries@tt{bold}
- \def\mdseries@tt{regular}
+ \def\bfseries@tt{bold}\def\mdseries@tt{regular}
+ \ifnotomono@semibold\def\bfseries@tt{semibold}\fi
+ \ifnotomono@extrabold\bfseries@tt{extrabold}\fi
+ \ifnotomono@black\def\bfseries@tt{black}\fi
+ \ifnotomono@thin\def\mdseries@tt{thin}\fi
+ \ifnotomono@extralight\def\mdseries@tt{extralight}\fi
+ \ifnotomono@light\def\mdseries@tt{light}\fi
+ \ifnotomono@medium\def\mdseries@tt{medium}\fi
+
+ \ifnotomono@condensed
+ \def\bfseries@tt{boldcondensed}\def\mdseries@tt{condensed}
+ \ifnotomono@semibold\def\bfseries@tt{semiboldcondensed}\fi
+ \ifnotomono@extrabold\def\bfseries@tt{extraboldcondensed}\fi
+ \ifnotomono@black\def\bfseries@tt{blackcondensed}\fi
+ \ifnotomono@thin\def\mdseries@tt{thincondensed}\fi
+ \ifnotomono@extralight\def\mdseries@tt{extralightcondensed}\fi
+ \ifnotomono@light\def\mdseries@tt{lightcondensed}\fi
+ \ifnotomono@medium\def\mdseries@tt{mediumcondensed}\fi
+ \else\ifnotomono@semicondensed
+ \def\bfseries@tt{boldsemicondensed}\def\mdseries@tt{semicondensed}
+ \ifnotomono@semibold\def\bfseries@tt{semiboldsemicondensed}\fi
+ \ifnotomono@extrabold\def\bfseries@tt{extraboldsemicondensed}\fi
+ \ifnotomono@black\def\bfseries@tt{blacksemicondensed}\fi
+ \ifnotomono@thin\def\mdseries@tt{thinsemicondensed}\fi
+ \ifnotomono@extralight\def\mdseries@tt{extralightsemicondensed}\fi
+ \ifnotomono@light\def\mdseries@tt{lightsemicondensed}\fi
+ \ifnotomono@medium\def\mdseries@rm{mediumsemicondensed}\fi
+ \else\ifnotomono@extracondensed
+ \def\bfseries@tt{boldextracondensed}\def\mdseries@tt{extracondensed}
+ \ifnotomono@semibold\def\bfseries@tt{semiboldextracondensed}\fi
+ \ifnotomono@extrabold\def\bfseries@tt{extraboldextracondensed}\fi
+ \ifnotomono@black\def\bfseries@tt{blackextracondensed}\fi
+ \ifnotomono@thin\def\mdseries@tt{thinextracondensed}\fi
+ \ifnotomono@extralight\def\mdseries@tt{extralightextracondensed}\fi
+ \ifnotomono@light\def\mdseries@tt{lightextracondensed}\fi
+ \ifnotomono@medium\def\mdseries@rm{mediumextracondensed}\fi
+ \fi\fi\fi
+
\fi
\ifnotomono@otf
+
+ \def\notomono@figurestyle{Lining}
+ \ifnotomono@oldstyle\def\notomono@figurestyle{OldStyle}\fi
+ \def\notomono@figurealign{Monospaced}
+ \ifnotomono@proportional\def\notomono@figurealign{Proportional}\fi
+
+\fi
+% type1
+
+ \def\notomono@tonefigurestyle{LF}
+ \ifnotomono@oldstyle\def\notomono@tonefigurestyle{OsF}\fi
+ \def\notomono@tonefigurealign{T}
+ \ifnotomono@proportional\def\notomono@tonefigurealign{}\fi
+
+\ifnotomono@otf
\RequirePackage{fontspec}
\else
\RequirePackage{fontenc,fontaxes,mweights}
@@ -55,36 +135,98 @@
\fa@naming@exception{figures}{{superior}{tabular}}{Sup}
\def\sufigures{\@nomath\sufigures
\fontfigurestyle{superior}\selectfont}
- \DeclareTextFontCommand{\textsu}{\sufigures}
- \let\textsuperior\textsu
\fi
\ifnotomono@otf
+ \def\notomono@regular{Regular}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
Ligatures = TeX ,
- Scale = \NotoMono@scale ,
- Extension = .otf }
- \setmonofont
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
- {NotoMono}
+ Extension = .ttf }
+ \def\notomono@Lining{Lining}
+ \ifnotomono@condensed
+ \setmonofont
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff, % NotoSansMono has the liga feature!
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-Condensed}
+ \else\ifnotomono@semicondensed
+ \setmonofont
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-SemiCondensed}
+ \else\ifnotomono@extracondensed
+ \setmonofont
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-ExtraCondensed}
+ \else
+ \setmonofont
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *-\notomono@regstyle ,
+ BoldFont = *-\notomono@boldstyle ,
+ ]
+ {NotoSansMono}
+ \fi\fi\fi
\let\notomonofamily\ttdefault
\newfontfamily\notomono
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
- {NotoMono}
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *-\notomono@regstyle ,
+ BoldFont = *-\notomono@boldstyle ,
+ ]
+ {NotoSansMono}
+ \newfontfamily\notomonocondensed
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-Condensed}
+ \newfontfamily\notomonosemicondensed
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-SemiCondensed}
+ \newfontfamily\notomonoextracondensed
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ Ligatures = CommonOff,
+ UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
+ BoldFont = *\notomono@boldstyle ,
+ ]
+ {NotoSansMono-ExtraCondensed}
+ \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
\else % type1
- \def\notomonofamily{NotoMono-TLF}
+ \def\notomonofamily{NotoSansMono-T\notomono@tonefigurestyle}
\newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont}
+ \newcommand*\notomonocondensed{\fontfamily{\notomonofamily}\fontseries{condensed}\selectfont}
+ \newcommand*\notomonosemicondensed{\fontfamily{\notomonofamily}\fontseries{semicondensed}\selectfont}
+ \newcommand*\notomonoextracondensed{\fontfamily{\notomonofamily}\fontseries{extracondensed}\selectfont}
\def\ttdefault{\notomonofamily}
\fi
-\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoMono-TLF}\selectfont}
+\DeclareTextFontCommand{\textsu}{\sufigures}
+\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoSansMono-T\notomono@tonefigurestyle}\selectfont}
+
\ifnotomono@otf
% turn off defaults in case other fonts are selected: