summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-04-25 14:41:10 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-04-25 14:41:10 +0200
commitb733e149bb606d57499115e90318b00c6fe19bc3 (patch)
tree1e1d82f6dd05e457f6ba5bf1a429bcb6fd441943
parent2c756cd0059c3f2a9fc976fc5a87bac989dcca82 (diff)
downloadluaotfload-b733e149bb606d57499115e90318b00c6fe19bc3.tar.gz
remove unnecessary table indexing
-rw-r--r--otfl-font-nms.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 50febab..b5c954d 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -154,6 +154,9 @@ function names.resolve(specification)
elseif subfamily == "regular" or
table.contains(synonyms.regular, subfamily) then
found.fallback = face
+ elseif name = fullname then
+ found[1] = face
+ break
end
else
if name == fullname
@@ -357,9 +360,7 @@ local function load_font(filename, fontnames, newfontnames, texmf)
return
end
local index = newstatus[basefile].index[i]
- if newstatus[basefile].index[i] then
- index = newstatus[basefile].index[i]
- else
+ if not index then
index = #newmappings+1
end
newmappings[index] = fullinfo