- local savepath = path.localdir .. '/luatexja/'
- if not lfs.isdir(savepath) then
- dir.mkdirs(savepath)
- end
- savepath = file.join(savepath, "ltj-cid-auto-"
- .. string.lower(cid_name) .. ".lua")
- if file.iswritable(savepath) then
- k.characters[46].width = math.floor(655360/14);
- -- Standard fonts are ``seriffed''.
- table.tofile(savepath, k,'return', false, true, false )
- ltjb.package_info_no_line('luatexja', "saved :'" .. savepath .. "'", '')
- else
- ltjb.package_warning_no_line('luatexja', "failed to save to '" .. savepath .. "'", '')
- end
+ k.characters[46].width = math.floor(655360/14);
+ ltjb.save_cache( "ltj-cid-auto-" .. string.lower(cid_name),
+ {
+ version = cache_ver,
+ k,
+ })