summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-02-28 18:16:57 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-02-28 18:23:30 +0200
commitc46a92a2b93e3baa85cc9e130af1613142f9f524 (patch)
tree5d580fa4735694a993d7bcd2d13c6f463a372057
parent5b447997b8cf17fa1e48174a7ae76ed9215359e5 (diff)
downloadluaotfload-c46a92a2b93e3baa85cc9e130af1613142f9f524.tar.gz
Correlate checksums to filenames
This way when the file is moved around, its filename in the database will be updated, as suggested by Elie.
-rw-r--r--luaotfload-fonts.lua6
-rw-r--r--otfl-font-dum.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index 61d91e3..aeba0f1 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -46,7 +46,7 @@ luaotfload.fonts.directory = kpse.expand_var("$TEXMFVAR") .. luaotfload.fonts.su
-- the version of the database, to be checked by the lookup function of
-- luaotfload
-luaotfload.fonts.version = 2.003
+luaotfload.fonts.version = 2.004
-- Log facilities:
-- - level 0 is quiet
@@ -136,11 +136,11 @@ local function load_font(filename, names, texmf)
local checksums = names.checksums or { }
if filename then
local checksum = file.checksum(filename)
- if checksums[checksum] then
+ if checksums[checksum] and checksums[checksum] == filename then
log(3, "Font already indexed: %s", filename)
return
end
- checksums[checksum] = 1
+ checksums[checksum] = filename
local info = fontloader.info(filename)
if info then
if type(info) == "table" and #info > 1 then
diff --git a/otfl-font-dum.lua b/otfl-font-dum.lua
index 5c0d1ed..0b2e911 100644
--- a/otfl-font-dum.lua
+++ b/otfl-font-dum.lua
@@ -48,7 +48,7 @@ end
fonts.names = fonts.names or { }
-fonts.names.version = 2.003 -- not the same as in context
+fonts.names.version = 2.004 -- not the same as in context
fonts.names.basename = "otfl-names.lua"
fonts.names.new_to_old = { }
fonts.names.old_to_new = { }