diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-02-14 17:26:41 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-02-14 17:26:41 +0100 |
commit | cf803ad70f7a6ad2e7779875fcc02dd711706fc6 (patch) | |
tree | b0602f037d8e025955d2fe1eebf962cd7e8bd90a /tex/context/base/mkiv/lpdf-aux.lua | |
parent | 79bdc958cec8c084f8c8472e8f600c60969b03fa (diff) | |
download | context-cf803ad70f7a6ad2e7779875fcc02dd711706fc6.tar.gz |
2021-02-14 16:14:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-aux.lua')
-rw-r--r-- | tex/context/base/mkiv/lpdf-aux.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lpdf-aux.lua b/tex/context/base/mkiv/lpdf-aux.lua index 71b018c5f..91636ad04 100644 --- a/tex/context/base/mkiv/lpdf-aux.lua +++ b/tex/context/base/mkiv/lpdf-aux.lua @@ -22,6 +22,7 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak if v < 0x10000 then v = format("%04x",v) else + v = v - 0x10000 v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00) end t[k] = v @@ -71,7 +72,7 @@ local more = 0 local pattern = C(4) / function(s) -- needs checking ! local now = tonumber(s,16) if more > 0 then - now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 -- the 0x10000 smells wrong + now = (more-0xD800)*0x400 + (now-0xDC00) + 0x10000 more = 0 return utfchar(now) elseif now >= 0xD800 and now <= 0xDBFF then |