diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-10-29 07:14:40 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-10-29 07:14:40 +0100 |
commit | 4f053696e1813fde4bd6cebbb77ff2a1e1f6800b (patch) | |
tree | 308ec3223eec7744136e95c40284602ba35efacc /src/fontloader/misc/fontloader-fonts-cbk.lua | |
parent | d7a36a33d8d57a5aec9232364cf0bd307523281c (diff) | |
download | luaotfload-4f053696e1813fde4bd6cebbb77ff2a1e1f6800b.tar.gz |
[fontloader] sync with Context as of 2015-10-29
Diffstat (limited to 'src/fontloader/misc/fontloader-fonts-cbk.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-fonts-cbk.lua | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/fontloader/misc/fontloader-fonts-cbk.lua b/src/fontloader/misc/fontloader-fonts-cbk.lua index 81b5b6e..9da8151 100644 --- a/src/fontloader/misc/fontloader-fonts-cbk.lua +++ b/src/fontloader/misc/fontloader-fonts-cbk.lua @@ -160,12 +160,31 @@ function nodes.handlers.nodepass(head) local range = basefonts[i] local start = range[1] local stop = range[2] - if stop then - start, stop = ligaturing(start,stop) - start, stop = kerning(start,stop) - elseif start then - start = ligaturing(start) - start = kerning(start) + -- maybe even: if start and start ~= stop then + if start or stop then + local prev = nil + local next = nil + local front = start == head + if stop then + next = stop.next + start, stop = ligaturing(start,stop) + start, stop = kerning(start,stop) + elseif start then + prev = start.prev + start = ligaturing(start) + start = kerning(start) + end + if prev then + start.prev = prev + prev.next = start + end + if next then + stop.next = next + next.prev = stop + end + if front then + head = start + end end end end @@ -176,7 +195,7 @@ function nodes.handlers.nodepass(head) end function nodes.handlers.basepass(head) - if not basepass then + if basepass then head = ligaturing(head) head = kerning(head) end |