summaryrefslogtreecommitdiff
path: root/fonts/lobster2/latex/LobsterTwo.sty
blob: 34fae95893130b041e1f0b7b6a1bb40123c389d2 (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
\ProvidesPackage{LobsterTwo}[%
   2020/07/31 (Bob Tennent)  Supports Lobster Two fonts for all LaTeX engines. ] 

\RequirePackage{ifxetex,ifluatex,textcomp}

\newif\ifLobsterTwo@otf
\ifxetex
  \LobsterTwo@otftrue
\else\ifluatex
  \LobsterTwo@otftrue
\else  % [pdf]LaTeX
  \LobsterTwo@otffalse
\fi\fi

\newcommand*{\Lbstr@scale}{1}  
\RequirePackage{xkeyval}
\DeclareOptionX{scaled}{\renewcommand*{\Lbstr@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\Lbstr@scale}{#1}}

\DeclareOptionX{type1}{\LobsterTwo@otffalse}

\ProcessOptionsX\relax

\ifLobsterTwo@otf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes}
\fi

\ifLobsterTwo@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
     Ligatures = TeX ,
     Extension = .otf ,
     Scale = \Lbstr@scale ,
  }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ]
      {LobsterTwo}
  \newfontfamily\LobsterTwo
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ]
      {LobsterTwo}

\else % type1

  \def\LobsterTwofamily{Lbstr-LF}
  \renewcommand*\rmdefault{\LobsterTwofamily}
  \newcommand*\LobsterTwo{\fontfamily{\LobsterTwofamily}\selectfont}

\fi

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

\endinput