diff options
Diffstat (limited to 'fonts/noto/latex/noto-sans.sty')
-rw-r--r-- | fonts/noto/latex/noto-sans.sty | 153 |
1 files changed, 25 insertions, 128 deletions
diff --git a/fonts/noto/latex/noto-sans.sty b/fonts/noto/latex/noto-sans.sty index 6c24f1a926..38f261f62e 100644 --- a/fonts/noto/latex/noto-sans.sty +++ b/fonts/noto/latex/noto-sans.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{noto-sans} - [2021/09/04 (Bob Tennent) Supports NotoSans fonts for all LaTeX engines.] + [2021/09/06 (Bob Tennent) Supports NotoSans fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -43,10 +43,6 @@ \newif\ifnotosans@extrabold \notosans@extraboldfalse \newif\ifnotosans@black \notosans@blackfalse -\newif\ifnotosans@condensed \notosans@condensedfalse -\newif\ifnotosans@semicondensed \notosans@semicondensedfalse -\newif\ifnotosans@extracondensed \notosans@extracondensedfalse - \DeclareOptionX{thin}{\notosans@thintrue} \DeclareOptionX{extralight}{\notosans@extralighttrue} \DeclareOptionX{light}{\notosans@lighttrue} @@ -56,9 +52,6 @@ \DeclareOptionX{extrabold}{\notosans@extraboldtrue} \DeclareOptionX{black}{\notosans@blacktrue} \DeclareOptionX{bold}{\notosans@blackfalse\notosans@semiboldfalse\notosans@extraboldfalse} -\DeclareOptionX{condensed}{\notosans@condensedtrue} -\DeclareOptionX{semicondensed}{\notosans@semicondensedtrue} -\DeclareOptionX{extracondensed}{\notosans@extracondensedtrue} \ProcessOptionsX\relax @@ -86,35 +79,6 @@ \ifnotosans@light\def\mdseries@sf{l}\fi \ifnotosans@medium\def\mdseries@sf{medium}\fi - \ifnotosans@condensed - \def\bfseries@sf{bc}\def\mdseries@sf{c} - \ifnotosans@semibold\def\bfseries@sf{sbc}\fi - \ifnotosans@extrabold\def\bfseries@sf{ebc}\fi - \ifnotosans@black\def\bfseries@sf{ubc}\fi - \ifnotosans@thin\def\mdseries@sf{ulc}\fi - \ifnotosans@extralight\def\mdseries@sf{elc}\fi - \ifnotosans@light\def\mdseries@sf{lc}\fi - \ifnotosans@medium\def\mdseries@sf{mediumcondensed}\fi - \else\ifnotosans@semicondensed - \def\bfseries@sf{bsc}\def\mdseries@sf{sc} - \ifnotosans@semibold\def\bfseries@sf{sbsc}\fi - \ifnotosans@extrabold\def\bfseries@sf{ebsc}\fi - \ifnotosans@black\def\bfseries@sf{ubsc}\fi - \ifnotosans@thin\def\mdseries@sf{ulsc}\fi - \ifnotosans@extralight\def\mdseries@sf{elsc}\fi - \ifnotosans@light\def\mdseries@sf{lsc}\fi - \ifnotosans@medium\def\mdseries@sf{mediumsemicondensed}\fi - \else\ifnotosans@extracondensed - \def\bfseries@sf{bec}\def\mdseries@sf{ec} - \ifnotosans@semibold\def\bfseries@sf{sbec}\fi - \ifnotosans@extrabold\def\bfseries@sf{ebec}\fi - \ifnotosans@black\def\bfseries@sf{ubec}\fi - \ifnotosans@thin\def\mdseries@sf{ulec}\fi - \ifnotosans@extralight\def\mdseries@sf{elec}\fi - \ifnotosans@light\def\mdseries@sf{lec}\fi - \ifnotosans@medium\def\mdseries@sf{mediumsemicondensed}\fi - \fi\fi\fi - \fi \ifnotosans@ttf @@ -124,13 +88,14 @@ \def\notosans@figurealign{Monospaced} \ifnotosans@proportional\def\notosans@figurealign{Proportional}\fi -\fi -% type1 +\else % type1 - \def\notosans@tonefigurestyle{LF} - \ifnotosans@oldstyle\def\notosans@tonefigurestyle{OsF}\fi - \def\notosans@tonefigurealign{T} - \ifnotosans@proportional\def\notosans@tonefigurealign{}\fi + \def\notosans@figurestyle{LF} + \ifnotosans@oldstyle\def\notosans@figurestyle{OsF}\fi + \def\notosans@figurealign{T} + \ifnotosans@proportional\def\notosans@figurealign{}\fi + +\fi \ifnotosans@ttf \RequirePackage{fontspec} @@ -148,52 +113,17 @@ \defaultfontfeatures{ Ligatures = TeX , Extension = .ttf } - \ifnotosans@condensed - \setsansfont - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-Condensed} - \else\ifnotosans@semicondensed - \setsansfont - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-SemiCondensed} - \else\ifnotosans@extracondensed - \setsansfont - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-ExtraCondensed} - \else - \setsansfont - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *-\notosans@regstyle , - ItalicFont = *-\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *-\notosans@boldstyle , - BoldItalicFont = *-\notosans@boldstyle Italic , - ] - {NotoSans} - \fi\fi\fi - \let\notosansfamily\sfdefault + \setsansfont + [ Scale = \NotoSans@scale , + Numbers = {\notosans@figurealign, \notosans@figurestyle} , + SmallCapsFeatures={Letters=SmallCaps} , + UprightFont = *-\notosans@regstyle , + ItalicFont = *-\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , + BoldFont = *-\notosans@boldstyle , + BoldItalicFont = *-\notosans@boldstyle Italic , + ] + {NotoSans} + \let\notosansfamily\sfdefault \ifnotosans@sfdefault\renewcommand*\familydefault{\notosansfamily}\fi \newfontfamily\notosans [ Scale = \NotoSans@scale , @@ -205,44 +135,11 @@ BoldItalicFont = *-\notosans@boldstyle Italic , ] {NotoSans} - \newfontfamily\notosanscondensed - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-Condensed} - \newfontfamily\notosanssemicondensed - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-SemiCondensed} - \newfontfamily\notosansextracondensed - [ Scale = \NotoSans@scale , - Numbers = {\notosans@figurealign, \notosans@figurestyle} , - SmallCapsFeatures={Letters=SmallCaps} , - UprightFont = *\ifx\notosans@regstyle\notosans@regular\else\notosans@regstyle\fi , - ItalicFont = *\ifx\notosans@regstyle\notosans@regular Italic\else\notosans@regstyle Italic\fi , - BoldFont = *\notosans@boldstyle , - BoldItalicFont = *\notosans@boldstyle Italic , - ] - {NotoSans-ExtraCondensed} \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} \else % type1 - \def\notosansfamily{NotoSans-\notosans@tonefigurealign\notosans@tonefigurestyle} + \def\notosansfamily{NotoSans-\notosans@figurealign\notosans@figurestyle} \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} \def\sfdefault{\notosansfamily} \ifnotosans@sfdefault\edef\familydefault{\sfdefault}\fi \fi @@ -251,11 +148,11 @@ % LGR -\def\notosans@tonefigurestyle{LF} -\ifnotosans@oldstyle\def\notosans@tonefigurestyle{OsF}\fi -\def\notosans@tonefigurealign{T} -\ifnotosans@proportional\def\notosans@tonefigurealign{}\fi -\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-\notosans@tonefigurealign\notosans@tonefigurestyle}\selectfont} +\def\notosans@figurestyle{LF} +\ifnotosans@oldstyle\def\notosans@figurestyle{OsF}\fi +\def\notosans@figurealign{T} +\ifnotosans@proportional\def\notosans@figurealign{}\fi +\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-\notosans@figurealign\notosans@figurestyle}\selectfont} \ifnotosans@ttf |