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.sty163
1 files changed, 42 insertions, 121 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto-mono.sty b/Master/texmf-dist/tex/latex/noto/noto-mono.sty
index 61f36d939dc..f82fba56c27 100644
--- a/Master/texmf-dist/tex/latex/noto/noto-mono.sty
+++ b/Master/texmf-dist/tex/latex/noto/noto-mono.sty
@@ -1,16 +1,16 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{noto-mono}
- [2019/10/22 (Bob Tennent) Supports NotoSansMono fonts for all LaTeX engines.]
+ [2021/09/06 (Bob Tennent) Supports NotoSansMono fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
-\newif\ifnotomono@otf
+\newif\ifnotomono@ttf
\ifxetex
- \notomono@otftrue
+ \notomono@ttftrue
\else\ifluatex
- \notomono@otftrue
+ \notomono@ttftrue
\else % [pdf]LaTeX
- \notomono@otffalse
+ \notomono@ttffalse
\fi\fi
\newcommand*{\NotoSansMono@scale}{1}
@@ -18,7 +18,7 @@
\DeclareOptionX{scale}{\renewcommand*{\NotoSansMono@scale}{#1}}
-\DeclareOptionX{type1}{\notomono@otffalse}
+\DeclareOptionX{type1}{\notomono@ttffalse}
\newif\ifnotomono@oldstyle \notomono@oldstylefalse
\newif\ifnotomono@proportional \notomono@proportionalfalse
@@ -40,10 +40,6 @@
\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}
@@ -53,14 +49,10 @@
\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
+\ifnotomono@ttf
\def\notomono@boldstyle{Bold}
\ifnotomono@semibold\def\notomono@boldstyle{SemiBold}\fi
\ifnotomono@extrabold\def\notomono@boldstyle{ExtraBold}\fi
@@ -81,53 +73,25 @@
\ifnotomono@light\def\mdseries@tt{l}\fi
\ifnotomono@medium\def\mdseries@tt{medium}\fi
- \ifnotomono@condensed
- \def\bfseries@tt{boldcondensed}\def\mdseries@tt{c}
- \ifnotomono@semibold\def\bfseries@tt{sbc}\fi
- \ifnotomono@extrabold\def\bfseries@tt{ebc}\fi
- \ifnotomono@black\def\bfseries@tt{ubc}\fi
- \ifnotomono@thin\def\mdseries@tt{ulc}\fi
- \ifnotomono@extralight\def\mdseries@tt{elc}\fi
- \ifnotomono@light\def\mdseries@tt{lc}\fi
- \ifnotomono@medium\def\mdseries@tt{mediumcondensed}\fi
- \else\ifnotomono@semicondensed
- \def\bfseries@tt{boldsemicondensed}\def\mdseries@tt{sc}
- \ifnotomono@semibold\def\bfseries@tt{sbsc}\fi
- \ifnotomono@extrabold\def\bfseries@tt{ebsc}\fi
- \ifnotomono@black\def\bfseries@tt{ubsc}\fi
- \ifnotomono@thin\def\mdseries@tt{ulsc}\fi
- \ifnotomono@extralight\def\mdseries@tt{elsc}\fi
- \ifnotomono@light\def\mdseries@tt{lsc}\fi
- \ifnotomono@medium\def\mdseries@rm{mediumsemicondensed}\fi
- \else\ifnotomono@extracondensed
- \def\bfseries@tt{boldextracondensed}\def\mdseries@tt{ec}
- \ifnotomono@semibold\def\bfseries@tt{sbec}\fi
- \ifnotomono@extrabold\def\bfseries@tt{ebec}\fi
- \ifnotomono@black\def\bfseries@tt{ubec}\fi
- \ifnotomono@thin\def\mdseries@tt{ulec}\fi
- \ifnotomono@extralight\def\mdseries@tt{elec}\fi
- \ifnotomono@light\def\mdseries@tt{lec}\fi
- \ifnotomono@medium\def\mdseries@rm{mediumextracondensed}\fi
- \fi\fi\fi
-
\fi
-\ifnotomono@otf
+\ifnotomono@ttf
\def\notomono@figurestyle{Lining}
\ifnotomono@oldstyle\def\notomono@figurestyle{OldStyle}\fi
\def\notomono@figurealign{Monospaced}
\ifnotomono@proportional\def\notomono@figurealign{Proportional}\fi
-\fi
-% type1
+\else % type1
- \def\notomono@tonefigurestyle{LF}
- \ifnotomono@oldstyle\def\notomono@tonefigurestyle{OsF}\fi
- \def\notomono@tonefigurealign{T}
- \ifnotomono@proportional\def\notomono@tonefigurealign{}\fi
+ \def\notomono@figurestyle{LF}
+ \ifnotomono@oldstyle\def\notomono@figurestyle{OsF}\fi
+ \def\notomono@figurealign{T}
+ \ifnotomono@proportional\def\notomono@figurealign{}\fi
-\ifnotomono@otf
+\fi
+
+\ifnotomono@ttf
\RequirePackage{fontspec}
\else
\RequirePackage{fontenc,fontaxes,mweights}
@@ -137,92 +101,49 @@
\fontfigurestyle{superior}\selectfont}
\fi
-\ifnotomono@otf
+\ifnotomono@ttf
\def\notomono@regular{Regular}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
HyphenChar=None,
- Ligatures = CommonOff,
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 ,
- 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 ,
- 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 ,
- UprightFont = *-\notomono@regstyle ,
- BoldFont = *-\notomono@boldstyle ,
- ]
- {NotoSansMono}
- \fi\fi\fi
+ \setmonofont
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ UprightFont = *-\notomono@regstyle ,
+ BoldFont = *-\notomono@boldstyle ,
+ ]
+ {NotoSansMono}
\let\notomonofamily\ttdefault
\newfontfamily\notomono
- [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- UprightFont = *-\notomono@regstyle ,
- BoldFont = *-\notomono@boldstyle ,
- ]
- {NotoSansMono}
- \newfontfamily\notomonocondensed
- [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- 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 ,
- 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 ,
- UprightFont = *\ifx\notomono@regstyle\notomono@regular\else\notomono@regstyle\fi,
- BoldFont = *\notomono@boldstyle ,
- ]
- {NotoSansMono-ExtraCondensed}
+ [ Numbers = {\ifx\notomono@figurestyle\notomono@Lining\else\notomono@figurestyle\fi} ,
+ Scale = \NotoSansMono@scale ,
+ UprightFont = *-\notomono@regstyle ,
+ BoldFont = *-\notomono@boldstyle ,
+ ]
+ {NotoSansMono}
\providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
\else % type1
- \def\notomonofamily{NotoSansMono-T\notomono@tonefigurestyle}
+ \def\notomonofamily{NotoSansMono-T\notomono@figurestyle}
\newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont}
- \newcommand*\notomonocondensed{\fontfamily{\notomonofamily}\fontseries{c}\selectfont}
- \newcommand*\notomonosemicondensed{\fontfamily{\notomonofamily}\fontseries{sc}\selectfont}
- \newcommand*\notomonoextracondensed{\fontfamily{\notomonofamily}\fontseries{ec}\selectfont}
\def\ttdefault{\notomonofamily}
\fi
\DeclareTextFontCommand{\textsu}{\sufigures}
-\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoSansMono-T\notomono@tonefigurestyle}\selectfont}
-\ifnotomono@otf
+% LGR
+
+\def\notomono@figurestyle{LF}
+\ifnotomono@oldstyle\def\notomono@figurestyle{OsF}\fi
+\def\notomono@figurealign{T}
+\ifnotomono@proportional\def\notomono@figurealign{}\fi
+
+\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoSansMono-\notomono@figurealign\notomono@figurestyle}\selectfont}
+
+
+\ifnotomono@ttf
% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}
\fi