diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-06-18 17:40:29 +0300 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-06-18 17:40:29 +0300 |
commit | 03e78f8f86fa8286c8bee314a26c454d79a871f4 (patch) | |
tree | 742ef2437f0298e132d25e2e5be9547f391a8709 /otfl-font-otf.lua | |
parent | bf920c5bd42fd1ada8f3c5f116164370d7a59d57 (diff) | |
download | luaotfload-03e78f8f86fa8286c8bee314a26c454d79a871f4.tar.gz |
Sync with ConTeXt beta (beta 2010.06.18)
Diffstat (limited to 'otfl-font-otf.lua')
-rw-r--r-- | otfl-font-otf.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua index b113cf6..d1ad3d0 100644 --- a/otfl-font-otf.lua +++ b/otfl-font-otf.lua @@ -222,7 +222,8 @@ local enhancers = { function otf.load(filename,format,sub,featurefile) local name = file.basename(file.removesuffix(filename)) - local size = lfs.attributes(filename,"size") or 0 + 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)) end @@ -233,7 +234,7 @@ function otf.load(filename,format,sub,featurefile) end hash = containers.cleanname(hash) local data = containers.read(otf.cache,hash) - if not data or data.verbose ~= fonts.verbose or data.size ~= size then + if not data or data.verbose ~= fonts.verbose or data.size ~= size or data.time ~= time then logs.report("load otf","loading: %s (hash: %s)",filename,hash) local ff, messages if sub then @@ -267,6 +268,7 @@ function otf.load(filename,format,sub,featurefile) otf.enhance("pack",data,filename) end data.size = size + data.time = time data.verbose = fonts.verbose logs.report("load otf","saving in cache: %s",filename) data = containers.write(otf.cache, hash, data) @@ -1537,7 +1539,7 @@ function otf.copy_to_tfm(data,cache_id) -- we can save a copy when we reorder th if designsize == 0 then designsize = 100 end - local spaceunits = 500 + local spaceunits, spacer = 500, "space" -- indices maps from unicodes to indices for u, i in next, indices do characters[u] = { } -- we need this because for instance we add protruding info and loop over characters |