From 6441805f0a6e60d15cf4969cf5507eeecac88bc6 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 24 May 2010 22:56:01 +0300 Subject: 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). --- otfl-font-nms.lua | 9 ++++----- 1 file 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 { } -- cgit v1.2.3