module('luatexja.rmlgbm', package.seeall)
local err, warn, info, log = luatexbase.errwarinf(_NAME)
module('luatexja.rmlgbm', package.seeall)
local err, warn, info, log = luatexbase.errwarinf(_NAME)
local path = {
localdir = file.join(kpse.expand_var("$TEXMFVAR"), aux_dir),
systemdir = file.join(kpse.expand_var("$TEXMFSYSVAR"), aux_dir),
local path = {
localdir = file.join(kpse.expand_var("$TEXMFVAR"), aux_dir),
systemdir = file.join(kpse.expand_var("$TEXMFSYSVAR"), aux_dir),
if kpsefound and file.isreadable(kpsefound) then
cidfont_data[cid_name] = require(kpsefound)
cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
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(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)
cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
elseif file.isreadable(systempath) then
cidfont_data[cid_name] = require(systempath)
cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
+ if cidfont_data[cid_name] then
+ for i,v in pairs(cidfont_data[cid_name].characters) do
+ if not v.width then v.width = 655360 end
+ v.height, v.depth = 576716.8, 78643.2 -- optimized for jfm-ujis.lua
+ end
+ end
- local def_height = round(0.88 * size) -- character's default height (optimized for jfm-ujis.lua)
- local def_depth = round(0.12 * size) -- and depth.
+ local def_height = 0.88 * size -- character's default height (optimized for jfm-ujis.lua)
+ local def_depth = 0.12 * size -- and depth.
if not cache_chars[cid_name][size] then
cache_chars[cid_name][size] = {}
for k, v in pairs(cache_chars[cid_name][655360]) do
cache_chars[cid_name][size][k] = {
if not cache_chars[cid_name][size] then
cache_chars[cid_name][size] = {}
for k, v in pairs(cache_chars[cid_name][655360]) do
cache_chars[cid_name][size][k] = {
height = def_height, depth = def_depth, tounicode = v.tounicode,
}
end
height = def_height, depth = def_depth, tounicode = v.tounicode,
}
end
- read_cid_font(cid_name)
- if not cidfont_data[cid_name] then
- ltjb.package_error('luatexja',
- "bad cid key `" .. s .. "'",
- "I couldn't find any non-embedded font information for the CID\n" ..
- '`' .. s .. "'. For now, I'll use `Adobe-Japan1-6'.\n"..
- 'Please contact the LuaTeX-ja project team.')
- cid_name = "Adobe-Japan1"
- end
+ read_cid_font(cid_name)
+ if not cidfont_data[cid_name] then
+ ltjb.package_error('luatexja',
+ "bad cid key `" .. s .. "'",
+ "I couldn't find any non-embedded font information for the CID\n" ..
+ '`' .. s .. "'. For now, I'll use `Adobe-Japan1-6'.\n"..
+ 'Please contact the LuaTeX-ja project team.')
+ cid_name = "Adobe-Japan1"
+ end
end
return mk_rml(basename, size, id, cid_name)
else
end
return mk_rml(basename, size, id, cid_name)
else