Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

Commit

Permalink
[fontloader] informal patch by Hans
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-gamma committed Feb 6, 2017
1 parent 9b70f2e commit 9464944
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/fontloader/misc/fontloader-font-gbn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ local getdisc = nuts.getdisc
local setchar = nuts.setchar
local setlink = nuts.setlink
local setprev = nuts.setprev
local nodetail = nuts.tail

-- from now on we apply ligaturing and kerning here because it might interfere with complex
-- opentype discretionary handling where the base ligature pass expect some weird extra
Expand Down Expand Up @@ -200,21 +201,15 @@ function nodes.handlers.nodepass(head)
local stop = range[2]
if start then
local front = nuthead == start
local prev, next
if not stop then
stop = nodetail(start)
end
if stop then
next = getnext(stop)
start, stop = ligaturing(start,stop)
start, stop = kerning(start,stop)
else
prev = getprev(start)
start = ligaturing(start)
start = kerning(start)
end
if prev then
setlink(prev,start)
end
if next then
setlink(stop,next)
elseif start then -- safeguard
start, stop = ligaturing(start,stop)
start, stop = kerning(start,stop)
end
if front and nuthead ~= start then
head = tonode(start)
Expand Down

0 comments on commit 9464944

Please sign in to comment.