diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-01-21 18:48:54 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-01-21 18:48:54 +0100 |
commit | aea52f4b97d1be9ba194cd9a1d0ff1865c413691 (patch) | |
tree | 6b6fe6b48a7b8f161442e391ab03c34f2b4222b4 /tex/context/base/mkiv/font-prv.lua | |
parent | e7016154c1f84ab4f9420c19d14af6a28f53bac8 (diff) | |
download | context-aea52f4b97d1be9ba194cd9a1d0ff1865c413691.tar.gz |
2021-01-21 18:04:00
Diffstat (limited to 'tex/context/base/mkiv/font-prv.lua')
-rw-r--r-- | tex/context/base/mkiv/font-prv.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/font-prv.lua b/tex/context/base/mkiv/font-prv.lua index c3323ca74..15057e255 100644 --- a/tex/context/base/mkiv/font-prv.lua +++ b/tex/context/base/mkiv/font-prv.lua @@ -80,3 +80,36 @@ end function helpers.newprivateslot(name) return sharedprivates[name] end + +do + + local context = context + local utfchar = utf.char + + interfaces.implement { + name = "privatecharacter", + public = true, + -- protected = true, + arguments = "string", + actions = function(name) + local c = sharedprivates[name] + if c then + context(utfchar(c)) + end + end + } + + interfaces.implement { + name = "privatecharactercode", + public = true, + -- protected = true, + arguments = "string", + actions = function(name) + local c = sharedprivates[name] + if c then + context(c) -- serialized, not a number + end + end + } + +end |