- -- local v = "ltj-cid-" .. string.lower(cid_name) .. ".lua"
- local v = "ltj-cid-auto-" .. string.lower(cid_name) .. ".lua"
- local localpath = file.join(path.localdir, v)
- local systempath = file.join(path.systemdir, v)
- local kpsefound = kpse.find_file(v)
- if kpsefound and file.isreadable(kpsefound) then
- cidfont_data[cid_name] = require(kpsefound)
- cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
- elseif file.isreadable(localpath) then
- cidfont_data[cid_name] = require(localpath)
- cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
- elseif file.isreadable(systempath) then
- cidfont_data[cid_name] = require(systempath)
+ local dat = ltjb.load_cache("ltj-cid-auto-" .. string.lower(cid_name),
+ cid_cache_outdated )
+ if dat then
+ cidfont_data[cid_name] = dat[1]