summaryrefslogtreecommitdiff
path: root/src/luaotfload-letterspace.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-05-04 22:06:50 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-05-04 22:06:50 +0200
commit17fbf1d1c26047f1e0e80fc6e5f3331f6183a795 (patch)
tree8c4c0641243ae492381efdb5c67313b30eb5dc7f /src/luaotfload-letterspace.lua
parentc038e2135c2b312e0f882f2e5130736781d64dc0 (diff)
parent0ba71246a7445204a457602806f9cc80c0cbe354 (diff)
downloadluaotfload-17fbf1d1c26047f1e0e80fc6e5f3331f6183a795.tar.gz
Merge pull request #355 from phi-gamma/master
bugfixes, part 2
Diffstat (limited to 'src/luaotfload-letterspace.lua')
-rw-r--r--src/luaotfload-letterspace.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua
index 40b3015..78df1d7 100644
--- a/src/luaotfload-letterspace.lua
+++ b/src/luaotfload-letterspace.lua
@@ -28,9 +28,6 @@ local setfield = nodedirect.setfield
local field_setter = function (name) return function (n, ...) setfield (n, name, ...) end end
local field_getter = function (name) return function (n, ...) getfield (n, name, ...) end end
---- As of December 2014 the faster ``node.direct.*`` interface is
---- preferred.
-
local getfont = nodedirect.getfont
local getid = nodedirect.getid
@@ -351,7 +348,7 @@ kerncharacters = function (head)
end
start = c
setfield(s, "components", nil)
- free_node(s)
+ --free_node(s) --> double free with multipart components
c = getfield (start, "components")
end
end
@@ -416,7 +413,7 @@ kerncharacters = function (head)
else
local kern = 0
local kerns = prevchardata.kerns
- if kerns then kern = kerns[lastchar] end
+ if kerns then kern = kerns[lastchar] or kern end
krn = kern + quaddata[lastfont]*krn -- here
insert_node_before(head,start,kern_injector(fillup,krn))
end
@@ -491,7 +488,7 @@ kerncharacters = function (head)
--- font doesn’t contain the glyph
else
local kerns = prevchardata.kerns
- if kerns then kern = kerns[lastchar] end
+ if kerns then kern = kerns[lastchar] or kern end
end
end
krn = kern + quaddata[lastfont]*krn -- here