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 | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/plex/plex-sans.sty b/Master/texmf-dist/tex/latex/plex/plex-sans.sty index 16eea807e7c..a38f12f3baa 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} - [2017/11/13 (Bob Tennent) Style file for IBMPlexSans fonts] + [2018/03/26 (Bob Tennent) Style file for IBMPlexSans fonts] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} @@ -32,13 +32,15 @@ \fi \newcommand*{\IBMPlexSans@scale}{1} -\DeclareOptionX{scale}{\renewcommand*{\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}} @@ -66,33 +68,59 @@ Ligatures = TeX , Scale = \IBMPlexSans@scale , Extension = .otf } - \setsansfont + \ifplexsans@condensed + \setsansfont + [ UprightFont = *-\plexsans@medstyle , + ItalicFont = *-\ifx\plexsans@medstyle\plexsans@regular + Italic + \else\plexsans@medstyle Italic\fi , + BoldFont = *-\plexsans@boldstyle , + BoldItalicFont = *-\plexsans@boldstyle Italic ] + {IBMPlexSansCondensed} + \else + \setsansfont + [ UprightFont = *-\plexsans@medstyle , + ItalicFont = *-\ifx\plexsans@medstyle\plexsans@regular + Italic + \else\plexsans@medstyle Italic\fi , + BoldFont = *-\plexsans@boldstyle , + BoldItalicFont = *-\plexsans@boldstyle Italic ] + {IBMPlexSans} + \fi + \let\plexsansfamily\sfdefault + \ifplexsans@sfdefault\renewcommand*\familydefault{\plexsansfamily}\fi + \newfontfamily\plexsans [ UprightFont = *-\plexsans@medstyle , ItalicFont = *-\ifx\plexsans@medstyle\plexsans@regular Italic \else\plexsans@medstyle Italic\fi , BoldFont = *-\plexsans@boldstyle , BoldItalicFont = *-\plexsans@boldstyle Italic ] - {IBMPlexSans} - \let\plexsansfamily\sfdefault - \newfontfamily\plexsans + {IBMPlexSans} + \newfontfamily\plexsanscondensed [ UprightFont = *-\plexsans@medstyle , ItalicFont = *-\ifx\plexsans@medstyle\plexsans@regular Italic \else\plexsans@medstyle Italic\fi , BoldFont = *-\plexsans@boldstyle , BoldItalicFont = *-\plexsans@boldstyle Italic ] - {IBMPlexSans} - \ifplexsans@sfdefault\renewcommand*\familydefault{\plexsansfamily}\fi - + {IBMPlexSansCondensed} \else % type1 \def\plexsansfamily{IBMPlexSans-\plexsans@figurealign\plexsans@figurestyle} + \def\plexsanscondensedfamily{IBMPlexSansCondensed-\plexsans@figurealign\plexsans@figurestyle} \newcommand*\plexsans{\fontfamily{\plexsansfamily}\selectfont} - \def\sfdefault{\plexsansfamily} + \newcommand*\plexsanscondensed{\fontfamily{\plexsanscondensedfamily}\selectfont} + \ifplexsans@condensed + \def\sfdefault{\plexsanscondensedfamily} + \else + \def\sfdefault{\plexsansfamily} + \fi \ifplexsans@sfdefault\edef\familydefault{\sfdefault}\fi \fi + + \ifplexsans@otf % turn off defaults in case other fonts are selected: \defaultfontfeatures{} |