From 66022abc47a5e75cc37b29d4f583868b73ed1554 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Mon, 16 Sep 2019 09:52:40 +0900 Subject: [PATCH] typo --- src/ltj-jfont.lua | 7 +++++-- src/ltj-lotf_aux.lua | 12 +++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index 7793ffd..01ef894 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -456,7 +456,7 @@ do jfm_dir = dir local i = load_jfont_metric() local j = -update_jfm_cache(i, size) - font_metric_table[j]=metrics[i].size_cache[s] + font_metric_table[j]=metrics[i].size_cache[size] tex.sprint(cat_lp, '\\ltj@cur' .. (dir=='yoko' and 'j' or 't') .. 'fnt' .. tostring(j) .. '\\relax') end luatexja.jfont.load_jfmonly = load_jfmonly @@ -806,7 +806,10 @@ do end local function prepare_extra_data_font(id, res) if type(res)=='table' and (res.psname or res.filename) then - font_extra_info[id] = font_extra_basename[res.psname or nameonly(res.filename)] + local bname = res.psname or nameonly(res.filename) + local t = font_extra_basename[bname] + if not t then prepare_extra_data_base(res) end + font_extra_info[id] = t or font_extra_basename[bname] end end luatexbase.add_to_callback( diff --git a/src/ltj-lotf_aux.lua b/src/ltj-lotf_aux.lua index 0973837..1cad039 100644 --- a/src/ltj-lotf_aux.lua +++ b/src/ltj-lotf_aux.lua @@ -56,7 +56,7 @@ end aux.get_ascender, aux.get_descender = get_ascender, get_descender local function get_vmet_table(tfmdata, dest) - if tfmata and tfmdata.shared then return dest end + if (not tfmdata) or (not tfmdata.shared) then return dest end local rawdata = tfmdata.shared.rawdata local ascender = rawdata.metadata.ascender or 0 local default_vheight @@ -130,6 +130,14 @@ function aux.replace_vert_variant(id, c) end +--for name, func in pairs(aux) do +-- if type(func)=="function" then +-- aux[name] = function(...) +-- print('LOTF_AUX', name, ...); +-- local a = func(...); print('RESULT', a); return a +-- end +-- end +--end local search search = function (t, key, prefix) @@ -143,4 +151,6 @@ search = function (t, key, prefix) end aux.t_search = search + + -- EOF -- 2.11.0