summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-fonts-otn.lua
diff options
context:
space:
mode:
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)