font-ini.lua /size: 1794 b    last modification: 2020-07-01 14:35
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
--[[ldx-- 10<p>Not much is happening here.</p> 11--ldx]]
--
12 13
local
allocate
=
utilities
.
storage
.
allocate
14
local
sortedhash
=
table
.
sortedhash
15 16
fonts
=
fonts
or
{
}
17
local
fonts
=
fonts
18 19
local
identifiers
=
allocate
(
)
20 21
fonts
.
hashes
=
fonts
.
hashes
or
{
identifiers
=
identifiers
}
22
fonts
.
tables
=
fonts
.
tables
or
{
}
23
fonts
.
helpers
=
fonts
.
helpers
or
{
}
24
fonts
.
tracers
=
fonts
.
tracers
or
{
}
-- for the moment till we have move to moduledata
25
fonts
.
specifiers
=
fonts
.
specifiers
or
{
}
-- in format !
26 27
fonts
.
analyzers
=
{
}
-- not needed here
28
fonts
.
readers
=
{
}
29
fonts
.
definers
=
{
methods
=
{
}
}
30
fonts
.
loggers
=
{
register
=
function
(
)
end
}
31 32
if
context
then
33 34
font
.
originaleach
=
font
.
each
35 36
function
font
.
each
(
)
37
return
sortedhash
(
identifiers
)
38
end
39 40
fontloader
=
nil
41 42
end
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 48
fonts
.
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 56
if
node
and
not
tex
.
getfontoffamily
then
57
tex
.
getfontoffamily
=
node
.
family_font
-- we moved this
58
end
59