summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-05-16 21:16:57 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-05-16 21:22:14 +0300
commitf63d8db3576d9251e42297c61d98d4715c55b428 (patch)
tree3cb406da89fa0cfe2e586669de0881a24e2a10fd
parent2bdb451a7f9682bb6911e8d8175f0f0e3ef0e750 (diff)
downloadluaotfload-f63d8db3576d9251e42297c61d98d4715c55b428.tar.gz
Revert "Fixing a bug if OSFONTDIR is not empty"
This reverts commit f5fcb4e933f142a7b803b42f7870b5de0ce1117c.
-rw-r--r--otfl-font-nms.lua19
1 files changed, 1 insertions, 18 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 036629f..20e5fbd 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -432,30 +432,14 @@ local function scan_texmf_tree(fontnames, newfontnames)
logs.report("scanning TEXMF and OS fonts:")
end
end
- local explored_dirs = {}
- local osdirs = expandpath("$OSFONTDIR")
- -- OPENTYPEFONTS and TTFONTS contain OSFONTDIR
local fontdirs = expandpath("$OPENTYPEFONTS")
fontdirs = fontdirs .. gsub(expandpath("$TTFONTS"), "^\.", "")
if not fontdirs:is_empty() then
+ local explored_dirs = {}
fontdirs = splitpath(fontdirs)
-- hack, don't scan current dir
table.remove(fontdirs, 1)
count = 0
- if osdirs and osdirs ~= '' then
- osdirs = splitpath(osdirs)
- -- we first scan the os dirs and have texmf=0 for scan_dir, and then
- -- we scan the true texmf dirs, with texmf=1. With explored_dirs, we
- -- won't explore a directory two times.
- for _,d in ipairs(osdirs) do
- if not explored_dirs[d] then
- count = count + 1
- progress(count, #fontdirs)
- scan_dir(d, fontnames, newfontnames, false)
- explored_dirs[d] = true
- end
- end
- end
for _,d in ipairs(fontdirs) do
if not explored_dirs[d] then
count = count + 1
@@ -566,4 +550,3 @@ end
names.scan = scan_dir
names.update = update
-