summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index 2bd7258bbfc..16ba9d93a5b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -367,18 +367,18 @@ do
end
-- define_font callback
- local otfl_fdr = fonts.definers.read
+ local otfl_fdr
local ltjr_font_callback = ltjr.font_callback
function luatexja.font_callback(name, size, id)
local new_name = is_def_jfont and extract_metric(name) or name
is_def_jfont = false
- --local res = otfl_fdr(new_name, size, id)
local res = ltjr_font_callback(new_name, size, id, otfl_fdr)
luatexbase.call_callback('luatexja.define_font', res, new_name, size, id)
-- this callback processes variation selector, so we execute it always
return res
end
luatexbase.create_callback('luatexja.define_font', 'simple', function (n) return n end)
+ otfl_fdr= luatexbase.remove_from_callback('define_font', 'luaotfload.define_font')
luatexbase.add_to_callback('define_font',luatexja.font_callback,"luatexja.font_callback", 1)
end
@@ -781,8 +781,8 @@ do
local checksum = file.checksum
local function prepare_extra_data_base(id)
- if not id then return end
- local bname = file.nameonly(id.filename or '')
+ if (not id) or (not id.filename) then return end
+ local bname = file.nameonly(id.filename)
if not font_extra_basename[bname] then
-- if the cache is present, read it
local newsum = checksum(id.filename) -- MD5 checksum of the fontfile
@@ -809,7 +809,7 @@ do
end
end
local function prepare_extra_data_font(id, res)
- if type(res)=='table' and res.shared then
+ if type(res)=='table' and res.shared and res.filename then
font_extra_info[id] = font_extra_basename[file.nameonly(res.filename)]
end
end