summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-20 11:32:48 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-20 11:32:48 -0700
commite7b6210272a3287205d0692c995d35d5b783c189 (patch)
treecc7c7efe7d19eaeaa0c694ad29fd7aa443bec43b
parent24caa705787b2b8259d47392483c188759b41226 (diff)
parent1a66cdf2619cbbb8cd43b40200e265d52a321a85 (diff)
downloadluaotfload-e7b6210272a3287205d0692c995d35d5b783c189.tar.gz
Merge pull request #85 from phi-gamma/master
fix pfa loading (missing upvalue); fix letterspacing of user kerns
-rw-r--r--luaotfload-extralibs.lua6
-rw-r--r--luaotfload-letterspace.lua5
-rw-r--r--luaotfload-loaders.lua3
3 files changed, 10 insertions, 4 deletions
diff --git a/luaotfload-extralibs.lua b/luaotfload-extralibs.lua
index ddf3694..84819f4 100644
--- a/luaotfload-extralibs.lua
+++ b/luaotfload-extralibs.lua
@@ -51,12 +51,16 @@ local kernfont = typesetters.kernfont
nodes = nodes or { } --- should be present with luaotfload
local bothways = function (t) return table.swapped (t, t) end
-nodes.kerncodes = bothways({
+local kerncodes = bothways({
[0] = "fontkern",
[1] = "userkern",
[2] = "accentkern",
})
+kerncodes.kerning = kerncodes.fontkern --- idiosyncrasy
+
+nodes.kerncodes = kerncodes
+
nodes.skipcodes = bothways({
[ 0] = "userskip",
[ 1] = "lineskip",
diff --git a/luaotfload-letterspace.lua b/luaotfload-letterspace.lua
index 8566c06..8711646 100644
--- a/luaotfload-letterspace.lua
+++ b/luaotfload-letterspace.lua
@@ -90,7 +90,6 @@ kerncharacters = function (head)
local kernfactors = kernfactors
while start do
- local attr = start[attribute]
local id = start.id
if id == glyph_code then
@@ -163,7 +162,9 @@ kerncharacters = function (head)
-- nothing
elseif pid == kern_code then
- if prev.subtype == kerning_code or prev[a_fontkern] then
+ if prev.subtype == kerning_code --- context does this by means of an
+ or prev.subtype == userkern_code --- attribute; we may need a test
+ then
if keeptogether and prev.prev.id == glyph_code and keeptogether(prev.prev,start) then
-- keep
else
diff --git a/luaotfload-loaders.lua b/luaotfload-loaders.lua
index c9c30de..b4ce0b2 100644
--- a/luaotfload-loaders.lua
+++ b/luaotfload-loaders.lua
@@ -6,7 +6,8 @@ if not modules then modules = { } end modules ["loaders"] = {
license = "see context related readme files"
}
-local fonts = fonts
+local fonts = fonts
+local readers = fonts.readers
---
--- opentype reader (from font-otf.lua):