summaryrefslogtreecommitdiff
path: root/tex/context/base/font-lib.mkvi
blob: 46de6ee4419aab76fce7d322ac701b3367eecfe5 (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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
%D \module
%D   [       file=font-lib,
%D        version=2011.01.13, % (copied fron font-ini)
%D          title=\CONTEXT\ Font Macros,
%D       subtitle=Libraries,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Font Macros / Libraries}

\unprotect

\registerctxluafile{font-ini}{1.001}
\registerctxluafile{font-log}{1.001}
\registerctxluafile{font-con}{1.001}
\registerctxluafile{font-enc}{1.001}
\registerctxluafile{font-agl}{1.001} % if needed we can comment this and delay loading
\registerctxluafile{font-cid}{1.001} % cid maps
\registerctxluafile{font-map}{1.001}

% the otf font loader:

\registerctxluafile{font-otr}{1.001} % opentype fontloader
\registerctxluafile{font-cff}{1.001} % quadratic outlines
\registerctxluafile{font-ttf}{1.001} % cubic outlines
%registerctxluafile{font-tmp}{1.001} % temporary placeholder
\registerctxluafile{font-dsp}{1.001} % ... for this one
\registerctxluafile{font-off}{1.001} % the old loader

\registerctxluafile{font-syn}{1.001}

\registerctxluafile{font-tfm}{1.001}

\registerctxluafile{font-afm}{1.001}
\registerctxluafile{font-afk}{1.001}

\registerctxluafile{font-hsh}{1.001} % hashes used by context
\registerctxluafile{font-nod}{1.001}

\registerctxluafile{font-trt}{1.001}

\registerctxluafile{font-oti}{1.001} % otf initialization
\registerctxluafile{font-ott}{1.001} % otf tables (first)

\iffalse % use new loader
% \iftrue  % use old loader

    \registerctxluafile{font-otf}{1.001} % otf main
    \registerctxluafile{font-otb}{1.001} % otf main base
    \registerctxluafile{font-inj}{1.001} % otf kern injector
    \registerctxluafile{font-ota}{1.001} % otf analyzers
    \registerctxluafile{font-otn}{1.001} % otf main node
    \registerctxluafile{font-otd}{1.001} % otf dynamics (does an overload)
    \registerctxluafile{font-otp}{1.001} % otf pack
    \registerctxluafile{font-otc}{1.001} % otf context
    \registerctxluafile{font-oth}{1.001} % otf helpers
    \registerctxluafile{font-odv}{1.001} % otf devanagari (experimental)

\else

    \registerctxluafile{font-otl}{1.001} % otf replacement
    \registerctxluafile{font-oto}{1.001} % otb replacement
\doifelsefile{font-otj-new.lua} {
    \registerctxluafile{font-otj-new}{1.001} % inj replacement
} {
    \registerctxluafile{font-otj}{1.001} % inj replacement
}
    \registerctxluafile{font-oup}{1.001} % otp replacement
    \registerctxluafile{font-ota}{1.001}
\doifelsefile{font-ots-new.lua} {
    \registerctxluafile{font-ots-new}{1.001} % otn replacement
} {
    \registerctxluafile{font-ots}{1.001} % otn replacement
}
    \registerctxluafile{font-otd}{1.001}
    \registerctxluafile{font-otc}{1.001}
    \registerctxluafile{font-oth}{1.001}
    \registerctxluafile{font-osd}{1.001} % odv replacement

\fi

\registerctxluafile{font-pat}{1.001} % patchers

\registerctxluafile{node-fnt}{1.001} % here

\registerctxluafile{font-mps}{1.001} % outline fun

\registerctxluafile{font-lua}{1.001}

\registerctxluafile{font-vf} {1.001}
\registerctxluafile{font-enh}{1.001}

\registerctxluafile{font-gds}{1.001}

\registerctxluafile{font-def}{1.001}
\registerctxluafile{font-ctx}{1.001} % after def as it overloads

\registerctxluafile{font-ext}{1.001}
\registerctxluafile{font-fbk}{1.001}

\registerctxluafile{font-aux}{1.001}

%D Some low level helpers
%D
%D \starttyping
%D \def\TestLookup#specification%
%D   {\dolookupfontbyspec{#specification}
%D     pattern: #specification, found: \dolookupnoffound
%D    \blank
%D    \dorecurse {\dolookupnoffound} {%
%D      \recurselevel:~\dolookupgetkeyofindex{fontname}{\recurselevel}\quad
%D    }%
%D    \blank}
%D
%D \TestLookup{familyname=helveticaneue}
%D \TestLookup{familyname=helveticaneue,weight=bold}
%D \TestLookup{familyname=helveticaneue,weight=bold,style=italic}
%D \stoptyping

% we can also move the lookups to the fonts.namespace (of commands)
% one can also directly use the clf calls when speed is needed

           \def\dolookupfontbyspec     #1{\clf_fontlookupinitialize{#1}}
           \def\dolookupnoffound         {\clf_fontlookupnoffound}
           \def\dolookupgetkeyofindex#1#2{\clf_fontlookupgetkeyofindex{#1}\numexpr#2\relax}
           \def\dolookupgetkey         #1{\clf_fontlookupgetkey{#1}}
           \def\cleanfontname          #1{\clf_cleanfontname{#1}}
\unexpanded\def\setfontofid            #1{\clf_setfontofid\numexpr#1\relax}


\protect \endinput