summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-03 21:07:53 +0000
committerKarl Berry <karl@freefriends.org>2022-01-03 21:07:53 +0000
commit189fdf27a39a30f9153b93b2a4fb43a3e293875a (patch)
treed2b8f1309b9f73178fb3d7976bae80301391d62b /Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
parentf7a0d508f882ad92e49e61e2bbc9d2d56e882e58 (diff)
luatexja (3jan22)
git-svn-id: svn://tug.org/texlive/trunk@61485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
index 499d3eda4a9..49f2018e4dc 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
@@ -5,7 +5,7 @@ luatexja.load_module('base'); local ltjb = luatexja.base
local cidfont_data = {}
local cache_chars = {}
-local cache_ver = 10
+local cache_ver = 11
local identifiers = fonts.hashes.identifiers
local cid_reg, cid_order, cid_supp, cid_name
@@ -157,6 +157,7 @@ do
tth[pricode], cidmo[i], pricode
= { index = i }, pricode, pricode+1;
end
+ ttu[i] = cidmo[i]
ttu[cid_order .. '.' .. i] = cidmo[i]
end
@@ -231,7 +232,7 @@ do
cidf_vert_processor = {
function (head, fnum)
local fontdata = font_getfont(fnum)
- if head and luatexja.jfont.font_metric_table[fnum].vert_activated then
+ if head and luatexja.jfont.font_metric_table[fnum] and luatexja.jfont.font_metric_table[fnum].vert_activated then
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
@@ -245,6 +246,9 @@ do
}
end
+local dummy_vht, dummy_vorg = {}, {}
+setmetatable(dummy_vht, {__index = function () return 1 end } )
+setmetatable(dummy_vorg, {__index = function () return 0.88 end } )
local function cid_cache_outdated(t) return t.version~=cache_ver end
local function read_cid_font()
local dat = ltjb.load_cache("ltj-cid-auto-" .. string.lower(cid_name),
@@ -260,6 +264,9 @@ local function read_cid_font()
end
if cidfont_data[cid_name] then
cidfont_data[cid_name].shared.processes = cidf_vert_processor
+ cidfont_data[cid_name].resources.ltj_extra
+ = { ind_to_uni = cidfont_data[cid_name].resources.unicodes,
+ vheight = dummy_vht, vorigin = dummy_vorg }
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