From 8cac5c680e0a74e87bb7bfe369d6c13a294117f9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 27 Aug 2013 12:04:05 +0200 Subject: [letterspacing] skip first node when applying extra kerns Addresses: https://github.com/lualatex/luaotfload/issues/107 --- luaotfload-letterspace.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/luaotfload-letterspace.lua b/luaotfload-letterspace.lua index 880c7bd..be51711 100644 --- a/luaotfload-letterspace.lua +++ b/luaotfload-letterspace.lua @@ -1,5 +1,5 @@ if not modules then modules = { } end modules ['letterspace'] = { - version = "2.3a", + version = "2.4", comment = "companion to luaotfload.lua", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL; adapted by Philipp Gesang", copyright = "PRAGMA ADE / ConTeXt Development Team", @@ -89,6 +89,8 @@ kerncharacters = function (head) local identifiers = fonthashes.identifiers local kernfactors = kernfactors + local firstkern = true + while start do local id = start.id if id == glyph_code then @@ -113,6 +115,9 @@ kerncharacters = function (head) end if not krn or krn == 0 then goto nextnode + elseif firstkern then + firstkern = false + goto nextnode end end -- cgit v1.2.3