summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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