summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gillius/gillius.sty
blob: 395f8f433aa18ef36d0a61c2bf2a24f8e7b321ea (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{gillius}
    [2013/11/03 (Bob Tennent)  Supports Gillius fonts for all LaTeX engines.]

\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}

\newif\ifgillius@otf 
\ifxetex
  \gillius@otftrue
\else\ifluatex
  \gillius@otftrue
\else  % [pdf]LaTeX
  \gillius@otffalse
\fi\fi

\newif\ifgillius@default \gillius@defaultfalse
\newif\ifgillius@condensed \gillius@condensedfalse

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

\DeclareOptionX{default}{\gillius@defaulttrue}
\DeclareOptionX{sfdefault}{\gillius@defaulttrue}
\DeclareOptionX{type1}{\gillius@otffalse}
\DeclareOptionX{condensed}{\gillius@condensedtrue}

\ProcessOptionsX\relax

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

\ifgillius@otf
  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
        Ligatures = TeX ,
        Scale     = \GilliusADF@scale ,
        Extension = .otf }
  \ifgillius@condensed
    \setsansfont
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {GilliusADFCond}
  \else
    \setsansfont
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {GilliusADF}
  \fi
  % grab current family in case of subsequent change:
  \let\gilliusfamily\sfdefault  
  \ifgillius@default\renewcommand*\familydefault{\gilliusfamily}\fi
  \newfontfamily\gillius
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {GilliusADF}
  \newfontfamily\gilliuscondensed
        [ UprightFont    = *-Regular ,
          ItalicFont     = *-Italic ,
          BoldFont       = *-Bold , 
          BoldItalicFont = *-BoldItalic ]
        {GilliusADFCond}

\else % type1

  \def\gilliusfamily{GilliusADF-LF}
  \def\gilliuscondensedfamily{GilliusADFCond-LF}
  \newcommand*\gillius{\fontfamily{\gilliusfamily}\selectfont}
  \newcommand*\gilliuscondensed{\fontfamily{\gilliuscondensedfamily}\selectfont}
  \def\sfdefault{\gilliusfamily}
  \ifgillius@condensed\def\sfdefault{\gilliuscondensedfamily}\fi  
  \ifgillius@default\edef\familydefault{\sfdefault}\fi
\fi

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

\endinput