summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noto/noto-mono.sty
blob: 0a8d1ae49726cf70a27b4f8bd922ac9648cf4cc0 (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
83
84
85
86
87
88
89
90
91
92
93
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{noto-mono}
    [2018/02/20 (Bob Tennent)  Supports NotoMono fonts for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\ifnotomono@otf 
\ifxetex
  \notomono@otftrue
\else\ifluatex
  \notomono@otftrue
\else  % [pdf]LaTeX
  \notomono@otffalse
\fi\fi

\newcommand*{\NotoMono@scale}{1}
\DeclareOptionX{scaled}{\renewcommand*{\NotoMono@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\NotoMono@scale}{#1}}

\DeclareOptionX{type1}{\notomono@otffalse}

\DeclareOptionX{lining}{}
\DeclareOptionX{lf}{}
\DeclareOptionX{tabular}{}
\DeclareOptionX{tf}{}
\DeclareOptionX{proportional}{}
\DeclareOptionX{pf}{}
\DeclareOptionX{oldstyle}{}
\DeclareOptionX{osf}{}

\DeclareOptionX{thin}{}
\DeclareOptionX{extralight}{}
\DeclareOptionX{light}{}
\DeclareOptionX{regular}{}
\DeclareOptionX{medium}{}
\DeclareOptionX{semibold}{}
\DeclareOptionX{extrabold}{}
\DeclareOptionX{black}{}
\DeclareOptionX{bold}{}


\ProcessOptionsX\relax

\ifnotomono@otf
\else % type1
  \def\bfseries@tt{b}
  \def\mdseries@tt{m}
\fi

\ifnotomono@otf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes,mweights}
  \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

\ifnotomono@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Scale     = \NotoMono@scale ,
        Extension = .ttf }
    \setmonofont 
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {NotoMono}
    \let\notomonofamily\ttdefault  
  \newfontfamily\notomono 
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {NotoMono}
\else % type1
  \def\notomonofamily{NotoMono-TLF}
  \newcommand*\notomono{\fontfamily{\notomonofamily}\selectfont}
  \def\ttdefault{\notomonofamily} 
\fi


\ifnotomono@otf
  % turn off defaults in case other fonts are selected:
  \defaultfontfeatures{}
\fi

\endinput