blob: b792ae6d1e62496cbd7e3651e896275f13723a89 (
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
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bitter}
[200/07/25 (R.D. Tennent) Supports Bitter fonts for xeLaTeX and luaLaTeX.]
\RequirePackage{iftex}
\ifpdftex
\PackageError{bitter}{%
*****************************************\MessageBreak
Please process using XeLaTeX or luaLaTeX\MessageBreak
*****************************************}
\fi
\newcommand*{\Bitter@scale}{1}
\RequirePackage{xkeyval}
\DeclareOptionX{scaled}{\renewcommand*{\Bitter@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\Bitter@scale}{#1}}
\ProcessOptionsX\relax
\RequirePackage{fontspec}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
Ligatures = TeX ,
Extension = .ttf ,
Scale = \Bitter@scale ,
}
\setmainfont
[ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Bold ,
]
{Bitter}
% grab current family in case of subsequent change:
\let\Bitterfamily\rmdefault
\newfontfamily\bitter
[ UprightFont = *-Regular ,
ItalicFont = *-Italic ,
BoldFont = *-Bold ,
]
{Bitter}
% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}
\endinput
|