diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-19 21:08:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-19 21:08:29 +0000 |
commit | fde837e1c6b239ad573936340f59c8efb0fdc193 (patch) | |
tree | f1e85b6450bf2a57f9eb445448addbe5398f33c8 /Master/texmf-dist/tex/latex/noto/noto-sans.sty | |
parent | 5aecfcf893f8d1d3d65d27fc45656384d723e867 (diff) |
noto (19may19)
git-svn-id: svn://tug.org/texlive/trunk@51162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/noto/noto-sans.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/noto/noto-sans.sty | 173 |
1 files changed, 141 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto-sans.sty b/Master/texmf-dist/tex/latex/noto/noto-sans.sty index baaa9dce745..eb6bbe93fde 100644 --- a/Master/texmf-dist/tex/latex/noto/noto-sans.sty +++ b/Master/texmf-dist/tex/latex/noto/noto-sans.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{noto-sans} - [2019/04/22 (Bob Tennent) Supports NotoSans fonts for all LaTeX engines.] + [2019/05/18 (Bob Tennent) Supports NotoSans fonts for all LaTeX engines.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -23,7 +23,6 @@ \DeclareOptionX{sfdefault}{\notosans@sfdefaulttrue} \DeclareOptionX{type1}{\notosans@otffalse} - \newif\ifnotosans@oldstyle \notosans@oldstylefalse \newif\ifnotosans@proportional \notosans@proportionalfalse @@ -44,6 +43,10 @@ \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} @@ -53,6 +56,9 @@ \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 @@ -69,15 +75,45 @@ \ifnotosans@medium\def\notosans@regstyle{Medium}\fi \else % type1 - \def\bfseries@sf{bold} + \def\seriesdefault{\mdseries@sf} + + \def\bfseries@sf{bold}\def\mdseries@sf{regular} \ifnotosans@semibold\def\bfseries@sf{semibold}\fi \ifnotosans@extrabold\def\bfseries@sf{extrabold}\fi \ifnotosans@black\def\bfseries@sf{black}\fi - \def\mdseries@sf{regular} \ifnotosans@thin\def\mdseries@sf{thin}\fi \ifnotosans@extralight\def\mdseries@sf{extralight}\fi \ifnotosans@light\def\mdseries@sf{light}\fi \ifnotosans@medium\def\mdseries@sf{medium}\fi + + \ifnotosans@condensed + \def\bfseries@sf{boldcondensed}\def\mdseries@sf{condensed} + \ifnotosans@semibold\def\bfseries@sf{semiboldcondensed}\fi + \ifnotosans@extrabold\def\bfseries@sf{extraboldcondensed}\fi + \ifnotosans@black\def\bfseries@sf{blackcondensed}\fi + \ifnotosans@thin\def\mdseries@sf{thincondensed}\fi + \ifnotosans@extralight\def\mdseries@sf{extralightcondensed}\fi + \ifnotosans@light\def\mdseries@sf{lightcondensed}\fi + \ifnotosans@medium\def\mdseries@sf{mediumcondensed}\fi + \else\ifnotosans@semicondensed + \def\bfseries@sf{boldsemicondensed}\def\mdseries@sf{semicondensed} + \ifnotosans@semibold\def\bfseries@sf{semiboldsemicondensed}\fi + \ifnotosans@extrabold\def\bfseries@sf{extraboldsemicondensed}\fi + \ifnotosans@black\def\bfseries@sf{blacksemicondensed}\fi + \ifnotosans@thin\def\mdseries@sf{thinsemicondensed}\fi + \ifnotosans@extralight\def\mdseries@sf{extralightsemicondensed}\fi + \ifnotosans@light\def\mdseries@sf{lightsemicondensed}\fi + \ifnotosans@medium\def\mdseries@sf{mediumsemicondensed}\fi + \else\ifnotosans@extracondensed + \def\bfseries@sf{boldextracondensed}\def\mdseries@sf{extracondensed} + \ifnotosans@semibold\def\bfseries@sf{semiboldextracondensed}\fi + \ifnotosans@extrabold\def\bfseries@sf{extraboldextracondensed}\fi + \ifnotosans@black\def\bfseries@sf{blackextracondensed}\fi + \ifnotosans@thin\def\mdseries@sf{thinextracondensed}\fi + \ifnotosans@extralight\def\mdseries@sf{extralightextracondensed}\fi + \ifnotosans@light\def\mdseries@sf{lightextracondensed}\fi + \ifnotosans@medium\def\mdseries@sf{mediumextracondensed}\fi + \fi\fi\fi \fi @@ -88,14 +124,13 @@ \def\notosans@figurealign{Monospaced} \ifnotosans@proportional\def\notosans@figurealign{Proportional}\fi -\else % type1 - - \def\notosans@figurestyle{LF} - \ifnotosans@oldstyle\def\notosans@figurestyle{OsF}\fi - \def\notosans@figurealign{T} - \ifnotosans@proportional\def\notosans@figurealign{}\fi - \fi +% type1 + + \def\notosans@tonefigurestyle{LF} + \ifnotosans@oldstyle\def\notosans@tonefigurestyle{OsF}\fi + \def\notosans@tonefigurealign{T} + \ifnotosans@proportional\def\notosans@tonefigurealign{}\fi \ifnotosans@otf \RequirePackage{fontspec} @@ -105,8 +140,6 @@ \fa@naming@exception{figures}{{superior}{tabular}}{Sup} \def\sufigures{\@nomath\sufigures \fontfigurestyle{superior}\selectfont} - \DeclareTextFontCommand{\textsu}{\sufigures} - \let\textsuperior\textsu \fi \ifnotosans@otf @@ -114,34 +147,110 @@ \ifxetex\XeTeXtracingfonts=1\fi \defaultfontfeatures{ Ligatures = TeX , - Scale = \NotoSans@scale , - Extension = .otf } - \setsansfont - [ UprightFont = *-\notosans@regstyle , - ItalicFont = *-\ifx\notosans@regstyle\notosans@regular - Italic - \else\notosans@regstyle Italic\fi , - BoldFont = *-\notosans@boldstyle , - BoldItalicFont = *-\notosans@boldstyle Italic ] - {NotoSans} + 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 \ifnotosans@sfdefault\renewcommand*\familydefault{\notosansfamily}\fi \newfontfamily\notosans - [ UprightFont = *-\notosans@regstyle , - ItalicFont = *-\ifx\notosans@regstyle\notosans@regular - Italic - \else\notosans@regstyle Italic\fi , - BoldFont = *-\notosans@boldstyle , - BoldItalicFont = *-\notosans@boldstyle Italic ] - {NotoSans} + [ 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} + \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@figurealign\notosans@figurestyle} + \def\notosansfamily{NotoSans-\notosans@tonefigurealign\notosans@tonefigurestyle} \newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont} + \newcommand*\notosanscondensed{\fontfamily{\notosansfamily}\fontseries{condensed}\selectfont} + \newcommand*\notosanssemicondensed{\fontfamily{\notosansfamily}\fontseries{semicondensed}\selectfont} + \newcommand*\notosansextracondensed{\fontfamily{\notosansfamily}\fontseries{extracondensed}\selectfont} \def\sfdefault{\notosansfamily} \ifnotosans@sfdefault\edef\familydefault{\sfdefault}\fi \fi -\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-TLF}\selectfont} +\DeclareTextFontCommand{\textsu}{\sufigures} + +\newcommand*\notosanslgr{\fontencoding{LGR}\fontfamily{NotoSans-\notosans@tonefigurealign\notosans@tonefigurestyle}\selectfont} + \ifnotosans@otf % turn off defaults in case other fonts are selected: |