font-ini.lua /size: 1794 b    last modification: 2020-07-01 14:35
1if 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--[[ldx--
10<p>Not much is happening here.</p>
11--ldx]]--
12
13local allocate    = utilities.storage.allocate
14local sortedhash  = table.sortedhash
15
16fonts             = fonts or { }
17local fonts       = fonts
18
19local identifiers = allocate()
20
21fonts.hashes      = fonts.hashes     or { identifiers = identifiers }
22fonts.tables      = fonts.tables     or { }
23fonts.helpers     = fonts.helpers    or { }
24fonts.tracers     = fonts.tracers    or { } -- for the moment till we have move to moduledata
25fonts.specifiers  = fonts.specifiers or { } -- in format !
26
27fonts.analyzers   = { } -- not needed here
28fonts.readers     = { }
29fonts.definers    = { methods = { } }
30fonts.loggers     = { register = function() end }
31
32if context then
33
34    font.originaleach = font.each
35
36    function font.each()
37        return sortedhash(identifiers)
38    end
39
40    fontloader = nil
41
42end
43
44-- Outside context one can bump textbase to some higher value but only the
45-- textbase given here is officially supported (read: bug testing etc will
46-- use the values below).
47
48fonts.privateoffsets = {
49    textbase      = 0xF0000, -- used for hidden (opentype features)
50    textextrabase = 0xFD000, -- used for visible by name
51    mathextrabase = 0xFE000, -- used for visible by code
52    mathbase      = 0xFF000, -- used for hidden (virtual math)
53    keepnames     = false,   -- when set to true names are always kept (not for context)
54}
55
56if node and not tex.getfontoffamily then
57    tex.getfontoffamily = node.family_font -- we moved this
58end
59