summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/plex/plex-mono.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-15 23:11:43 +0000
committerKarl Berry <karl@freefriends.org>2017-11-15 23:11:43 +0000
commita705a0eda3b9becbb41d9ff0ef44aec86fe5a2a4 (patch)
tree7ea446138a678d3cde2d8c2f8bd7c0f4144d146c /Master/texmf-dist/tex/latex/plex/plex-mono.sty
parent9dc9700e2d9d17be02168dcc90bd4b9a9feceb8f (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-mono.sty')
-rw-r--r--Master/texmf-dist/tex/latex/plex/plex-mono.sty86
1 files changed, 86 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/plex/plex-mono.sty b/Master/texmf-dist/tex/latex/plex/plex-mono.sty
new file mode 100644
index 00000000000..7532d1ac766
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/plex/plex-mono.sty
@@ -0,0 +1,86 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{plex-mono}
+ [2017/11/13 (Bob Tennent) Style file for IBMPlexMono fonts]
+
+\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
+
+\newif\ifplexmono@otf
+\ifxetex
+ \plexmono@otftrue
+\else\ifluatex
+ \plexmono@otftrue
+\else % [pdf]LaTeX
+ \plexmono@otffalse
+\fi\fi
+
+\ifplexmono@otf
+ \RequirePackage{fontspec}
+ \def\plexmono@medstyle{Regular}
+ \def\plexmono@boldstyle{Bold}
+\else % type1
+ \RequirePackage{fontenc,fontaxes,mweights}
+ \def\bfseries@tt{b}
+ \def\mdseries@tt{m}
+ \def\plexmono@figurestyle{LF}
+ \def\plexmono@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*{\IBMPlexMono@scale}{1}
+\DeclareOptionX{scale}{\renewcommand*{\IBMPlexMono@scale}{#1}}
+
+
+\DeclareOptionX{type1}{\plexmono@otffalse}
+
+\DeclareOptionX{thin}{\edef\mdseries@tt{t}\def\plexmono@medstyle{Thin}}
+\DeclareOptionX{t}{\edef\mdseries@tt{t}\def\plexmono@medstyle{Thin}}
+\DeclareOptionX{extralight}{\edef\mdseries@tt{el}\def\plexmono@medstyle{ExtraLight}}
+\DeclareOptionX{el}{\edef\mdseries@tt{el}\def\plexmono@medstyle{ExtraLight}}
+\DeclareOptionX{light}{\edef\mdseries@tt{l}\def\plexmono@medstyle{Light}}
+\DeclareOptionX{l}{\edef\mdseries@tt{l}\def\plexmono@medstyle{Light}}
+\DeclareOptionX{text}{\edef\bfseries@tt{tx}\def\plexmono@boldstyle{Text}}
+\DeclareOptionX{tx}{\edef\bfseries@tt{tx}\def\plexmono@boldstyle{Text}}
+\DeclareOptionX{medium}{\edef\bfseries@tt{mb}\def\plexmono@boldstyle{Medium}}
+\DeclareOptionX{m}{\edef\bfseries@tt{mb}\def\plexmono@boldstyle{Medium}}
+\DeclareOptionX{semibold}{\edef\bfseries@tt{sb}\def\plexmono@boldstyle{SemiBold}}
+\DeclareOptionX{sb}{\edef\bfseries@tt{sb}\def\plexmono@boldstyle{SemiBold}}
+
+\ProcessOptionsX\relax
+
+
+\ifplexmono@otf
+ \ifxetex\XeTeXtracingfonts=1\fi
+ \defaultfontfeatures{
+ Ligatures = TeX ,
+ Scale = \IBMPlexMono@scale ,
+ Extension = .otf }
+ \setmonofont
+ [ UprightFont = *-\plexmono@medstyle ,
+ ItalicFont = *-\plexmono@medstyle Italic ,
+ BoldFont = *-\plexmono@boldstyle ,
+ BoldItalicFont = *-\plexmono@boldstyle Italic ]
+ {IBMPlexMono}
+ \newfontfamily\plexmono
+ [ UprightFont = *-\plexmono@medstyle ,
+ ItalicFont = *-\plexmono@medstyle Italic ,
+ BoldFont = *-\plexmono@boldstyle ,
+ BoldItalicFont = *-\plexmono@boldstyle Italic ]
+ {IBMPlexMono}
+
+\else % type1
+ \def\plexmonofamily{IBMPlexMono-\plexmono@figurealign\plexmono@figurestyle}
+ \newcommand*\plexmono{\fontfamily{\plexmonofamily}\selectfont}
+ \def\ttdefault{\plexmonofamily}
+\fi
+
+\ifplexmono@otf
+ % turn off defaults in case other fonts are selected:
+ \defaultfontfeatures{}
+\fi
+
+\endinput