summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua37
1 files changed, 16 insertions, 21 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index a5cdbb1..e653d13 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -160,23 +160,22 @@ function names.resolve(specification)
found[1] = face
break
end
- else
- if name == fullname
- or name == pfullname
- or name == fontname
- or name == psname then
- if optsize then
- if dsnsize == size
- or (size > minsize and size <= maxsize) then
- found[1] = face
- break
- else
- found[#found+1] = face
- end
- else
+ end
+ if name == fullname
+ or name == pfullname
+ or name == fontname
+ or name == psname then
+ if optsize then
+ if dsnsize == size
+ or (size > minsize and size <= maxsize) then
found[1] = face
break
+ else
+ found[#found+1] = face
end
+ else
+ found[1] = face
+ break
end
end
end
@@ -362,9 +361,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
@@ -375,10 +372,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