summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noto/noto-sans.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-sans.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-sans.sty')
-rw-r--r--Master/texmf-dist/tex/latex/noto/noto-sans.sty150
1 files changed, 150 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/noto/noto-sans.sty b/Master/texmf-dist/tex/latex/noto/noto-sans.sty
new file mode 100644
index 00000000000..f51997aebab
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/noto/noto-sans.sty
@@ -0,0 +1,150 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{noto-sans}
+ [2018/02/19 (Bob Tennent) Supports NotoSans fonts for all LaTeX engines.]
+
+\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
+
+\newif\ifnotosans@otf
+\ifxetex
+ \notosans@otftrue
+\else\ifluatex
+ \notosans@otftrue
+\else % [pdf]LaTeX
+ \notosans@otffalse
+\fi\fi
+
+\newif\ifnotosans@sfdefault \notosans@sfdefaultfalse
+
+\newcommand*{\NotoSans@scale}{1}
+\DeclareOptionX{scaled}{\renewcommand*{\NotoSans@scale}{#1}}
+\DeclareOptionX{scale}{\renewcommand*{\NotoSans@scale}{#1}}
+
+
+\DeclareOptionX{sfdefault}{\notosans@sfdefaulttrue}
+\DeclareOptionX{type1}{\notosans@otffalse}
+
+
+\newif\ifnotosans@oldstyle \notosans@oldstylefalse
+\newif\ifnotosans@proportional \notosans@proportionalfalse
+
+\DeclareOptionX{lining}{\notosans@oldstylefalse}
+\DeclareOptionX{lf}{\notosans@oldstylefalse}
+\DeclareOptionX{tabular}{\notosans@proportionalfalse}
+\DeclareOptionX{tf}{\notosans@proportionalfalse}
+\DeclareOptionX{proportional}{\notosans@proportionaltrue}
+\DeclareOptionX{pf}{\notosans@proportionaltrue}
+\DeclareOptionX{oldstyle}{\notosans@oldstyletrue}
+\DeclareOptionX{osf}{\notosans@oldstyletrue}
+
+\newif\ifnotosans@thin \notosans@thinfalse
+\newif\ifnotosans@extralight \notosans@extralightfalse
+\newif\ifnotosans@light \notosans@lightfalse
+\newif\ifnotosans@medium \notosans@mediumfalse
+\newif\ifnotosans@semibold \notosans@semiboldfalse
+\newif\ifnotosans@extrabold \notosans@extraboldfalse
+\newif\ifnotosans@black \notosans@blackfalse
+
+\DeclareOptionX{thin}{\notosans@thintrue}
+\DeclareOptionX{extralight}{\notosans@extralighttrue}
+\DeclareOptionX{light}{\notosans@lighttrue}
+\DeclareOptionX{regular}{\notosans@lighfalse\notosans@thinfalse\notosans@extralightfalse\notosans@mediumfalse}
+\DeclareOptionX{medium}{\notosans@mediumtrue}
+\DeclareOptionX{semibold}{\notosans@semiboldtrue}
+\DeclareOptionX{extrabold}{\notosans@extraboldtrue}
+\DeclareOptionX{black}{\notosans@blacktrue}
+\DeclareOptionX{bold}{\notosans@blackfalse\notosans@semiboldfalse\notosans@extraboldfalse}
+
+
+\ProcessOptionsX\relax
+
+\ifnotosans@otf
+ \def\notosans@boldstyle{Bold}
+ \ifnotosans@semibold\def\notosans@boldstyle{SemiBold}\fi
+ \ifnotosans@extrabold\def\notosans@boldstyle{ExtraBold}\fi
+ \ifnotosans@black\def\notosans@boldstyle{Black}\fi
+ \def\notosans@regstyle{Regular}
+ \ifnotosans@thin\def\notosans@regstyle{Thin}\fi
+ \ifnotosans@extralight\def\notosans@regstyle{ExtraLight}\fi
+ \ifnotosans@light\def\notosans@regstyle{Light}\fi
+ \ifnotosans@medium\def\notosans@regstyle{Medium}\fi
+
+\else % type1
+ \def\bfseries@sf{b}
+ \ifnotosans@semibold\def\bfseries@sf{sb}\fi
+ \ifnotosans@extrabold\def\bfseries@sf{eb}\fi
+ \ifnotosans@black\def\bfseries@sf{k}\fi
+ \def\mdseries@sf{m}
+ \ifnotosans@thin\def\mdseries@sf{t}\fi
+ \ifnotosans@extralight\def\mdseries@sf{el}\fi
+ \ifnotosans@light\def\mdseries@sf{l}\fi
+ \ifnotosans@medium\def\mdseries@sf{mb}\fi
+
+\fi
+
+\ifnotosans@otf
+
+ \def\notosans@figurestyle{Lining}
+ \ifnotosans@oldstyle\def\notosans@figurestyle{OldStyle}\fi
+ \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
+
+\ifnotosans@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
+
+\ifnotosans@otf
+ \def\notosans@regular{Regular}
+ \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}
+ \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}
+\else % type1
+ \def\notosansfamily{NotoSans-\notosans@figurealign\notosans@figurestyle}
+ \newcommand*\notosans{\fontfamily{\notosansfamily}\selectfont}
+ \def\sfdefault{\notosansfamily}
+ \ifnotosans@sfdefault\edef\familydefault{\sfdefault}\fi
+\fi
+
+
+\ifnotosans@otf
+ % turn off defaults in case other fonts are selected:
+ \defaultfontfeatures{}
+\fi
+
+\endinput