diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
commit | dc98ffdc842271d05903846b460fab90d4d83739 (patch) | |
tree | 49603cd805408ebdde3a7eafc59c40279dc7e9ad /tex/context/base/node-fnt.lua | |
parent | 08128a9710f7a34e16f7487b3bccfe7feadb36f1 (diff) | |
download | context-dc98ffdc842271d05903846b460fab90d4d83739.tar.gz |
2015-03-09 19:29:00
Diffstat (limited to 'tex/context/base/node-fnt.lua')
-rw-r--r-- | tex/context/base/node-fnt.lua | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua index 1dd944403..774a68718 100644 --- a/tex/context/base/node-fnt.lua +++ b/tex/context/base/node-fnt.lua @@ -319,28 +319,44 @@ function handlers.characters(head) -- skip elseif b == 1 then -- only one font + local front = head == start local range = basefonts[1] - local start, stop = range[1], range[2] + local start = range[1] + local stop = range[2] if stop then - ligaturing(start,stop) - kerning(start,stop) + start, stop = ligaturing(start,stop) + start, stop = kerning(start,stop) + elseif start then -- safeguard + start = ligaturing(start) + start = kerning(start) else - ligaturing(start) - kerning(start) + -- something bad happened + end + if front then + -- shouldn't happen + head = start end else -- multiple fonts + local front = head == start for i=1,b do local range = basefonts[i] - local start, stop = range[1], range[2] + local start = range[1] + local stop = range[2] if stop then - ligaturing(start,stop) - kerning(start,stop) + start, stop = ligaturing(start,stop) + start, stop = kerning(start,stop) + elseif start then -- safeguard + start = ligaturing(start) + start = kerning(start) else - ligaturing(start) - kerning(start) + -- something bad happened end end + if front then + -- shouldn't happen + head = start + end end stoptiming(nodes) if trace_characters then |