From aea52f4b97d1be9ba194cd9a1d0ff1865c413691 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 21 Jan 2021 18:48:54 +0100 Subject: 2021-01-21 18:04:00 --- tex/context/base/mkiv/font-prv.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'tex/context/base/mkiv/font-prv.lua') 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 -- cgit v1.2.3