summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cinzel/cinzel.sty
blob: 7dbb3ef5a446332e7f285b18bb910ff298e2eeab (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/05/24  (Bob Tennent)  Supports Cinzel and CinzelDecorative for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\ifcinzel@ttf 
\ifxetex
  \cinzel@ttftrue
\else\ifluatex
  \cinzel@ttftrue
\else  % [pdf]LaTeX
  \cinzel@ttffalse
\fi\fi

\newif\ifcinzel@black \cinzel@blackfalse

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

\ifcinzel@ttf
  \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@ttf
  \RequirePackage{fontspec}
\else
  \RequirePackage{fontenc,fontaxes,mweights}
\fi


\ifcinzel@ttf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Extension = .ttf }
  \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@ttf
% turn off defaults in case other fonts are selected:
  \defaultfontfeatures{}
\fi

\endinput