diff options
author | Elie Roux <elie.roux@telecom-bretagne.eu> | 2010-05-24 22:56:01 +0300 |
---|---|---|
committer | Elie Roux <elie.roux@telecom-bretagne.eu> | 2010-05-24 22:56:01 +0300 |
commit | 6441805f0a6e60d15cf4969cf5507eeecac88bc6 (patch) | |
tree | d0963b6c8f60a65ad15ea4eff952280bd8ffb9fc | |
parent | 93afaacb9a5e835f397a46a16286282f19fcf113 (diff) | |
download | luaotfload-6441805f0a6e60d15cf4969cf5507eeecac88bc6.tar.gz |
Changing the test to see if a font has already been loaded
On my system a lot of fonts were indexed two times, this seems to fix it. It's not perfect but that's all we can do with the current database (please tell me if it introduces some regressions).
-rw-r--r-- | otfl-font-nms.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index c01922d..a74ba35 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -414,11 +414,10 @@ local function load_font(filename, fontnames, newfontnames, texmf) db_timestamp = status[basefile] and status[basefile].timestamp timestamp = lfs.attributes(filename, "modification") - if newstatus[basefile] then - -- already indexed in this run - if newstatus[basefile].timestamp == timestamp then - return - end + local index_status = newstatus[basefile] or (not texmf and newstatus[basename(filename)]) + if index_status and index_status.timestamp == timestamp then + -- already indexed this run + return end newstatus[basefile] = newstatus[basefile] or { } |