diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-15 23:11:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-15 23:11:43 +0000 |
commit | a705a0eda3b9becbb41d9ff0ef44aec86fe5a2a4 (patch) | |
tree | 7ea446138a678d3cde2d8c2f8bd7c0f4144d146c /Master/texmf-dist/tex/latex/plex/plex-serif.sty | |
parent | 9dc9700e2d9d17be02168dcc90bd4b9a9feceb8f (diff) |
plex (15nov17)
git-svn-id: svn://tug.org/texlive/trunk@45825 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/plex/plex-serif.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/plex/plex-serif.sty | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/plex/plex-serif.sty b/Master/texmf-dist/tex/latex/plex/plex-serif.sty new file mode 100644 index 00000000000..20a828cb410 --- /dev/null +++ b/Master/texmf-dist/tex/latex/plex/plex-serif.sty @@ -0,0 +1,86 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{plex-serif} + [2017/11/13 (Bob Tennent) Style file for IBMPlexSerif fonts] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifplexserif@otf +\ifxetex + \plexserif@otftrue +\else\ifluatex + \plexserif@otftrue +\else % [pdf]LaTeX + \plexserif@otffalse +\fi\fi + +\ifplexserif@otf + \RequirePackage{fontspec} + \def\plexserif@medstyle{Regular} + \def\plexserif@boldstyle{Bold} +\else % type1 + \RequirePackage{fontenc,fontaxes,mweights} + \def\bfseries@rm{b} + \def\mdseries@rm{m} + \def\plexserif@figurestyle{LF} + \def\plexserif@figurealign{T} + \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 + +\newcommand*{\IBMPlexSerif@scale}{1} +\DeclareOptionX{scale}{\renewcommand*{\IBMPlexSerif@scale}{#1}} + + +\DeclareOptionX{type1}{\plexserif@otffalse} + +\DeclareOptionX{thin}{\edef\mdseries@rm{t}\def\plexserif@medstyle{Thin}} +\DeclareOptionX{t}{\edef\mdseries@rm{t}\def\plexserif@medstyle{Thin}} +\DeclareOptionX{extralight}{\edef\mdseries@rm{el}\def\plexserif@medstyle{ExtraLight}} +\DeclareOptionX{el}{\edef\mdseries@rm{el}\def\plexserif@medstyle{ExtraLight}} +\DeclareOptionX{light}{\edef\mdseries@rm{l}\def\plexserif@medstyle{Light}} +\DeclareOptionX{l}{\edef\mdseries@rm{l}\def\plexserif@medstyle{Light}} +\DeclareOptionX{text}{\edef\bfseries@rm{tx}\def\plexserif@boldstyle{Text}} +\DeclareOptionX{tx}{\edef\bfseries@rm{tx}\def\plexserif@boldstyle{Text}} +\DeclareOptionX{medium}{\edef\bfseries@rm{mb}\def\plexserif@boldstyle{Medium}} +\DeclareOptionX{m}{\edef\bfseries@rm{mb}\def\plexserif@boldstyle{Medium}} +\DeclareOptionX{semibold}{\edef\bfseries@rm{sb}\def\plexserif@boldstyle{SemiBold}} +\DeclareOptionX{sb}{\edef\bfseries@rm{sb}\def\plexserif@boldstyle{SemiBold}} + +\ProcessOptionsX\relax + + +\ifplexserif@otf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \IBMPlexSerif@scale , + Extension = .otf } + \setmainfont + [ UprightFont = *-\plexserif@medstyle , + ItalicFont = *-\plexserif@medstyle Italic , + BoldFont = *-\plexserif@boldstyle , + BoldItalicFont = *-\plexserif@boldstyle Italic ] + {IBMPlexSerif} + \newfontfamily\plexserif + [ UprightFont = *-\plexserif@medstyle , + ItalicFont = *-\plexserif@medstyle Italic , + BoldFont = *-\plexserif@boldstyle , + BoldItalicFont = *-\plexserif@boldstyle Italic ] + {IBMPlexSerif} + +\else % type1 + \def\plexseriffamily{IBMPlexSerif-\plexserif@figurealign\plexserif@figurestyle} + \newcommand*\plexserif{\fontfamily{\plexseriffamily}\selectfont} + \def\rmdefault{\plexseriffamily} +\fi + +\ifplexserif@otf + % turn off defaults in case other fonts are selected: + \defaultfontfeatures{} +\fi + +\endinput |