summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-27 12:04:05 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-27 12:04:05 +0200
commit8cac5c680e0a74e87bb7bfe369d6c13a294117f9 (patch)
treeb0e506c18156761ce0db02db4443090559a91014
parent402a0e45f1a562459baee83c724689fed17276fd (diff)
downloadluaotfload-8cac5c680e0a74e87bb7bfe369d6c13a294117f9.tar.gz
[letterspacing] skip first node when applying extra kerns
Addresses: https://github.com/lualatex/luaotfload/issues/107
-rw-r--r--luaotfload-letterspace.lua7
1 files changed, 6 insertions, 1 deletions
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