diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-06 20:26:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-06 20:26:50 +0200 |
commit | d78828b55508aae49922032ebd9117804a940f73 (patch) | |
tree | 431d8c001f14d8001ba11c6e2803ef83ba65c9fe /tex/context/base/mkiv/font-ctx.lua | |
parent | 7a761c8aebf67ee022aa4857247518ad6997d5c1 (diff) | |
download | context-d78828b55508aae49922032ebd9117804a940f73.tar.gz |
2016-06-06 19:57:00
Diffstat (limited to 'tex/context/base/mkiv/font-ctx.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ctx.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua index 82c70164c..8c09ccc25 100644 --- a/tex/context/base/mkiv/font-ctx.lua +++ b/tex/context/base/mkiv/font-ctx.lua @@ -2474,3 +2474,27 @@ implement { actions = { names.exists, commands.doifelse }, arguments = "string" } + +-- we use 0xFE000+ and 0xFF000+ in math and for runtime (text) extensions we +-- use 0xFD000+ + +constructors.privateslots = constructors.privateslots or { } + +storage.register("fonts/constructors/privateslots", constructors.privateslots, "fonts.constructors.privateslots") + +local privateslots = constructors.privateslots +local lastprivateslot = 0xFD000 + +constructors.privateslots = setmetatableindex(privateslots,function(t,k) + local v = lastprivateslot + lastprivateslot = lastprivateslot + 1 + t[k] = v + return v +end) + +implement { + name = "getprivateglyphslot", + actions = function(name) context(privateslots[name]) end, + arguments = "string", +} + |