summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/accanthis/accanthis.sty
blob: 79ba9406116405af8fc1d293cf7bab61383535b2 (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
\ProvidesPackage{accanthis}[%
   2013/11/04 (Bob Tennent)  Supports Accanthis No. 3 fonts for all LaTeX engines. ] 

\RequirePackage{ifxetex,ifluatex,textcomp}

\newif\ifaccanthis@otf
\ifxetex
  \accanthis@otftrue
\else\ifluatex
  \accanthis@otftrue
\else  % [pdf]LaTeX
  \accanthis@otffalse
\fi\fi

\newif\ifaccanthis@lining \accanthis@liningtrue

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

\DeclareOptionX{type1}{\accanthis@otffalse}

\ProcessOptionsX\relax

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

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

\else % type1

  \def\accanthisfamily{AccanthisADFStdNoThree-LF}
  \providecommand*\accanthis{\fontfamily{\accanthisfamily}\selectfont}
  \renewcommand*\rmdefault{\accanthisfamily}

\fi

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

\endinput