diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/gofonts/GoSans.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gofonts/GoSans.sty | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gofonts/GoSans.sty b/Master/texmf-dist/tex/latex/gofonts/GoSans.sty new file mode 100644 index 00000000000..3edd89097e0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/gofonts/GoSans.sty @@ -0,0 +1,101 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{GoSans} + [2016/11/18 (Bob Tennent and autoinst) Style file for Go Sans fonts.] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\ifgo@ttf +\ifxetex + \go@ttftrue +\else\ifluatex + \go@ttftrue +\else % [pdf]LaTeX + \go@ttffalse +\fi\fi + +\newif\ifgo@medium \go@mediumfalse +\newif\ifgo@default \go@defaultfalse + +\newcommand*{\Go@scale}{1} +\RequirePackage{xkeyval} +\DeclareOptionX{scaled}{\renewcommand*{\Go@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\Go@scale}{#1}} +\DeclareOptionX{type1}{\go@ttffalse} + +\DeclareOptionX{medium}{\go@mediumtrue} +\DeclareOptionX{default}{\go@defaulttrue} +\DeclareOptionX{sfdefault}{\go@defaulttrue} + + +\ProcessOptionsX + +\ifgo@ttf + + \def\go@boldstyle{Bold} + \def\go@regstyle{Regular} + \ifgo@medium\def\go@boldstyle{Medium}\fi + +\else % type1 + + \def\bfseries@sf{b} + \def\mdseries@sf{m} + \ifgo@medium\def\bfseries@sf{mb}\fi + +\fi + + +\ifgo@ttf + \RequirePackage{fontspec} +\else + \RequirePackage{fontenc,mweights} +\fi + +\ifgo@ttf + \ifxetex\XeTeXtracingfonts=1\fi + \defaultfontfeatures{ + Ligatures = TeX , + Scale = \Go@scale , + Extension = .ttf } + \setsansfont + [ UprightFont = *-Regular , + ItalicFont = *-Regular-Italic , + BoldFont = *-\go@boldstyle , + BoldItalicFont = *-\go@boldstyle-Italic , + ] + {Go} + % grab current family in case of subsequent change: + \let\gofamily\sfdefault + \ifgo@default\renewcommand*\familydefault{\gofamily}\fi + + \newfontfamily\gomedium + [ UprightFont = *-Regular , + ItalicFont = *-Regular-Italic , + BoldFont = *-Medium , + BoldItalicFont = *-Medium-Italic + ] + {Go} + \newfontfamily\gobold + [ UprightFont = *-Regular , + ItalicFont = *-Regular-Italic , + BoldFont = *-Bold , + BoldItalicFont = *-Bold-Italic , + ] + {Go} + +\else % type1 + + \def\go@family{Go-TLF} + \renewcommand*\sfdefault{\go@family} + \ifgo@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi + + \def\gomedium{\fontfamily{\go@family}\fontseries{mb}\selectfont} + \def\gobold{\fontfamily{\go@family}\fontseries{b}\selectfont} + +\fi + + +\ifgo@ttf + \defaultfontfeatures{} +\fi + +\endinput |