summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua')
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua b/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua
index 499d3eda4a..49f2018e4d 100644
--- a/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua
+++ b/macros/luatex/generic/luatexja/src/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