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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{librefranklin}
[2019/05/10 (Bob Tennent) Supports LibreFranklin fonts for all LaTeX engines.]
\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
\newif\iflibrefranklin@otf
\ifxetex
\librefranklin@otftrue
\else\ifluatex
\librefranklin@otftrue
\else % [pdf]LaTeX
\librefranklin@otffalse
\fi\fi
\newif\iflibrefranklin@default \librefranklin@defaultfalse
\newif\iflibrefranklin@semibold \librefranklin@semiboldfalse
\newif\iflibrefranklin@extrabold \librefranklin@extraboldfalse
\newif\iflibrefranklin@black \librefranklin@blackfalse
\newif\iflibrefranklin@medium \librefranklin@mediumfalse
\newif\iflibrefranklin@light \librefranklin@lightfalse
\newif\iflibrefranklin@extralight \librefranklin@extralightfalse
\newif\iflibrefranklin@thin \librefranklin@thinfalse
\newcommand*{\LibreFranklin@scale}{1}
\DeclareOptionX{scaled}{\renewcommand*{\LibreFranklin@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\LibreFranklin@scale}{#1}}
\DeclareOptionX{default}{\librefranklin@defaulttrue}
\DeclareOptionX{sfdefault}{\librefranklin@defaulttrue}
\DeclareOptionX{type1}{\librefranklin@otffalse}
\DeclareOptionX{semibold}{\librefranklin@semiboldtrue}
\DeclareOptionX{extrabold}{\librefranklin@extraboldtrue}
\DeclareOptionX{black}{\librefranklin@blacktrue}
\DeclareOptionX{bold}{\librefranklin@semiboldfalse}
\DeclareOptionX{medium}{\librefranklin@mediumtrue}
\DeclareOptionX{regular}{\librefranklin@mediumfalse}
\DeclareOptionX{light}{\librefranklin@lightfalse}
\DeclareOptionX{extralight}{\librefranklin@extralightfalse}
\DeclareOptionX{thin}{\librefranklin@thinfalse}
\ExecuteOptionsX{bold,regular}
\ProcessOptionsX\relax
\iflibrefranklin@otf
\def\librefranklin@boldstyle{Bold}
\iflibrefranklin@semibold\def\librefranklin@boldstyle{SemiBold}\fi
\iflibrefranklin@extrabold\def\librefranklin@boldstyle{ExtraBold}\fi
\iflibrefranklin@black\def\librefranklin@boldstyle{Black}\fi
\def\librefranklin@regstyle{Regular}
\iflibrefranklin@medium\def\librefranklin@regstyle{Medium}\fi
\iflibrefranklin@light\def\librefranklin@regstyle{Light}\fi
\iflibrefranklin@extralight\def\librefranklin@regstyle{ExtraLight}\fi
\iflibrefranklin@thin\def\librefranklin@regstyle{Thin}\fi
\else % type1
\def\bfseries@sf{bold}
\iflibrefranklin@semibold\def\bfseries@sf{semibold}\fi
\iflibrefranklin@extrabold\def\bfseries@sf{extrabold}\fi
\iflibrefranklin@black\def\bfseries@sf{black}\fi
\def\mdseries@sf{regular}
\iflibrefranklin@medium\def\mdseries@sf{medium}\fi
\iflibrefranklin@light\def\mdseries@sf{light}\fi
\iflibrefranklin@extralight\def\mdseries@sf{extralight}\fi
\iflibrefranklin@thin\def\mdseries@sf{thin}\fi
\fi
\iflibrefranklin@otf
\RequirePackage{fontspec}
\else
\RequirePackage{fontenc,fontaxes,mweights}
\fi
\iflibrefranklin@otf
\def\librefranklin@regular{Regular}
\ifxetex\XeTeXtracingfonts=1\fi
\defaultfontfeatures{
Ligatures = TeX ,
Scale = \LibreFranklin@scale ,
Extension = .otf }
\setsansfont
[ UprightFont = *-\librefranklin@regstyle ,
ItalicFont = *-\ifx\librefranklin@regstyle\librefranklin@regular Italic\else\librefranklin@regstyle Italic\fi ,
BoldFont = *-\librefranklin@boldstyle ,
BoldItalicFont = *-\librefranklin@boldstyle Italic ]
{LibreFranklin}
% grab current family in case of subsequent change:
\let\librefranklinfamily\sfdefault
\iflibrefranklin@default\renewcommand*\familydefault{\librefranklinfamily}\fi
\providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
\newfontfamily\librefranklin
[ UprightFont = *-\librefranklin@regstyle ,
ItalicFont = *-\ifx\librefranklin@regstyle\librefranklin@regular Italic\else\librefranklin@regstyle Italic\fi ,
BoldFont = *-\librefranklin@boldstyle ,
BoldItalicFont = *-\librefranklin@boldstyle Italic ]
{LibreFranklin}
\else % type1
\fa@naming@exception{figures}{{superior}{tabular}}{Sup}
\def\sufigures{\@nomath\sufigures
\fontfigurestyle{superior}\selectfont}
\DeclareTextFontCommand{\textsu}{\sufigures}
\let\textsuperior\textsu
\def\librefranklinfamily{LibreFranklin-TLF}
\newcommand*\librefranklin{\fontfamily{\librefranklinfamily}\selectfont}
\def\sfdefault{\librefranklinfamily}
\iflibrefranklin@default\edef\familydefault{\sfdefault}\edef\seriesdefault{\mdseries@sf}\fi
\fi
\iflibrefranklin@otf
% turn off defaults in case other fonts are selected:
\defaultfontfeatures{}
\fi
\endinput
|