summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-fonts-otn.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-03-11 07:46:44 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-03-11 07:46:44 +0100
commitf070e8b5b193c0ce686d2e6448b53338a499aecf (patch)
tree637122d22c56e6ad3a0b3a1a47ae2a2b9c46126b /src/fontloader/misc/fontloader-fonts-otn.lua
parent380989f0de1f2aa9a8d0a0856de1b1e09321d1e5 (diff)
downloadluaotfload-f070e8b5b193c0ce686d2e6448b53338a499aecf.tar.gz
[fontloader] sync with Context as of 2015-03-11
Diffstat (limited to 'src/fontloader/misc/fontloader-fonts-otn.lua')
-rw-r--r--src/fontloader/misc/fontloader-fonts-otn.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fontloader/misc/fontloader-fonts-otn.lua b/src/fontloader/misc/fontloader-fonts-otn.lua
index 32dc820..3f53078 100644
--- a/src/fontloader/misc/fontloader-fonts-otn.lua
+++ b/src/fontloader/misc/fontloader-fonts-otn.lua
@@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['font-otn'] = {
license = "see context related readme files",
}
+-- todo: looks like we have a leak somewhere (probably in ligatures)
+-- todo: copy attributes to disc
+
-- this is a context version which can contain experimental code, but when we
-- have serious patches we also need to change the other two font-otn files
@@ -243,6 +246,7 @@ local setcursive = injections.setcursive
local setkern = injections.setkern
local setpair = injections.setpair
local resetinjection = injections.reset
+local copyinjection = injections.copy
local setligaindex = injections.setligaindex
local getligaindex = injections.getligaindex
@@ -354,13 +358,19 @@ local function copy_glyph(g) -- next and prev are untouched !
if components then
setfield(g,"components",nil)
local n = copy_node(g)
+ copyinjection(n,g) -- we need to preserve the lig indices
setfield(g,"components",components)
return n
else
- return copy_node(g)
+ local n = copy_node(g)
+ copyinjection(n,g) -- we need to preserve the lig indices
+ return n
end
end
+--
+
+
-- start is a mark and we need to keep that one
local function markstoligature(kind,lookupname,head,start,stop,char)