From b0f6c7a5e580aeb4ccc52e593e8e2a2f87bf66dd Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 24 Mar 2010 14:11:49 +0200 Subject: Make font names case insensitive --- otfl-font-nms.lua | 4 +++- tests/caseinsensitive.tex | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/caseinsensitive.tex diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 50e8b96..f60664c 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -59,7 +59,7 @@ function names.resolve(specification) local data = names.data if type(data) == "table" and data.version == names.version then if data.mappings then - local family = data.families[name] + local family = data.families[sanitize(name)] if family and type(family) == "table" then for _,v in ipairs(family) do local face = data.mappings[v] @@ -187,6 +187,8 @@ function fontloader.fullinfo(...) m.design_range_top ~= 0 and m.design_range_top or nil, m.design_range_bottom ~= 0 and m.design_range_bottom or nil, } + + t.names.family = sanitize(t.names.family) return t end diff --git a/tests/caseinsensitive.tex b/tests/caseinsensitive.tex new file mode 100644 index 0000000..0e9fb5f --- /dev/null +++ b/tests/caseinsensitive.tex @@ -0,0 +1,6 @@ +\input luaotfload.sty + +\font\termesr ={tex gyre termes:+liga} at 10pt + +\termesr fi fl ffi ffl ff\par +\bye -- cgit v1.2.3