summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2011-03-02 10:38:32 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2011-03-02 10:38:32 +0200
commitcbd70917db8df40c98fd63f1f4c02adbd76823d5 (patch)
tree426c4c8e944c6c84157d113a6910005be7e0e36d
parent356c608fc7f4c238298e91a455a7c42ec86ebff9 (diff)
downloadluaotfload-cbd70917db8df40c98fd63f1f4c02adbd76823d5.tar.gz
Don't load the cached font if the feature file was changed
Just a hack but seems to work until I check with Hans.
-rw-r--r--otfl-font-otf.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua
index d1ad3d0..fe9cd51 100644
--- a/otfl-font-otf.lua
+++ b/otfl-font-otf.lua
@@ -225,7 +225,9 @@ function otf.load(filename,format,sub,featurefile)
local attr = lfs.attributes(filename)
local size, time = attr.size or 0, attr.modification or 0
if featurefile then
- name = name .. "@" .. file.removesuffix(file.basename(featurefile))
+ local fattr = lfs.attributes(featurefile)
+ local fsize, ftime = fattr and fattr.size or 0, fattr and fattr.modification or 0
+ name = name .. "@" .. file.removesuffix(file.basename(featurefile)) .. ftime .. fsize
end
if sub == "" then sub = false end
local hash = name