Skip to content

Commit

Permalink
Simplify multiscript
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Dec 19, 2019
1 parent e0545f7 commit 0e74272
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/luaotfload-multiscript.lua
Expand Up @@ -134,15 +134,9 @@ local function load_on_demand(specifications, size)
definers.register(f, fid)
elseif f then
fid = f
f = font.getfont(fid)
end
local v = {
fid = fid,
font = f,
characters = f.characters,
}
t[k] = v
return v
t[k] = fid
return fid
end})
end

Expand Down Expand Up @@ -276,7 +270,7 @@ function domultiscript(head, _, _, _, direction)
last_script = mapped_scr
local mapped_font = last_fonts[mapped_scr]
if mapped_font then
setfont(cur, mapped_font.fid)
setfont(cur, mapped_font)
end
end
end
Expand All @@ -296,10 +290,7 @@ otffeatures.register {
description = "Combine fonts for multiple scripts",
manipulators = {
node = makecombifont,
},
-- HACK: harf should call manipulators too.
initializers = {
plug = function(a, b) return makecombifont(a, nil, b) end,
plug = makecombifont,
},
-- processors = { -- processors would be nice, but they are applied
-- -- too late for our purposes
Expand Down

0 comments on commit 0e74272

Please sign in to comment.