summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noto/noto.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-19 23:28:36 +0000
committerKarl Berry <karl@freefriends.org>2018-02-19 23:28:36 +0000
commit15f5d483188549ccb1b39b8a73ad57111425d435 (patch)
treea022d0281a6714575e472353729dde832d8528ac /Master/texmf-dist/tex/latex/noto/noto.sty
parent4f1b42be15174cb8eba074f46945bd9b2fbdf0a9 (diff)
noto (19feb18)
git-svn-id: svn://tug.org/texlive/trunk@46679 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.sty161
1 files changed, 131 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto.sty b/Master/texmf-dist/tex/latex/noto/noto.sty
index ab71d2057b8..6cedda1b858 100644
--- a/Master/texmf-dist/tex/latex/noto/noto.sty
+++ b/Master/texmf-dist/tex/latex/noto/noto.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{noto}
- [2017/01/05 (Bob Tennent) Supports Noto fonts for all LaTeX engines.]
+ [2018/02/19 (Bob Tennent) Supports Noto fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
@@ -32,54 +32,149 @@
\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
+
+\DeclareOptionX{thin}{\noto@thintrue}
+\DeclareOptionX{extralight}{\noto@extralighttrue}
+\DeclareOptionX{light}{\noto@lighttrue}
+\DeclareOptionX{regular}{\noto@lighfalse\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}
+
+
\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
- \def\bfseries@sf{b}
- \def\bfseries@tt{b}
- \def\mdseries@sf{m}
- \def\mdseries@tt{m}
+ \ifnoto@tt\def\bfseries@tt{b}\fi
+ \ifnoto@sf\def\bfseries@sf{b}\fi
+ \ifnoto@rm\def\bfseries@rm{b}\fi
+ \ifnoto@semibold
+ \ifnoto@sf\def\bfseries@sf{sb}\fi
+ \ifnoto@rm\def\bfseries@rm{sb}\fi
+ \fi
+ \ifnoto@extrabold
+ \ifnoto@sf\def\bfseries@sf{eb}\fi
+ \ifnoto@rm\def\bfseries@rm{eb}\fi
+ \fi
+ \ifnoto@black
+ \ifnoto@sf\def\bfseries@sf{k}\fi
+ \ifnoto@rm\def\bfseries@rm{k}\fi
+ \fi
+ \ifnoto@tt\def\mdseries@tt{m}\fi
+ \ifnoto@sf\def\mdseries@sf{m}\fi
+ \ifnoto@rm\def\mdseries@rm{m}\fi
+ \ifnoto@thin
+ \ifnoto@sf\def\mdseries@sf{t}\fi
+ \ifnoto@rm\def\mdseries@rm{t}\fi
+ \fi
+ \ifnoto@extralight
+ \ifnoto@sf\def\mdseries@sf{el}\fi
+ \ifnoto@rm\def\mdseries@rm{el}\fi
+ \fi
+ \ifnoto@light
+ \ifnoto@sf\def\mdseries@sf{l}\fi
+ \ifnoto@rm\def\mdseries@rm{l}\fi
+ \fi
+ \ifnoto@medium
+ \ifnoto@sf\def\mdseries@sf{mb}\fi
+ \ifnoto@rm\def\mdseries@rm{mb}\fi
+ \fi
+
\fi
-\ifnoto@otf\else % type1
- \def\noto@figurestyle{LF}
- \def\noto@figurealign{T}
-\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
+
+\else % type1
+ \def\noto@figurestyle{LF}
+ \ifnoto@oldstyle\def\noto@figurestyle{OsF}\fi
+ \def\noto@figurealign{T}
+ \ifnoto@proportional\def\noto@figurealign{}\fi
+
+\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}
+ \DeclareTextFontCommand{\textsu}{\sufigures}
+ \let\textsuperior\textsu
\fi
\ifnoto@otf
+ \def\noto@regular{Regular}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
Ligatures = TeX ,
- Scale = \NotoSans@scale ,
- Extension = .ttf }
+ Extension = .otf }
\ifnoto@sf
\setsansfont
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
+ [ 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}
\let\notosansfamily\sfdefault
\fi
\ifnoto@rm
\setmainfont
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
+ [ 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
\ifnoto@tt
\setmonofont
- [ UprightFont = * ,
+ [ Scale = \NotoMono@scale ,
+ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Bold ,
BoldItalicFont = *-BoldItalic ]
@@ -88,19 +183,25 @@
\fi
\ifnoto@sfdefault\renewcommand*\familydefault{\notosansfamily}\fi
\newfontfamily\notosans
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
+ [ 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\notoserif
- [ UprightFont = *-Regular ,
- ItalicFont = *-Italic ,
- BoldFont = *-Bold ,
- BoldItalicFont = *-BoldItalic ]
+ [ 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\notomono
- [ UprightFont = * ,
+ [ Scale = \NotoMono@scale ,
+ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Bold ,
BoldItalicFont = *-BoldItalic ]
@@ -108,7 +209,7 @@
\else % type1
\def\notosansfamily{NotoSans-\noto@figurealign\noto@figurestyle}
\def\notoseriffamily{NotoSerif-\noto@figurealign\noto@figurestyle}
- \def\notomonofamily{NotoMono-\noto@figurealign\noto@figurestyle}
+ \def\notomonofamily{NotoMono-TLF}
\newcommand*\notoserif{\fontfamily{\notoseriffamily}\selectfont}
\newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont}
\newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont}