4 luatexbase.provides_module({
8 description = 'The OTF Lua module for LuaTeX-ja',
10 module('luatexja.otf', package.seeall)
12 require('luatexja.base'); local ltjb = luatexja.base
13 require('luatexja.jfont'); local ltjf = luatexja.jfont
15 local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
18 local curjfnt = fonts.ids[tex.attribute[attr_curjfnt]]
19 if curjfnt.cidinfo.ordering ~= "Japan1" then
20 ltjb.package_error('luatexja-otf',
21 'Current Japanese font "'..curjfnt.psname..'" is not a CID-Keyed font (Adobe-Japan1)',
22 'Select a CID-Keyed font using \jfont.')
25 local char = curjfnt.unicodes['Japan1.'..tostring(key)]
27 ltjb.package_error('luatexja-otf',
28 'Current Japanese font "'..curjfnt.psname..'" does not include the specified CID character ('..tostring(key)..')',
29 'Use a font including the specified CID character.')
32 tex.print("\\char"..tostring(char).."\\relax")
35 -------------------- all done