diff options
author | Marius <mariausol@gmail.com> | 2013-11-25 21:20:13 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-11-25 21:20:13 +0200 |
commit | 3a4769dbc4ecb788c53d91e1eca7affb73abc01d (patch) | |
tree | 401f55a9fd2f2712beaca44e4932225a43c088a5 /tex/context/base/font-otn.lua | |
parent | cde16bedc683a2749f548e9a36d2b88bd3d4aa50 (diff) | |
download | context-3a4769dbc4ecb788c53d91e1eca7affb73abc01d.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.lua | 15 |
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 |