summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noto/noto.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-06 21:09:57 +0000
committerKarl Berry <karl@freefriends.org>2021-09-06 21:09:57 +0000
commit413605d769296bf1a73c81b2438907ffe1ba1102 (patch)
treebd8e4f830c3c52c251291ed7fac74a009c6e44ae /Master/texmf-dist/tex/latex/noto/noto.sty
parent1122e9230a234a4185b6f851f2fe2982eca72fa8 (diff)
noto (6sep21)
git-svn-id: svn://tug.org/texlive/trunk@60434 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/noto/noto.sty')
-rw-r--r--Master/texmf-dist/tex/latex/noto/noto.sty331
1 files changed, 57 insertions, 274 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto.sty b/Master/texmf-dist/tex/latex/noto/noto.sty
index 2eac633e13b..f5ef7f7200f 100644
--- a/Master/texmf-dist/tex/latex/noto/noto.sty
+++ b/Master/texmf-dist/tex/latex/noto/noto.sty
@@ -1,16 +1,16 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{noto}
- [2019/10/22 (Bob Tennent) Supports Noto fonts for all LaTeX engines.]
+ [2021/09/06 (Bob Tennent) Supports Noto fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
-\newif\ifnoto@otf
+\newif\ifnoto@ttf
\ifxetex
- \noto@otftrue
+ \noto@ttftrue
\else\ifluatex
- \noto@otftrue
+ \noto@ttftrue
\else % [pdf]LaTeX
- \noto@otffalse
+ \noto@ttffalse
\fi\fi
\newif\ifnoto@sfdefault \noto@sfdefaultfalse
@@ -30,7 +30,7 @@
\DeclareOptionX{nott}{\noto@ttfalse}
\DeclareOptionX{sfdefault}{\noto@sfdefaulttrue}
-\DeclareOptionX{type1}{\noto@otffalse}
+\DeclareOptionX{type1}{\noto@ttffalse}
\newif\ifnoto@oldstyle \noto@oldstylefalse
@@ -53,10 +53,6 @@
\newif\ifnoto@extrabold \noto@extraboldfalse
\newif\ifnoto@black \noto@blackfalse
-\newif\ifnoto@condensed \noto@condensedfalse
-\newif\ifnoto@semicondensed \noto@semicondensedfalse
-\newif\ifnoto@extracondensed \noto@extracondensedfalse
-
\DeclareOptionX{thin}{\noto@thintrue}
\DeclareOptionX{extralight}{\noto@extralighttrue}
\DeclareOptionX{light}{\noto@lighttrue}
@@ -66,14 +62,11 @@
\DeclareOptionX{extrabold}{\noto@extraboldtrue}
\DeclareOptionX{black}{\noto@blacktrue}
\DeclareOptionX{bold}{\noto@blackfalse\noto@semiboldfalse\noto@extraboldfalse}
-\DeclareOptionX{condensed}{\noto@condensedtrue}
-\DeclareOptionX{semicondensed}{\noto@semicondensedtrue}
-\DeclareOptionX{extracondensed}{\noto@extracondensedtrue}
\ProcessOptionsX\relax
-\ifnoto@otf
+\ifnoto@ttf
\def\noto@boldstyle{Bold}
\ifnoto@semibold\def\noto@boldstyle{SemiBold}\fi
\ifnoto@extrabold\def\noto@boldstyle{ExtraBold}\fi
@@ -128,121 +121,27 @@
\ifnoto@tt\def\mdseries@tt{medium}\fi
\fi
- \ifnoto@condensed
- \ifnoto@sf\def\bfseries@sf{bc}\def\mdseries@sf{c}\fi
- \ifnoto@tt\def\bfseries@tt{bc}\def\mdseries@tt{c}\fi
- \ifnoto@semibold
- \ifnoto@sf\def\bfseries@sf{sbc}\fi
- \ifnoto@tt\def\bfseries@tt{sbc}\fi
- \fi
- \ifnoto@extrabold
- \ifnoto@sf\def\bfseries@sf{ebc}\fi
- \ifnoto@tt\def\bfseries@tt{ebc}\fi
- \fi
- \ifnoto@black
- \ifnoto@sf\def\bfseries@sf{ubc}\fi
- \ifnoto@tt\def\bfseries@tt{ubc}\fi
- \fi
- \ifnoto@thin
- \ifnoto@sf\def\mdseries@sf{ulc}\fi
- \ifnoto@tt\def\mdseries@tt{ulc}\fi
- \fi
- \ifnoto@extralight
- \ifnoto@sf\def\mdseries@sf{elc}\fi
- \ifnoto@tt\def\mdseries@tt{elc}\fi
- \fi
- \ifnoto@light
- \ifnoto@sf\def\mdseries@sf{lc}\fi
- \ifnoto@tt\def\mdseries@tt{lc}\fi
- \fi
- \ifnoto@medium
- \ifnoto@sf\def\mdseries@sf{mediumcondensed}\fi
- \ifnoto@tt\def\mdseries@tt{mediumcondensed}\fi
- \fi
- \else\ifnoto@semicondensed
- \ifnoto@sf\def\bfseries@sf{bsc}\def\mdseries@sf{sc}\fi
- \ifnoto@tt\def\bfseries@tt{bsc}\def\mdseries@tt{sc}\fi
- \ifnoto@semibold
- \ifnoto@sf\def\bfseries@sf{sbsc}\fi
- \ifnoto@tt\def\bfseries@tt{sbsc}\fi
- \fi
- \ifnoto@extrabold
- \ifnoto@sf\def\bfseries@sf{ebsc}\fi
- \ifnoto@tt\def\bfseries@tt{ebsc}\fi
- \fi
- \ifnoto@black
- \ifnoto@sf\def\bfseries@sf{ubsc}\fi
- \ifnoto@tt\def\bfseries@tt{ubsc}\fi
- \fi
- \ifnoto@thin
- \ifnoto@sf\def\mdseries@sf{ulsc}\fi
- \ifnoto@tt\def\mdseries@tt{ulsc}\fi
- \fi
- \ifnoto@extralight
- \ifnoto@sf\def\mdseries@sf{elsc}\fi
- \ifnoto@tt\def\mdseries@tt{elsc}\fi
- \fi
- \ifnoto@light
- \ifnoto@sf\def\mdseries@sf{lsc}\fi
- \ifnoto@tt\def\mdseries@tt{lsc}\fi
- \fi
- \ifnoto@medium
- \ifnoto@sf\def\mdseries@sf{mediumsemicondensed}\fi
- \ifnoto@tt\def\mdseries@tt{mediumsemicondensed}\fi
- \fi
- \else\ifnoto@extracondensed
- \ifnoto@sf\def\bfseries@sf{bec}\def\mdseries@sf{ec}\fi
- \ifnoto@tt\def\bfseries@tt{bec}\def\mdseries@tt{ec}\fi
- \ifnoto@semibold
- \ifnoto@sf\def\bfseries@sf{sbec}\fi
- \ifnoto@tt\def\bfseries@tt{sbsc}\fi
- \fi
- \ifnoto@extrabold
- \ifnoto@sf\def\bfseries@sf{ebec}\fi
- \ifnoto@tt\def\bfseries@tt{ebec}\fi
- \fi
- \ifnoto@black
- \ifnoto@sf\def\bfseries@sf{ubec}\fi
- \ifnoto@tt\def\bfseries@tt{ubsc}\fi
- \fi
- \ifnoto@thin
- \ifnoto@sf\def\mdseries@sf{ulec}\fi
- \ifnoto@tt\def\mdseries@tt{ulec}\fi
- \fi
- \ifnoto@extralight
- \ifnoto@sf\def\mdseries@sf{elec}\fi
- \ifnoto@tt\def\mdseries@tt{elec}\fi
- \fi
- \ifnoto@light
- \ifnoto@sf\def\mdseries@sf{lec}\fi
- \ifnoto@tt\def\mdseries@tt{lec}\fi
- \fi
- \ifnoto@medium
- \ifnoto@sf\def\mdseries@sf{mediumsemicondensed}\fi
- \ifnoto@tt\def\mdseries@tt{mediumsemicondensed}\fi
- \fi
- \fi\fi\fi
-
\def\seriesdefault{\mdseries@rm}
\fi
-\ifnoto@otf
+\ifnoto@ttf
\def\noto@figurestyle{Lining}
\ifnoto@oldstyle\def\noto@figurestyle{OldStyle}\fi
\def\noto@figurealign{Monospaced}
\ifnoto@proportional\def\noto@figurealign{Proportional}\fi
-\fi
-% type1
+\else % type1
+
+ \def\noto@figurestyle{LF}
+ \ifnoto@oldstyle\def\noto@figurestyle{OsF}\fi
+ \def\noto@figurealign{T}
+ \ifnoto@proportional\def\noto@figurealign{}\fi
- \def\noto@tonefigurestyle{LF}
- \ifnoto@oldstyle\def\noto@tonefigurestyle{OsF}\fi
- \def\noto@tonefigurealign{T}
- \ifnoto@proportional\def\noto@tonefigurealign{}\fi
+\fi
-\ifnoto@otf
+\ifnoto@ttf
\RequirePackage{fontspec}
\else
\RequirePackage{fontenc,fontaxes,mweights}
@@ -252,62 +151,27 @@
\fontfigurestyle{superior}\selectfont}
\fi
-\ifnoto@otf
+\ifnoto@ttf
\def\noto@regular{Regular}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
Ligatures = TeX ,
Extension = .ttf }
\ifnoto@sf
- \ifnoto@condensed
- \setsansfont
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
- ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
- BoldItalicFont = *-\noto@boldstyle Italic ,
- ]
- {NotoSans-Condensed}
- \else\ifnoto@semicondensed
- \setsansfont
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
- ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
- BoldItalicFont = *-\noto@boldstyle Italic ,
- ]
- {NotoSans-SemiCondensed}
- \else\ifnoto@extracondensed
- \setsansfont
+ \setsansfont
[ Scale = \NotoSans@scale ,
Numbers = {\noto@figurealign, \noto@figurestyle} ,
SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
+ UprightFont = *-\noto@regstyle ,
ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
+ BoldFont = *-\noto@boldstyle ,
BoldItalicFont = *-\noto@boldstyle Italic ,
]
- {NotoSans-ExtraCondensed}
- \else
- \setsansfont
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *-\noto@regstyle ,
- ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *-\noto@boldstyle ,
- BoldItalicFont = *-\noto@boldstyle Italic ,
- ]
- {NotoSans}
- \fi\fi\fi
+ {NotoSans}
\let\notosansfamily\sfdefault
\fi
\ifnoto@rm
- \setmainfont
+ \setmainfont
[ Numbers = {\noto@figurealign, \noto@figurestyle} ,
SmallCapsFeatures={Letters=SmallCaps} ,
UprightFont = *-\noto@regstyle ,
@@ -316,50 +180,17 @@
BoldItalicFont = *-\noto@boldstyle Italic ,
]
{NotoSerif}
+ \let\notoseriffamily\rmdefault
\fi
- \def\noto@Lining{Lining}
\ifnoto@tt
- \ifnoto@condensed
- \setmonofont
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- Ligatures = CommonOff,
- HyphenChar=None,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-Condensed}
- \else\ifnoto@semicondensed
- \setmonofont
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- Ligatures = CommonOff,
- HyphenChar=None,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-SemiCondensed}
- \else\ifnoto@extracondensed
- \setmonofont
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- Ligatures = CommonOff,
- HyphenChar=None,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-ExtraCondensed}
- \else
- \setmonofont
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- Ligatures = CommonOff,
- HyphenChar=None,
- UprightFont = *-\noto@regstyle ,
- BoldFont = *-\noto@boldstyle ,
- ]
- {NotoSansMono}
- \fi\fi\fi
+ \setmonofont
+ [ Numbers = {\noto@figurealign, \noto@figurestyle} ,
+ Scale = \NotoSansMono@scale ,
+ HyphenChar=None,
+ UprightFont = *-\noto@regstyle ,
+ BoldFont = *-\noto@boldstyle ,
+ ]
+ {NotoSansMono}
\let\notomonofamily\ttdefault
\fi
\ifnoto@sfdefault\renewcommand*\familydefault{\notosansfamily}\fi
@@ -373,88 +204,33 @@
BoldItalicFont = *-\noto@boldstyle Italic ,
]
{NotoSans}
- \newfontfamily\notosanscondensed
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
- ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
- BoldItalicFont = *\noto@boldstyle Italic ,
- ]
- {NotoSans-Condensed}
- \newfontfamily\notosanssemicondensed
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
- ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
- BoldItalicFont = *\noto@boldstyle Italic ,
- ]
- {NotoSans-SemiCondensed}
- \newfontfamily\notosansextracondensed
- [ Scale = \NotoSans@scale ,
- Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi ,
- ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *\noto@boldstyle ,
- BoldItalicFont = *\noto@boldstyle Italic ,
- ]
- {NotoSans-ExtraCondensed}
\newfontfamily\notoserif
- [ Numbers = {\noto@figurealign, \noto@figurestyle} ,
- SmallCapsFeatures={Letters=SmallCaps} ,
- UprightFont = *-\noto@regstyle ,
- ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
- BoldFont = *-\noto@boldstyle ,
- BoldItalicFont = *-\noto@boldstyle Italic
- ]
- {NotoSerif}
- \defaultfontfeatures{Extension=.ttf, Ligatures = CommonOff, HyphenChar=None}
+ [ Numbers = {\noto@figurealign, \noto@figurestyle} ,
+ SmallCapsFeatures={Letters=SmallCaps} ,
+ UprightFont = *-\noto@regstyle ,
+ ItalicFont = *-\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi ,
+ BoldFont = *-\noto@boldstyle ,
+ BoldItalicFont = *-\noto@boldstyle Italic ,
+ ]
+ {NotoSerif}
+ \defaultfontfeatures{Extension=.ttf,HyphenChar=None}
\newfontfamily\notomono
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
+ [ Numbers = {\noto@figurealign, \noto@figurestyle} ,
Scale = \NotoSansMono@scale ,
UprightFont = *-\noto@regstyle ,
BoldFont = *-\noto@boldstyle ,
]
{NotoSansMono}
- \newfontfamily\notomonocondensed
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-Condensed}
- \newfontfamily\notomonosemicondensed
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-SemiCondensed}
- \newfontfamily\notomonoextracondensed
- [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} ,
- Scale = \NotoSansMono@scale ,
- UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi,
- BoldFont = *\noto@boldstyle ,
- ]
- {NotoSansMono-ExtraCondensed}
\providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
+
\else % type1
- \def\notosansfamily{NotoSans-\noto@tonefigurealign\noto@tonefigurestyle}
- \def\notoseriffamily{NotoSerif-\noto@tonefigurealign\noto@tonefigurestyle}
- \def\notomonofamily{NotoSansMono-T\noto@tonefigurestyle}
+
+ \def\notosansfamily{NotoSans-\noto@figurealign\noto@figurestyle}
+ \def\notoseriffamily{NotoSerif-\noto@figurealign\noto@figurestyle}
+ \def\notomonofamily{NotoSansMono-\noto@figurealign\noto@figurestyle}
\newcommand*\notoserif{\fontfamily{\notoseriffamily}\selectfont}
\newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont}
- \newcommand*\notosanscondensed{\fontfamily{\notosansfamily}\fontseries{c}\selectfont}
- \newcommand*\notosanssemicondensed{\fontfamily{\notosansfamily}\fontseries{sc}\selectfont}
- \newcommand*\notosansextracondensed{\fontfamily{\notosansfamily}\fontseries{ec}\selectfont}
\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}
\ifnoto@rm \def\rmdefault{\notoseriffamily} \fi
\ifnoto@sf \def\sfdefault{\notosansfamily} \fi
\ifnoto@tt \def\ttdefault{\notomonofamily} \fi
@@ -463,12 +239,19 @@
\DeclareTextFontCommand{\textsu}{\sufigures}
-\newcommand*\notoseriflgr{\fontencoding{LGR}\fontfamily{NotoSerif-\noto@tonefigurealign\noto@tonefigurestyle}\selectfont}
-\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-\noto@tonefigurealign\noto@tonefigurestyle}\selectfont}
-\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoSansMono-T\noto@tonefigurestyle}\selectfont}
+% LGR
+
+\def\noto@figurestyle{LF}
+\ifnoto@oldstyle\def\noto@figurestyle{OsF}\fi
+\def\noto@figurealign{T}
+\ifnoto@proportional\def\noto@figurealign{}\fi
+
+\newcommand*\notoseriflgr{\fontencoding{LGR}\fontfamily{NotoSerif-\noto@figurealign\noto@figurestyle}\selectfont}
+\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-\noto@figurealign\noto@figurestyle}\selectfont}
+\newcommand*\notomonolgr{\fontencoding{LGR}\fontfamily{NotoSansMono-\noto@figurealign\noto@figurestyle}\selectfont}
-\ifnoto@otf
+\ifnoto@ttf
% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}
\fi