diff options
Diffstat (limited to 'fonts/noto/latex/noto.sty')
-rw-r--r-- | fonts/noto/latex/noto.sty | 199 |
1 files changed, 145 insertions, 54 deletions
diff --git a/fonts/noto/latex/noto.sty b/fonts/noto/latex/noto.sty index 2eac633e13..31293ac36a 100644 --- a/fonts/noto/latex/noto.sty +++ b/fonts/noto/latex/noto.sty @@ -1,16 +1,16 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{noto} - [2019/10/22 (Bob Tennent) Supports Noto fonts for all LaTeX engines.] + [2021/09/04 (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 @@ -73,7 +73,7 @@ \ProcessOptionsX\relax -\ifnoto@otf +\ifnoto@ttf \def\noto@boldstyle{Bold} \ifnoto@semibold\def\noto@boldstyle{SemiBold}\fi \ifnoto@extrabold\def\noto@boldstyle{ExtraBold}\fi @@ -129,95 +129,119 @@ \fi \ifnoto@condensed + \ifnoto@rm\def\bfseries@rm{bc}\def\mdseries@rm{c}\fi \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@rm\def\bfseries@rm{sbc}\fi \ifnoto@sf\def\bfseries@sf{sbc}\fi \ifnoto@tt\def\bfseries@tt{sbc}\fi \fi \ifnoto@extrabold + \ifnoto@rm\def\bfseries@rm{ebc}\fi \ifnoto@sf\def\bfseries@sf{ebc}\fi \ifnoto@tt\def\bfseries@tt{ebc}\fi \fi \ifnoto@black + \ifnoto@rm\def\bfseries@rm{ubc}\fi \ifnoto@sf\def\bfseries@sf{ubc}\fi \ifnoto@tt\def\bfseries@tt{ubc}\fi \fi \ifnoto@thin + \ifnoto@rm\def\mdseries@rm{ulc}\fi \ifnoto@sf\def\mdseries@sf{ulc}\fi \ifnoto@tt\def\mdseries@tt{ulc}\fi \fi \ifnoto@extralight + \ifnoto@rm\def\mdseries@rm{elc}\fi \ifnoto@sf\def\mdseries@sf{elc}\fi \ifnoto@tt\def\mdseries@tt{elc}\fi \fi \ifnoto@light + \ifnoto@rm\def\mdseries@rm{lc}\fi \ifnoto@sf\def\mdseries@sf{lc}\fi \ifnoto@tt\def\mdseries@tt{lc}\fi \fi \ifnoto@medium + \ifnoto@rm\def\mdseries@rm{mediumcondensed}\fi \ifnoto@sf\def\mdseries@sf{mediumcondensed}\fi \ifnoto@tt\def\mdseries@tt{mediumcondensed}\fi \fi \else\ifnoto@semicondensed + \ifnoto@rm\def\bfseries@rm{bsc}\def\mdseries@rm{sc}\fi \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@rm\def\bfseries@rm{sbsc}\fi \ifnoto@sf\def\bfseries@sf{sbsc}\fi \ifnoto@tt\def\bfseries@tt{sbsc}\fi \fi \ifnoto@extrabold + \ifnoto@rm\def\bfseries@rm{ebsc}\fi \ifnoto@sf\def\bfseries@sf{ebsc}\fi \ifnoto@tt\def\bfseries@tt{ebsc}\fi \fi \ifnoto@black + \ifnoto@rm\def\bfseries@rm{ubsc}\fi \ifnoto@sf\def\bfseries@sf{ubsc}\fi \ifnoto@tt\def\bfseries@tt{ubsc}\fi \fi \ifnoto@thin + \ifnoto@rm\def\mdseries@rm{ulsc}\fi \ifnoto@sf\def\mdseries@sf{ulsc}\fi \ifnoto@tt\def\mdseries@tt{ulsc}\fi \fi \ifnoto@extralight + \ifnoto@rm\def\mdseries@rm{elsc}\fi \ifnoto@sf\def\mdseries@sf{elsc}\fi \ifnoto@tt\def\mdseries@tt{elsc}\fi \fi \ifnoto@light + \ifnoto@rm\def\mdseries@rm{lsc}\fi \ifnoto@sf\def\mdseries@sf{lsc}\fi \ifnoto@tt\def\mdseries@tt{lsc}\fi \fi \ifnoto@medium + \ifnoto@rm\def\mdseries@rm{mediumsemicondensed}\fi \ifnoto@sf\def\mdseries@sf{mediumsemicondensed}\fi \ifnoto@tt\def\mdseries@tt{mediumsemicondensed}\fi \fi \else\ifnoto@extracondensed + \ifnoto@rm\def\bfseries@rm{bec}\def\mdseries@rm{ec}\fi \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@rm\def\bfseries@rm{sbec}\fi \ifnoto@sf\def\bfseries@sf{sbec}\fi \ifnoto@tt\def\bfseries@tt{sbsc}\fi \fi \ifnoto@extrabold + \ifnoto@rm\def\bfseries@rm{ebec}\fi \ifnoto@sf\def\bfseries@sf{ebec}\fi \ifnoto@tt\def\bfseries@tt{ebec}\fi \fi \ifnoto@black + \ifnoto@rm\def\bfseries@rm{ubec}\fi \ifnoto@sf\def\bfseries@sf{ubec}\fi \ifnoto@tt\def\bfseries@tt{ubsc}\fi \fi \ifnoto@thin + \ifnoto@rm\def\mdseries@rm{ulec}\fi \ifnoto@sf\def\mdseries@sf{ulec}\fi \ifnoto@tt\def\mdseries@tt{ulec}\fi \fi \ifnoto@extralight + \ifnoto@rm\def\mdseries@rm{elec}\fi \ifnoto@sf\def\mdseries@sf{elec}\fi \ifnoto@tt\def\mdseries@tt{elec}\fi \fi \ifnoto@light + \ifnoto@rm\def\mdseries@rm{lec}\fi \ifnoto@sf\def\mdseries@sf{lec}\fi \ifnoto@tt\def\mdseries@tt{lec}\fi \fi \ifnoto@medium + \ifnoto@rm\def\mdseries@rm{mediumsemicondensed}\fi \ifnoto@sf\def\mdseries@sf{mediumsemicondensed}\fi \ifnoto@tt\def\mdseries@tt{mediumsemicondensed}\fi \fi @@ -227,22 +251,23 @@ \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@tonefigurestyle{LF} - \ifnoto@oldstyle\def\noto@tonefigurestyle{OsF}\fi - \def\noto@tonefigurealign{T} - \ifnoto@proportional\def\noto@tonefigurealign{}\fi + \def\noto@figurestyle{LF} + \ifnoto@oldstyle\def\noto@figurestyle{OsF}\fi + \def\noto@figurealign{T} + \ifnoto@proportional\def\noto@figurealign{}\fi -\ifnoto@otf +\fi + +\ifnoto@ttf \RequirePackage{fontspec} \else \RequirePackage{fontenc,fontaxes,mweights} @@ -252,7 +277,7 @@ \fontfigurestyle{superior}\selectfont} \fi -\ifnoto@otf +\ifnoto@ttf \def\noto@regular{Regular} \ifxetex\XeTeXtracingfonts=1\fi \defaultfontfeatures{ @@ -265,9 +290,9 @@ 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 , + ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi , BoldFont = *\noto@boldstyle , - BoldItalicFont = *-\noto@boldstyle Italic , + BoldItalicFont = *\noto@boldstyle Italic , ] {NotoSans-Condensed} \else\ifnoto@semicondensed @@ -276,9 +301,9 @@ 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 , + ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi , BoldFont = *\noto@boldstyle , - BoldItalicFont = *-\noto@boldstyle Italic , + BoldItalicFont = *\noto@boldstyle Italic , ] {NotoSans-SemiCondensed} \else\ifnoto@extracondensed @@ -287,9 +312,9 @@ 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 , + ItalicFont = *\ifx\noto@regstyle\noto@regular Italic\else\noto@regstyle Italic\fi , BoldFont = *\noto@boldstyle , - BoldItalicFont = *-\noto@boldstyle Italic , + BoldItalicFont = *\noto@boldstyle Italic , ] {NotoSans-ExtraCondensed} \else @@ -307,23 +332,53 @@ \let\notosansfamily\sfdefault \fi \ifnoto@rm - \setmainfont + \ifnoto@condensed + \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 , + 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 , ] - {NotoSerif} + {NotoSerif-Condensed} + \else\ifnoto@semicondensed + \setmainfont + [ 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 , + ] + {NotoSerif-SemiCondensed} + \else\ifnoto@extracondensed + \setmainfont + [ 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 , + ] + {NotoSerif-ExtraCondensed} + \else + \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\fi\fi \fi - \def\noto@Lining{Lining} \ifnoto@tt \ifnoto@condensed \setmonofont - [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , Scale = \NotoSansMono@scale , - Ligatures = CommonOff, HyphenChar=None, UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi, BoldFont = *\noto@boldstyle , @@ -331,9 +386,8 @@ {NotoSansMono-Condensed} \else\ifnoto@semicondensed \setmonofont - [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , Scale = \NotoSansMono@scale , - Ligatures = CommonOff, HyphenChar=None, UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi, BoldFont = *\noto@boldstyle , @@ -341,9 +395,8 @@ {NotoSansMono-SemiCondensed} \else\ifnoto@extracondensed \setmonofont - [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , Scale = \NotoSansMono@scale , - Ligatures = CommonOff, HyphenChar=None, UprightFont = *\ifx\noto@regstyle\noto@regular\else\noto@regstyle\fi, BoldFont = *\noto@boldstyle , @@ -351,9 +404,8 @@ {NotoSansMono-ExtraCondensed} \else \setmonofont - [ Numbers = {\ifx\noto@figurestyle\noto@Lining\else\noto@figurestyle\fi} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , Scale = \NotoSansMono@scale , - Ligatures = CommonOff, HyphenChar=None, UprightFont = *-\noto@regstyle , BoldFont = *-\noto@boldstyle , @@ -404,49 +456,81 @@ ] {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} + \newfontfamily\notoserifcondensed [ 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 + 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 , ] - {NotoSerif} - \defaultfontfeatures{Extension=.ttf, Ligatures = CommonOff, HyphenChar=None} + {NotoSerif-Condensed} + \newfontfamily\notoserifsemicondensed + [ 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 , + ] + {NotoSerif-SemiCondensed} + \newfontfamily\notoserifextracondensed + [ 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 , + ] + {NotoSerif-ExtraCondensed} + \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} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , 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} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , 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} , + [ Numbers = {\noto@figurealign, \noto@figurestyle} , 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*\notoserifcondensed{\fontfamily{\notoseriffamily}\fontseries{c}\selectfont} + \newcommand*\notoserifsemicondensed{\fontfamily{\notoseriffamily}\fontseries{sc}\selectfont} + \newcommand*\notoserifextracondensed{\fontfamily{\notoseriffamily}\fontseries{ec}\selectfont} \newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont} \newcommand*\notosanscondensed{\fontfamily{\notosansfamily}\fontseries{c}\selectfont} \newcommand*\notosanssemicondensed{\fontfamily{\notosansfamily}\fontseries{sc}\selectfont} @@ -463,12 +547,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-T\noto@figurestyle}\selectfont} -\ifnoto@otf +\ifnoto@ttf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} \fi |