diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-03-24 14:11:49 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-03-24 14:12:32 +0200 |
commit | b0f6c7a5e580aeb4ccc52e593e8e2a2f87bf66dd (patch) | |
tree | 5a747c05eae4116ccdc4aeca4dedbad8f6958095 | |
parent | 0c40bdec8b2c2fb0248dec4b85b2b29ec1140686 (diff) | |
download | luaotfload-b0f6c7a5e580aeb4ccc52e593e8e2a2f87bf66dd.tar.gz |
Make font names case insensitive
-rw-r--r-- | otfl-font-nms.lua | 4 | ||||
-rw-r--r-- | tests/caseinsensitive.tex | 6 |
2 files changed, 9 insertions, 1 deletions
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 |