diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/plex/plex-sans.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/plex/plex-sans.sty | 143 |
1 files changed, 98 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/plex/plex-sans.sty b/Master/texmf-dist/tex/latex/plex/plex-sans.sty index 46e0bb58141..5e88e7dc909 100644 --- a/Master/texmf-dist/tex/latex/plex/plex-sans.sty +++ b/Master/texmf-dist/tex/latex/plex/plex-sans.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{plex-sans} - [2018/08/01 (Bob Tennent) Style file for IBMPlexSans fonts] + [2019/04/23 (Bob Tennent) Style file for IBMPlexSans fonts] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -13,16 +13,45 @@ \plexsans@otffalse \fi\fi +\newcommand*{\IBMPlexSans@scale}{1} +\DeclareOptionX{scale}{\renewcommand*{\IBMPlexSans@scale}{#1}} + +\newif\ifplexsans@sfdefault \plexsans@sfdefaultfalse +\newif\ifplexsans@condensed \plexsans@condensedfalse +\newif\ifplexsans@thin \plexsans@thinfalse +\newif\ifplexsans@extralight \plexsans@extralightfalse +\newif\ifplexsans@light \plexsans@lightfalse +\newif\ifplexsans@textmd \plexsans@textmdfalse +\newif\ifplexsans@text \plexsans@textfalse +\newif\ifplexsans@mediumbold \plexsans@mediumboldfalse +\newif\ifplexsans@semibold \plexsans@semiboldfalse + +\DeclareOptionX{type1}{\plexsans@otffalse} +\DeclareOptionX{sfdefault}{\plexsans@sfdefaulttrue} +\DeclareOptionX{condensed}{\plexsans@condensedtrue} + +\DeclareOptionX{thin}{\plexsans@thintrue} +\DeclareOptionX{t}{\plexsans@thintrue} +\DeclareOptionX{extralight}{\plexsans@extralighttrue} +\DeclareOptionX{el}{\plexsans@extralighttrue} +\DeclareOptionX{light}{\plexsans@lighttrue} +\DeclareOptionX{l}{\plexsans@lighttrue} +\DeclareOptionX{textmd}{\plexsans@textmdtrue} +\DeclareOptionX{txmd}{\plexsans@textmdtrue} +\DeclareOptionX{text}{\plexsans@texttrue} +\DeclareOptionX{tx}{\plexsans@texttrue} +\DeclareOptionX{medium}{\plexsans@mediumboldtrue} +\DeclareOptionX{mb}{\plexsans@mediumboldtrue} +\DeclareOptionX{semibold}{\plexsans@semiboldtrue} +\DeclareOptionX{sb}{\plexsans@semiboldtrue} + + +\ProcessOptionsX\relax + \ifplexsans@otf \RequirePackage{fontspec} - \def\plexsans@medstyle{Regular} - \def\plexsans@boldstyle{Bold} \else % type1 \RequirePackage{fontenc,fontaxes,mweights} - \def\bfseries@sf{b} - \def\mdseries@sf{m} - \def\plexsans@figurestyle{LF} - \def\plexsans@figurealign{T} \fa@naming@exception{figures}{{superior}{proportional}}{Sup} \fa@naming@exception{figures}{{superior}{tabular}}{Sup} \def\sufigures{\@nomath\sufigures @@ -31,35 +60,42 @@ \let\textsuperior\textsu \fi -\newcommand*{\IBMPlexSans@scale}{1} -\newcommand*{\IBMPlexSansCondensed@scale}{1} -\DeclareOptionX{scale}{\renewcommand*{\IBMPlexSans@scale}{#1}\renewcommand*{\IBMPlexSansCondensed@scale}{#1}} - -\newif\ifplexsans@sfdefault \plexsans@sfdefaultfalse -\newif\ifplexsans@condensed \plexsans@condensedfalse - -\DeclareOptionX{type1}{\plexsans@otffalse} -\DeclareOptionX{sfdefault}{\plexsans@sfdefaulttrue} -\DeclareOptionX{condensed}{\plexsans@condensedtrue} - -\DeclareOptionX{thin}{\edef\mdseries@sf{t}\def\plexsans@medstyle{Thin}} -\DeclareOptionX{t}{\edef\mdseries@sf{t}\def\plexsans@medstyle{Thin}} -\DeclareOptionX{extralight}{\edef\mdseries@sf{el}\def\plexsans@medstyle{ExtraLight}} -\DeclareOptionX{el}{\edef\mdseries@sf{el}\def\plexsans@medstyle{ExtraLight}} -\DeclareOptionX{light}{\edef\mdseries@sf{l}\def\plexsans@medstyle{Light}} -\DeclareOptionX{l}{\edef\mdseries@sf{l}\def\plexsans@medstyle{Light}} -\DeclareOptionX{textmd}{\edef\mdseries@sf{tx}\def\plexsans@medstyle{Text}} -\DeclareOptionX{txmd}{\edef\mdseries@sf{tx}\def\plexsans@medstyle{Text}} -\DeclareOptionX{text}{\edef\bfseries@sf{tx}\def\plexsans@boldstyle{Text}} -\DeclareOptionX{tx}{\edef\bfseries@sf{tx}\def\plexsans@boldstyle{Text}} -\DeclareOptionX{medium}{\edef\bfseries@sf{mb}\def\plexsans@boldstyle{Medium}} -\DeclareOptionX{m}{\edef\bfseries@sf{mb}\def\plexsans@boldstyle{Medium}} -\DeclareOptionX{semibold}{\edef\bfseries@sf{sb}\def\plexsans@boldstyle{SemiBold}} -\DeclareOptionX{sb}{\edef\bfseries@sf{sb}\def\plexsans@boldstyle{SemiBold}} - +\ifplexsans@otf -\ProcessOptionsX\relax + \def\plexsans@medstyle{Regular} + \ifplexsans@thin\def\plexsans@medstyle{Thin} + \else\ifplexsans@extralight\def\plexsans@medstyle{ExtraLight} + \else\ifplexsans@light\def\plexsans@medstyle{Light} + \else\ifplexsans@textmd\def\plexsans@medstyle{Text}\fi\fi\fi\fi + \def\plexsans@boldstyle{Bold} + \ifplexsans@text\def\plexsans@boldstyle{Text} + \else\ifplexsans@mediumbold\def\plexsans@boldstyle{Medium} + \else\ifplexsans@semibold\def\plexsans@boldstyle{SemiBold}\fi\fi\fi +\else % type1 + + \ifplexsans@condensed + \def\mdseries@sf{condensed} + \ifplexsans@thin\def\mdseries@sf{thincondensed} + \else\ifplexsans@extralight\def\mdseries@sf{extralightcondensed} + \else\ifplexsans@light\def\mdseries@sf{lightcondensed} + \else\ifplexsans@textmd\def\mdseries@sf{text}\fi\fi\fi\fi + \def\bfseries@sf{boldcondensed} + \ifplexsans@text\def\bfseries@sf{textcondensed} + \else\ifplexsans@mediumbold\def\bfseries@sf{mediumcondensed} + \else\ifplexsans@semibold\def\bfseries@sf{semiboldcondensed}\fi\fi\fi + \else + \def\mdseries@sf{regular} + \ifplexsans@thin\def\mdseries@sf{thin} + \else\ifplexsans@extralight\def\mdseries@sf{extralight} + \else\ifplexsans@light\def\mdseries@sf{light} + \else\ifplexsans@textmd\def\mdseries@sf{text}\fi\fi\fi\fi + \def\bfseries@sf{bold} + \ifplexsans@text\def\bfseries@sf{text} + \else\ifplexsans@mediumbold\def\bfseries@sf{medium} + \else\ifplexsans@semibold\def\bfseries@sf{semibold}\fi\fi\fi + \fi +\fi \ifplexsans@otf \def\plexsans@regular{Regular} @@ -107,19 +143,36 @@ {IBMPlexSansCondensed} \else % type1 - \def\plexsansfamily{IBMPlexSans-\plexsans@figurealign\plexsans@figurestyle} - \def\plexsanscondensedfamily{IBMPlexSansCondensed-\plexsans@figurealign\plexsans@figurestyle} - \newcommand*\plexsans{\fontfamily{\plexsansfamily}\selectfont} - \newcommand*\plexsanscondensed{\fontfamily{\plexsanscondensedfamily}\selectfont} - \ifplexsans@condensed - \def\sfdefault{\plexsanscondensedfamily} - \else - \def\sfdefault{\plexsansfamily} - \fi - \ifplexsans@sfdefault\edef\familydefault{\sfdefault}\fi + \def\plexsansfamily{IBMPlexSans-TLF} + \newcommand*\plexsans{% + \def\mdseries@sf{regular} + \ifplexsans@thin\def\mdseries@sf{thin} + \else\ifplexsans@extralight\def\mdseries@sf{extralight} + \else\ifplexsans@light\def\mdseries@sf{light} + \else\ifplexsans@textmd\def\mdseries@sf{text}\fi\fi\fi\fi + \def\bfseries@sf{bold} + \ifplexsans@text\def\bfseries@sf{text} + \else\ifplexsans@mediumbold\def\bfseries@sf{medium} + \else\ifplexsans@semibold\def\bfseries@sf{semibold}\fi\fi\fi + \sffamily + } + \newcommand*\plexsanscondensed{% + \def\mdseries@sf{condensed} + \ifplexsans@thin\def\mdseries@sf{thincondensed} + \else\ifplexsans@extralight\def\mdseries@sf{extralightcondensed} + \else\ifplexsans@light\def\mdseries@sf{lightcondensed} + \else\ifplexsans@textmd\def\mdseries@sf{text}\fi\fi\fi\fi + \def\bfseries@sf{boldcondensed} + \ifplexsans@text\def\bfseries@sf{textcondensed} + \else\ifplexsans@mediumbold\def\bfseries@sf{mediumcondensed} + \else\ifplexsans@semibold\def\bfseries@sf{semiboldcondensed}\fi\fi\fi + \sffamily + } + \renewcommand*\sfdefault{\plexsansfamily} + \ifplexsans@sfdefault\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi \fi - +\newcommand*\plexsanslgr{\fontencoding{LGR}\fontfamily{IBMPlexSans-TLF}\selectfont} % even for otf \ifplexsans@otf % turn off defaults in case other fonts are selected: |