diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2011-03-02 10:38:32 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2011-03-02 10:38:32 +0200 |
commit | cbd70917db8df40c98fd63f1f4c02adbd76823d5 (patch) | |
tree | 426c4c8e944c6c84157d113a6910005be7e0e36d | |
parent | 356c608fc7f4c238298e91a455a7c42ec86ebff9 (diff) | |
download | luaotfload-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.lua | 4 |
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 |