diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-05-09 07:15:44 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-05-09 07:16:58 +0200 |
commit | 195d57dba1533a03204aa8b7ff26ed2bb28d3405 (patch) | |
tree | bd50f6d0ee01cc4417349eaa82dbfc08b271341b /src/fontloader/misc/fontloader-font-gbn.lua | |
parent | 0ba71246a7445204a457602806f9cc80c0cbe354 (diff) | |
download | luaotfload-195d57dba1533a03204aa8b7ff26ed2bb28d3405.tar.gz |
[fontloader] sync with Context as of 2016-05-09
Fixes #349 and #357.
Also the new AFM code is due, let’s see what else we need to use it.
Diffstat (limited to 'src/fontloader/misc/fontloader-font-gbn.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-font-gbn.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/fontloader/misc/fontloader-font-gbn.lua b/src/fontloader/misc/fontloader-font-gbn.lua index daa072b..a02406b 100644 --- a/src/fontloader/misc/fontloader-font-gbn.lua +++ b/src/fontloader/misc/fontloader-font-gbn.lua @@ -126,17 +126,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 +149,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 +194,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] |