summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-font-gbn.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-06-15 00:02:42 +0200
committerGitHub <noreply@github.com>2016-06-15 00:02:42 +0200
commit36cc5c9c567e24916f254203fc362bf124e26d02 (patch)
tree56cdd0a401ffbb99e8702f47a7865677b0971a8e /src/fontloader/misc/fontloader-font-gbn.lua
parent17fbf1d1c26047f1e0e80fc6e5f3331f6183a795 (diff)
parentba744a4bce3ed03eefbf2b4746fa24e6d388d9ff (diff)
downloadluaotfload-36cc5c9c567e24916f254203fc362bf124e26d02.tar.gz
Merge pull request #364 from phi-gamma/master
fixes, 3rd edition
Diffstat (limited to 'src/fontloader/misc/fontloader-font-gbn.lua')
-rw-r--r--src/fontloader/misc/fontloader-font-gbn.lua21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/fontloader/misc/fontloader-font-gbn.lua b/src/fontloader/misc/fontloader-font-gbn.lua
index daa072b..1ae817d 100644
--- a/src/fontloader/misc/fontloader-font-gbn.lua
+++ b/src/fontloader/misc/fontloader-font-gbn.lua
@@ -19,7 +19,6 @@ local nodes = nodes
local nuts = nodes.nuts -- context abstraction of direct nodes
local traverse_id = nuts.traverse_id
-local remove_node = nuts.remove
local free_node = nuts.free
local glyph_code = nodes.nodecodes.glyph
@@ -126,17 +125,19 @@ function nodes.handlers.nodepass(head)
local variant = hash[getchar(p)]
if variant then
setchar(p,variant)
- if not redundant then
- redundant = { n }
- else
- redundant[#redundant+1] = n
- end
end
end
end
+ -- per generic user request we always remove selectors
+ if not redundant then
+ redundant = { n }
+ else
+ redundant[#redundant+1] = n
+ end
end
end
end
+ local nofbasefonts = #basefonts
if redundant then
for i=1,#redundant do
local r = redundant[i]
@@ -147,8 +148,8 @@ function nodes.handlers.nodepass(head)
else
setlink(p,n)
end
- if b > 0 then
- for i=1,b do
+ if nofbasefonts > 0 then
+ for i=1,nofbasefonts do
local bi = basefonts[i]
if r == bi[1] then
bi[1] = n
@@ -192,8 +193,8 @@ function nodes.handlers.nodepass(head)
end
end
end
- if basemodepass and #basefonts > 0 then
- for i=1,#basefonts do
+ if basemodepass and nofbasefonts > 0 then
+ for i=1,nofbasefonts do
local range = basefonts[i]
local start = range[1]
local stop = range[2]