summaryrefslogtreecommitdiff
path: root/src/luaotfload-letterspace.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-12-08 00:00:23 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2014-12-08 00:00:23 +0100
commitea148be27d5a79fd11759856e0ab4033f328ce5a (patch)
tree0f71c913b435e4b6a4fde3d1029d33ef08fe8f60 /src/luaotfload-letterspace.lua
parent1fcdcfc9c7b1f84f8da1b2ea287b29a7989670a2 (diff)
parenta33dddf428bd44af867d1ee78b13fcf73d725ca5 (diff)
downloadluaotfload-ea148be27d5a79fd11759856e0ab4033f328ce5a.tar.gz
Merge pull request #259 from phi-gamma/master
various fixes
Diffstat (limited to 'src/luaotfload-letterspace.lua')
-rw-r--r--src/luaotfload-letterspace.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua
index 20f29f5..f1fb234 100644
--- a/src/luaotfload-letterspace.lua
+++ b/src/luaotfload-letterspace.lua
@@ -321,7 +321,7 @@ kerncharacters = function (head)
if keeptogether and keeptogether(prev,start) then
-- keep 'm
elseif identifiers[lastfont] then
- local kerns = chardata[lastfont][prevchar].kerns
+ local kerns = chardata[lastfont] and chardata[lastfont][prevchar].kerns
local kern = kerns and kerns[lastchar] or 0
krn = kern + quaddata[lastfont]*krn -- here
insert_node_before(head,start,kern_injector(fillup,krn))
@@ -385,7 +385,7 @@ kerncharacters = function (head)
elseif identifiers[lastfont] then
if prv and prv.id == glyph_code and prv.font == lastfont then
local prevchar, lastchar = prv.char, start.char
- local kerns = chardata[lastfont][prevchar].kerns
+ local kerns = chardata[lastfont] and chardata[lastfont][prevchar].kerns
local kern = kerns and kerns[lastchar] or 0
krn = kern + quaddata[lastfont]*krn -- here
else