Skip to content

Commit

Permalink
Case-insensitive script matching in multiscript
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Jan 26, 2020
1 parent 2ed93f0 commit efc2ad0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/luaotfload-multiscript.lua
Expand Up @@ -195,7 +195,15 @@ local function makecombifont(tfmdata, _, additional_scripts)
if additional_scripts then
local t = additional_scripts_tables[tonumber(additional_scripts) or additional_scripts]
if not t then error(string.format("Unknown multiscript table %s", additional_scripts)) end
additional_scripts = table.merged(t)
local lower_t = {}
for k, v in next, t do if type(k) == "string" then
local l = string.lower(k)
if lower_t[l] ~= nil and lower_t[l] ~= v then
error(string.format("Inconsistant multiscript table %q for script %s", additional_scripts, l))
end
lower_t[l] = v
end end
additional_scripts = lower_t
else
additional_scripts = {}
end
Expand Down

0 comments on commit efc2ad0

Please sign in to comment.