summaryrefslogtreecommitdiff
path: root/fonts/lexend/tex/lexend.sty
blob: 413091a9e7ae23ad2bb2450dce166231286eeb55 (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
% lexend
% The Lexend fonts for XeLaTeX and LuaLaTeX through fontspec
% 
% (c) Yannick Schinko
%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
% 
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{lexend}
  [2021/01/30 1.1.0.70 The Lexend fonts for XeLaTeX and LuaLaTeX through fontspec]

% Packages/Dependencies
\RequirePackage{expl3}
\RequirePackage{fontspec}
\RequirePackage{kvoptions}

% Package options
\DeclareBoolOption[true]{main}
\DeclareComplementaryOption{nomain}{main}

\DeclareBoolOption[true]{sans}
\DeclareComplementaryOption{nosans}{sans}

\ProcessKeyvalOptions*{}

% Font list
\ExplSyntaxOn
\def\LexendVariants{
  LexendDeca,
  LexendExa,
  LexendGiga,
  LexendMega,
  LexendPeta,
  LexendTera,
  LexendZetta
}

% Font aliases
%% Iterate over all known fonts and create aliases
\clist_map_inline:Nn \LexendVariants {
  \exp_args:Nc \newfontfamily { @#1 } { #1 }
  \exp_args:Ncc \DeclareTextFontCommand { #1 } { @#1 }
}
\ExplSyntaxOff

% Set main fonts
\iflexend@main
  \setmainfont{LexendDeca}
\fi

\iflexend@sans
  \setsansfont{LexendGiga}
\fi

\endinput
%%
%% End of file lexend.sty.