summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cinzel/cinzel.sty
blob: 7bae8ecd449c894fd6e94b9853fd20c6b454d709 (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cinzel}
    [2014/03/30  (Bob Tennent)  Supports Cinzel and CinzelDecorative for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\ifcinzel@otf 
\ifxetex
  \cinzel@otftrue
\else\ifluatex
  \cinzel@otftrue
\else  % [pdf]LaTeX
  \cinzel@otffalse
\fi\fi

\newif\ifcinzel@black \cinzel@blackfalse

\DeclareOptionX{type1}{\cinzel@otffalse}
\DeclareOptionX{black}{\cinzel@blacktrue}
\ProcessOptionsX\relax

\ifcinzel@otf
  \def\cinzel@boldstyle{Bold}
  \ifcinzel@black\def\cinzel@boldstyle{Black}\fi

\else % type1
  \def\bfseries@rm{b}
  \ifcinzel@black\def\bfseries@rm{k}\fi

\fi

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


\ifcinzel@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Extension = .otf }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *Decorative-Regular ,
        BoldFont       = *-\cinzel@boldstyle , 
        BoldItalicFont = *Decorative-\cinzel@boldstyle ]
      {Cinzel}
  \newfontfamily\cinzel
      [ UprightFont    = *-Regular ,
        ItalicFont     = *Decorative-Regular ,
        BoldFont       = *-\cinzel@boldstyle , 
        BoldItalicFont = *Decorative-\cinzel@boldstyle ]
      {Cinzel}
  \newfontfamily\cinzelblack
      [ UprightFont    = *-Black ,
        ItalicFont     = *Decorative-Black ]
      {Cinzel}

\else % type1
  \def\cinzelfamily{Cinzel-LF}
  \newcommand*\cinzel{\fontfamily{\cinzelfamily}\def\itshape{\fontfamily{CinzelDecorative-LF}\fontshape{n}\selectfont}\selectfont}
  \def\rmdefault{\cinzelfamily}
  \def\itshape{\fontfamily{CinzelDecorative-LF}\fontshape{n}\selectfont}
  \newcommand*\cinzelblack{\fontfamily{\cinzelfamily}\fontseries{k}\def\itshape{\fontfamily{CinzelDecorative-LF}\fontshape{n}\selectfont}\selectfont}

\fi

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

\endinput