--
--- luatexja/rmlgbm.lua
+-- luatexja/ltj-rmlgbm.lua
--
-luatexbase.provides_module({
- name = 'luatexja.rmlgbm',
- date = '2013/12/22',
- description = 'Definitions of non-embedded Japanese (or other CJK) fonts',
-})
-module('luatexja.rmlgbm', package.seeall)
-local err, warn, info, log = luatexbase.errwarinf(_NAME)
-
luatexja.load_module('base'); local ltjb = luatexja.base
-cidfont_data = {}
-local cidfont_data = cidfont_data
+local cidfont_data = {}
local cache_chars = {}
local cache_ver = '2'
}
-- reading CID maps
+local make_cid_font
do
local line, fh -- line, file handler
local tt,cidm -- characters, cid->(Unicode)
local function entry(a)
return {index = a}
end
- function make_cid_font()
+ make_cid_font = function ()
local kx = cid_replace[cid_name]
if not kx then return end
local k = {
})
end
end
-local make_cid_font = make_cid_font
--
local function cid_cache_outdated(t) return t.version~=cache_ver end
local definers = fonts.definers
local function mk_rml(name, size, id)
local specification = definers.analyze(name,size)
- specification = definers.resolve(specification)
+ --specification = definers.resolve(specification) (not needed)
specification.detail = specification.detail or ''
local fontdata = {}
return fontdata
end
-function font_callback(name, size, id, fallback)
+local function font_callback(name, size, id, fallback)
local p = utf.find(name, ":") or utf.len(name)+1
if utf.sub(name, 1, p-1) == 'psft' then
local s = "Adobe-Japan1-6"
cid_reg, cid_order, cid_name, cid_supp = 'Adobe', 'Japan1', 'Adobe-Japan1'
read_cid_font()
+
+
+luatexja.rmlgbm = {
+ cidfont_data = cidfont_data,
+ font_callback = font_callback,
+}