From 265ba2a85e0945a37972e22f23bcaac16d6c08a1 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 5 Dec 2022 23:11:09 +0100 Subject: 2022-12-05 18:51:00 --- tex/context/base/mkiv/font-prv.lua | 16 ++++++++++++++++ 1 file changed, 16 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 e613eb7d3..59b793444 100644 --- a/tex/context/base/mkiv/font-prv.lua +++ b/tex/context/base/mkiv/font-prv.lua @@ -83,6 +83,22 @@ function helpers.newprivateslot(name) return sharedprivates[name] end +function helpers.isprivate(unicode) + if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then + return false + elseif unicode >= 0x00E000 and unicode <= 0x00F8FF then + return true + elseif unicode >= 0x0F0000 and unicode <= 0x0FFFFF then + return true + elseif unicode >= 0x100000 and unicode <= 0x10FFFF then + return true + elseif unicode >= 0x00D800 and unicode <= 0x00DFFF then + return true + else + return false + end +end + do local context = context -- cgit v1.2.3