\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{noto} [2019/10/18 (Bob Tennent) Supports Noto fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} \newif\ifnoto@otf \ifxetex \noto@otftrue \else\ifluatex \noto@otftrue \else % [pdf]LaTeX \noto@otffalse \fi\fi \newif\ifnoto@sfdefault \noto@sfdefaultfalse \newif\ifnoto@sf \noto@sftrue \newif\ifnoto@rm \noto@rmtrue \newif\ifnoto@tt \noto@tttrue \newcommand*{\NotoSans@scale}{1} \newcommand*{\NotoSansMono@scale}{1} \DeclareOptionX{scaled}{\renewcommand*{\NotoSans@scale}{#1}\renewcommand*{\NotoSansMono@scale}{#1}} \DeclareOptionX{scale}{\renewcommand*{\NotoSans@scale}{#1}\renewcommand*{\NotoSansMono@scale}{#1}} \DeclareOptionX{sf}{\noto@sftrue\noto@rmfalse} \DeclareOptionX{rm}{\noto@rmtrue\noto@sffalse} \DeclareOptionX{nott}{\noto@ttfalse} \DeclareOptionX{sfdefault}{\noto@sfdefaulttrue} \DeclareOptionX{type1}{\noto@otffalse} \newif\ifnoto@oldstyle \noto@oldstylefalse \newif\ifnoto@proportional \noto@proportionalfalse \DeclareOptionX{lining}{\noto@oldstylefalse} \DeclareOptionX{lf}{\noto@oldstylefalse} \DeclareOptionX{tabular}{\noto@proportionalfalse} \DeclareOptionX{tf}{\noto@proportionalfalse} \DeclareOptionX{proportional}{\noto@proportionaltrue} \DeclareOptionX{pf}{\noto@proportionaltrue} \DeclareOptionX{oldstyle}{\noto@oldstyletrue} \DeclareOptionX{osf}{\noto@oldstyletrue} \newif\ifnoto@thin \noto@thinfalse \newif\ifnoto@extralight \noto@extralightfalse \newif\ifnoto@light \noto@lightfalse \newif\ifnoto@medium \noto@mediumfalse \newif\ifnoto@semibold \noto@semiboldfalse \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} \DeclareOptionX{regular}{\noto@lightfalse\noto@thinfalse\noto@extralightfalse\noto@mediumfalse} \DeclareOptionX{medium}{\noto@mediumtrue} \DeclareOptionX{semibold}{\noto@semiboldtrue} \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 \def\noto@boldstyle{Bold} \ifnoto@semibold\def\noto@boldstyle{SemiBold}\fi \ifnoto@extrabold\def\noto@boldstyle{ExtraBold}\fi \ifnoto@black\def\noto@boldstyle{Black}\fi \def\noto@regstyle{Regular} \ifnoto@thin\def\noto@regstyle{Thin}\fi \ifnoto@extralight\def\noto@regstyle{ExtraLight}\fi \ifnoto@light\def\noto@regstyle{Light}\fi \ifnoto@medium\def\noto@regstyle{Medium}\fi \else % type1 \ifnoto@sf\def\bfseries@sf{b}\def\mdseries@sf{sl}\fi \ifnoto@rm\def\bfseries@rm{b}\def\mdseries@rm{sl}\fi \ifnoto@tt\def\bfseries@tt{b}\def\mdseries@tt{sl}\fi \ifnoto@semibold \ifnoto@sf\def\bfseries@sf{sb}\fi \ifnoto@rm\def\bfseries@rm{sb}\fi \ifnoto@tt\def\bfseries@tt{sb}\fi \fi \ifnoto@extrabold \ifnoto@sf\def\bfseries@sf{eb}\fi \ifnoto@rm\def\bfseries@rm{eb}\fi \ifnoto@tt\def\bfseries@tt{eb}\fi \fi \ifnoto@black \ifnoto@sf\def\bfseries@sf{ub}\fi \ifnoto@rm\def\bfseries@rm{ub}\fi \ifnoto@tt\def\bfseries@tt{ub}\fi \fi \ifnoto@tt\def\mdseries@tt{sl}\fi \ifnoto@sf\def\mdseries@sf{sl}\fi \ifnoto@rm\def\mdseries@rm{sl}\fi \ifnoto@thin \ifnoto@sf\def\mdseries@sf{ul}\fi \ifnoto@rm\def\mdseries@rm{ul}\fi \ifnoto@tt\def\mdseries@tt{ul}\fi \fi \ifnoto@extralight \ifnoto@sf\def\mdseries@sf{el}\fi \ifnoto@rm\def\mdseries@rm{el}\fi \ifnoto@tt\def\mdseries@tt{el}\fi \fi \ifnoto@light \ifnoto@sf\def\mdseries@sf{l}\fi \ifnoto@rm\def\mdseries@rm{l}\fi \ifnoto@tt\def\mdseries@tt{l}\fi \fi \ifnoto@medium \ifnoto@sf\def\mdseries@sf{m}\fi \ifnoto@rm\def\mdseries@rm{m}\fi \ifnoto@tt\def\mdseries@tt{m}\fi \fi \ifnoto@condensed \ifnoto@sf\def\bfseries@sf{bc}\def\mdseries@sf{slc}\fi \ifnoto@tt\def\bfseries@tt{bc}\def\mdseries@tt{slc}\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{mc}\fi \ifnoto@tt\def\mdseries@tt{mc}\fi \fi \else\ifnoto@semicondensed \ifnoto@sf\def\bfseries@sf{bsc}\def\mdseries@sf{slsc}\fi \ifnoto@tt\def\bfseries@tt{bsc}\def\mdseries@tt{slsc}\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{msc}\fi \ifnoto@tt\def\mdseries@tt{msc}\fi \fi \else\ifnoto@extracondensed \ifnoto@sf\def\bfseries@sf{bec}\def\mdseries@sf{slec}\fi \ifnoto@tt\def\bfseries@tt{bec}\def\mdseries@tt{slec}\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{mec}\fi \ifnoto@tt\def\mdseries@tt{mec}\fi \fi \fi\fi\fi \def\seriesdefault{\mdseries@rm} \fi \ifnoto@otf \def\noto@figurestyle{Lining} \ifnoto@oldstyle\def\noto@figurestyle{OldStyle}\fi \def\noto@figurealign{Monospaced} \ifnoto@proportional\def\noto@figurealign{Proportional}\fi \fi % type1 \def\noto@tonefigurestyle{LF} \ifnoto@oldstyle\def\noto@tonefigurestyle{OsF}\fi \def\noto@tonefigurealign{T} \ifnoto@proportional\def\noto@tonefigurealign{}\fi \ifnoto@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} \fi \ifnoto@otf \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 [ 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} \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 \let\notosansfamily\sfdefault \fi \ifnoto@rm \setmainfont [ 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} \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 \let\notomonofamily\ttdefault \fi \ifnoto@sfdefault\renewcommand*\familydefault{\notosansfamily}\fi \newfontfamily\notosans [ 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} \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} \newfontfamily\notomono [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} , 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} \newcommand*\notoserif{\fontfamily{\notoseriffamily}\selectfont} \newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont} \newcommand*\notosanscondensed{\fontfamily{\notosansfamily}\fontseries{slc}\selectfont} \newcommand*\notosanssemicondensed{\fontfamily{\notosansfamily}\fontseries{slsc}\selectfont} \newcommand*\notosansextracondensed{\fontfamily{\notosansfamily}\fontseries{slec}\selectfont} \newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont} \newcommand*\notomonocondensed{\fontfamily{\notomonofamily}\fontseries{slc}\selectfont} \newcommand*\notomonosemicondensed{\fontfamily{\notomonofamily}\fontseries{slsc}\selectfont} \newcommand*\notomonoextracondensed{\fontfamily{\notomonofamily}\fontseries{slec}\selectfont} \ifnoto@rm \def\rmdefault{\notoseriffamily} \fi \ifnoto@sf \def\sfdefault{\notosansfamily} \fi \ifnoto@tt \def\ttdefault{\notomonofamily} \fi \ifnoto@sfdefault\edef\familydefault{\sfdefault}\fi \fi \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} \ifnoto@otf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} \fi \endinput