blob: 1583c6f4a8cad47c5e615b7b8fc6338c02b6eec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{GoMono}
[2019/04/19 (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{bold}
\def\mdseries@tt{regular}
\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
\def\gomonolgr{\fontencoding{LGR}\fontfamily{GoMono-TLF}\selectfont}
\ifgomono@ttf
\defaultfontfeatures{}
\fi
\endinput
|