Debian Codegraph @

texmf-dist/tex/luatex/luaotfload/fontloader-font-ini.lua

raw
1 if not modules then modules = { } end modules ['font-ini'] = {
2 version = 1.001,
3 comment = "companion to font-ini.mkiv",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files"
7 }
8
9 -- Not much is happening here.
10
11 local allocate = utilities.storage.allocate
12 local sortedhash = table.sortedhash
13
14 fonts = fonts or { }
15 local fonts = fonts
16
17 local identifiers = allocate()
18
19 fonts.hashes = fonts.hashes or { identifiers = identifiers }
20 fonts.tables = fonts.tables or { }
21 fonts.helpers = fonts.helpers or { }
22 fonts.tracers = fonts.tracers or { } -- for the moment till we have move to moduledata
23 fonts.specifiers = fonts.specifiers or { } -- in format !
24
25 fonts.analyzers = { } -- not needed here
26 fonts.readers = { }
27 fonts.definers = { methods = { } }
28 fonts.loggers = { register = function() end }
29
30 if context then
31
32 font.originaleach = font.each
33
34 function font.each()
35 return sortedhash(identifiers)
36 end
37
38 fontloader = nil
39
40 end
41
42 -- Outside context one can bump textbase to some higher value but only the
43 -- textbase given here is officially supported (read: bug testing etc will
44 -- use the values below).
45
46 fonts.privateoffsets = {
47 textbase = 0xF0000, -- used for hidden (opentype features)
48 textextrabase = 0xFD000, -- used for visible by name
49 mathextrabase = 0xFE000, -- used for visible by code
50 mathbase = 0xFF000, -- used for hidden (virtual math)
51 keepnames = false, -- when set to true names are always kept (not for context)
52 }
53
54 if node and not tex.getfontoffamily then
55 tex.getfontoffamily = node.family_font -- we moved this
56 end