summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-25 06:25:30 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-25 06:25:30 -0700
commit8160803d6d06f3133daaf1de55ca386033cfd374 (patch)
treead99613dcb0353bb82dfcf58b5e03547730c4642
parent2c756cd0059c3f2a9fc976fc5a87bac989dcca82 (diff)
parent3a2b6eac9022524baab2d52ce9ba4aef819bd574 (diff)
downloadluaotfload-8160803d6d06f3133daaf1de55ca386033cfd374.tar.gz
Merge pull request #8 from phi-gamma/texlive2011
remove unnecessary table indexing && hotfix for libertine mono
-rw-r--r--otfl-font-nms.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 50febab..1f01693 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
@@ -370,10 +371,8 @@ local function load_font(filename, fontnames, newfontnames, texmf)
if not fullinfo then
return
end
- local index
- if newstatus[basefile].index[1] then
- index = newstatus[basefile].index[1]
- else
+ local index = newstatus[basefile].index[1]
+ if not index then
index = #newmappings+1
end
newmappings[index] = fullinfo