diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/gofonts/GoMono.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gofonts/GoMono.sty | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gofonts/GoMono.sty b/Master/texmf-dist/tex/latex/gofonts/GoMono.sty new file mode 100644 index 00000000000..8ffc6b65b94 --- /dev/null +++ b/Master/texmf-dist/tex/latex/gofonts/GoMono.sty @@ -0,0 +1,81 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{GoMono} + [2016/11/18 (Bob Tennent and autoinst) Style file for GoMono fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifgomono@ttf +\ifxetex + \gomono@ttftrue +\else\ifluatex + \gomono@ttftrue +\else % [pdf]LaTeX + \gomono@ttffalse +\fi\fi + +\newif\ifgomono@ligatures \gomono@ligaturestrue + +\newcommand*{\GoMono@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\GoMono@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\GoMono@scale}{#1}} +\DeclareOptionX{type1}{\gomono@ttffalse} +\DeclareOptionX{nomap}{\gomono@ligaturesfalse} + +\ProcessOptionsX + +\ifgomono@ttf + + \def\gomono@boldstyle{Bold} + \def\gomono@regstyle{Regular} + +\else % type1 + + \def\bfseries@tt{b} + \def\mdseries@tt{m} + +\fi + + +\ifgomono@ttf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,mweights} +\fi + +\ifgomono@ttf + \ifxetex\XeTeXtracingfonts=1\fi + \ifgomono@ligatures + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \GoMono@scale , + Extension = .ttf } + \else + \defaultfontfeatures{ + Scale = \GoMono@scale , + Extension = .ttf } + \fi + \setmonofont + [ + UprightFont = *-Regular , + ItalicFont = *-Regular-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-Bold-Italic + ] + {GoMono} + % grab current family in case of subsequent change: + \let\gomonofamily\sfdefault + +\else % type1 + + \def\gomono@family{GoMono-TLF} + \def\ttdefault{\gomono@family} + +\fi + + +\ifgomono@ttf + \defaultfontfeatures{} +\fi + +\endinput |