summaryrefslogtreecommitdiff
path: root/fonts/almendra/latex/almendra.sty
blob: cd9c564516ac0e821f138aad7ba33ae4c7576b84 (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
\ProvidesPackage{almendra}[%
   2020/07/23 (Bob Tennent)  Supports Almendra fonts for XeLaTeX or LuaLaTeX. ] 

\RequirePackage{iftex}

\ifpdftex
\PackageError{almendra}{%
 *****************************************\MessageBreak
  Please process using XeLaTeX or luaLaTeX\MessageBreak
 *****************************************}
\fi  

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

\ProcessOptionsX\relax

\RequirePackage{fontspec}

  \ifxetex\XeTeXtracingfonts=1\fi
  \defaultfontfeatures{
     Ligatures = TeX ,
     Extension = .ttf ,
  }
  \setmainfont
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ,
        SmallCapsFont = {AlmendraSmallCaps}
      ]
      {Almendra}
  \newfontfamily\almendra
      [ UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont       = *-Bold , 
        BoldItalicFont = *-BoldItalic ,
        SmallCapsFont = {AlmendraSmallCaps}
      ]
      {Almendra}

% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}

\endinput