diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua index 71f974979e9..c16e15b8f9c 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua @@ -33,13 +33,14 @@ local attr_ykblshift = luatexbase.attributes['ltj@ykblshift'] local ltjf_font_metric_table = ltjf.font_metric_table local ltjf_find_char_class = ltjf.find_char_class +local OTF = luatexja.userid_table.OTF -- Append a whatsit node to the list. -- This whatsit node will be extracted to a glyph_node function append_jglyph(char) local p = node_new(id_whatsit,sid_user) local v = tex.attribute[attr_curjfnt] - p.user_id=30113; p.type=100; p.value=char + p.user_id=OTF; p.type=100; p.value=char set_attr(p, attr_yablshift, tex.attribute[attr_ykblshift]) node.write(p) end @@ -52,7 +53,7 @@ function cid(key) curjfnt.cidinfo.ordering ~= "Korea1" then ltjb.package_error('luatexja-otf', 'Current Japanese font (or other CJK font) "'..curjfnt.psname..'" is not a CID-Keyed font (Adobe-Japan1 etc.)', - 'Select a CID-Keyed font using \jfont.') + 'Select a CID-Keyed font using \\jfont.') return end local char = curjfnt.unicodes[curjfnt.cidinfo.ordering..'.'..tostring(key)] @@ -70,7 +71,7 @@ function extract(head) local v while p do if p.id==id_whatsit then - if p.subtype==sid_user and p.user_id==30113 then + if p.subtype==sid_user and p.user_id==OTF then local g = node_new(id_glyph) g.subtype = 0; g.char = p.value v = has_attr(p, attr_curjfnt); g.font = v @@ -112,7 +113,7 @@ local function cid_to_char(fmtable, fn) local fi = fonts.ids[fn] if fi.cidinfo and fi.cidinfo.ordering == "Japan1" then fmtable.cid_char_type = {} - for i, v in pairs(fmtable.size_cache.chars) do + for i, v in pairs(fmtable.chars) do local j = string.match(i, "^AJ1%-([0-9]*)") if j then j = tonumber(fi.unicodes['Japan1.'..tostring(j)]) |