summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cinzel/cinzel.sty
blob: 8bf885f1b56ff98b68a97978aec49b40975b814a (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cinzel}
    [2022/09/29  (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
\newif\ifcinzel@default \cinzel@defaultfalse

\DeclareOptionX{type1}{\cinzel@ttffalse}
\DeclareOptionX{black}{\cinzel@blacktrue}
\DeclareOptionX{default}{\cinzel@defaulttrue}
\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{eb}\fi

\fi

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


\ifcinzel@ttf
  \defaultfontfeatures{
        Ligatures = TeX ,
        Extension = .ttf }
  \ifcinzel@default
      \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *Decorative-Regular ,
        BoldFont       = *-\cinzel@boldstyle , 
        BoldItalicFont = *Decorative-\cinzel@boldstyle ]
      {Cinzel}
  \fi
  \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}\selectfont
    \def\itshape{\ifx\f@family\cinzelfamily\fontfamily{CinzelDecorative-LF}\fontshape{n}\else\fontshape{\itdefault}\fi\selectfont}
  }
  \ifcinzel@default
     \def\rmdefault{\cinzelfamily}
     \def\itshape{\ifx\f@family\cinzelfamily\fontfamily{CinzelDecorative-LF}\fontshape{n}\else\fontshape{\itdefault}\fi\selectfont}
  \fi
  \newcommand*\cinzelblack{%
    \fontfamily{\cinzelfamily}\fontseries{eb}\selectfont
    \def\itshape{\ifx\f@family\cinzelfamily\fontfamily{CinzelDecorative-LF}\fontseries{eb}\else\fontshape{\itdefault}\fi\selectfont}
  }

\fi

\DeclareTextFontCommand{\textcinzel}{\cinzel}
\DeclareTextFontCommand{\textcinzelblack}{\cinzelblack}

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

\endinput