summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-afm.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/font-afm.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua b/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
index 3dedf12e1da..99b85774781 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/font-afm.lua
@@ -30,7 +30,7 @@ local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, cont
local next, type, tonumber = next, type, tonumber
local match, gmatch, lower, gsub, strip, find = string.match, string.gmatch, string.lower, string.gsub, string.strip, string.find
local char, byte, sub = string.char, string.byte, string.sub
-local abs, mod = math.abs, math.mod
+local abs = math.abs
local bxor, rshift = bit32.bxor, bit32.rshift
local P, S, R, Cmt, C, Ct, Cs, lpegmatch, patterns = lpeg.P, lpeg.S, lpeg.R, lpeg.Cmt, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.match, lpeg.patterns
local derivetable = table.derive
@@ -56,7 +56,7 @@ local pfb = constructors.newhandler("pfb")
local afmfeatures = constructors.newfeatures("afm")
local registerafmfeature = afmfeatures.register
-afm.version = 1.500 -- incrementing this number one up will force a re-cache
+afm.version = 1.501 -- incrementing this number one up will force a re-cache
afm.cache = containers.define("fonts", "afm", afm.version, true)
afm.autoprefixed = true -- this will become false some day (catches texnansi-blabla.*)
@@ -317,7 +317,7 @@ do
local function step(c)
local cipher = byte(c)
local plain = bxor(cipher,rshift(r,8))
- r = mod((cipher + r) * c1 + c2,65536)
+ r = ((cipher + r) * c1 + c2) % 65536
return char(plain)
end
@@ -547,9 +547,10 @@ local uparser = fonts.mappings.makenameparser()
unify = function(data, filename)
local unicodevector = fonts.encodings.agl.unicodes -- loaded runtime in context
- local unicodes, names = { }, { }
- local private = constructors.privateoffset
- local descriptions = data.descriptions
+ local unicodes = { }
+ local names = { }
+ local private = constructors.privateoffset
+ local descriptions = data.descriptions
for name, blob in next, data.characters do
local code = unicodevector[name] -- or characters.name_to_unicode[name]
if not code then