summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-font-gbn.lua
diff options
context:
space:
mode:
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]