diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua index 357560c4bf4..7fc5eb11af8 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua @@ -1,11 +1,11 @@ -- --- luatexja/ltj-rmlgbm.lua +-- ltj-rmlgbm.lua -- luatexja.load_module('base'); local ltjb = luatexja.base local cidfont_data = {} local cache_chars = {} -local cache_ver = 8 +local cache_ver = 9 local identifiers = fonts.hashes.identifiers local cid_reg, cid_order, cid_supp, cid_name @@ -181,7 +181,7 @@ do -- 縦書用字形 tt, cidm = {}, {} - local ttv = {}; k.shared.ltj_vert_table = ttv + local ttv = {}; k.ltj_vert_table = ttv for i = 0,kx[2] do cidm[i] = -1 end open_cmap_file(kx[1] .. "-V", increment, tonumber, entry) for i,v in pairs(tt) do @@ -228,11 +228,12 @@ do local getfont = node.direct.getfont local getchar = node.direct.getchar local setchar = node.direct.setchar + local font_getfont = font.getfont cidf_vert_processor = { function (head, fnum) - local fontdata = identifiers[fnum] + local fontdata = font_getfont(fnum) if head and luatexja.jfont.font_metric_table[fnum].vert_activated then - local vt = fontdata.shared.ltj_vert_table + local vt = fontdata.ltj_vert_table local nh = is_node(head) and to_direct(head) or head for n in traverse_id(id_glyph, head) do if getfont(n)==fnum then @@ -398,11 +399,13 @@ local function font_callback(name, size, id, fallback) end return mk_rml(basename, size, id) else - local tfmdata=fallback(name, size, id) - if type (tfmdata) == "table" and tfmdata.shared then - luatexbase.call_callback("luaotfload.patch_font", tfmdata, name) + local fontdata=fallback(name, size, id) + if type (fontdata) == "table" and fontdata.encodingbytes == 2 then + luatexbase.call_callback ("luaotfload.patch_font", fontdata, name, id) + else + luatexbase.call_callback ("luaotfload.patch_font_unsafe", fontdata, name, id) end - return tfmdata + return fontdata end end |