summaryrefslogtreecommitdiff
path: root/tex/context/base/font-otn.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-11-25 20:09:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-11-25 20:09:00 +0100
commit5e8bf69c911f752a3b2f691549e378915c53a360 (patch)
tree1573c92336dc9c85ff1372d5f8742dc407c553de /tex/context/base/font-otn.lua
parent277b7556b6fe2fea89be61774a36b56e8f9a6e84 (diff)
downloadcontext-5e8bf69c911f752a3b2f691549e378915c53a360.tar.gz
beta 2013.11.25 20:09
Diffstat (limited to 'tex/context/base/font-otn.lua')
-rw-r--r--tex/context/base/font-otn.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index 3733d51c2..d9e4b9b64 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -624,9 +624,9 @@ function handlers.gsub_ligature(head,start,kind,lookupname,ligature,sequence)
break
end
end
- if stop then
- local lig = ligature.ligature
- if lig then
+ local lig = ligature.ligature
+ if lig then
+ if stop then
if trace_ligatures then
local stopchar = stop.char
head, start = toligature(kind,lookupname,head,start,stop,lig,skipmark,discfound)
@@ -636,8 +636,15 @@ function handlers.gsub_ligature(head,start,kind,lookupname,ligature,sequence)
end
return head, start, true
else
- -- ok, goto next lookup
+ -- weird but happens (in some arabic font)
+ start.char = lig
+ if trace_ligatures then
+ logprocess("%s: replacing %s by (no real) ligature %s case 3",pref(kind,lookupname),gref(startchar),gref(lig))
+ end
+ return head, start, true
end
+ else
+ -- weird but happens
end
end
return head, start, false