OSDN Git Service

Fix that luatexja-otf was broken
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 23 Mar 2020 07:48:24 +0000 (16:48 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 23 Mar 2020 07:48:24 +0000 (16:48 +0900)
doc/luatexja.dtx
src/ltj-lotf_aux.lua
src/ltj-otf.lua

index a2cb08d..db60054 100644 (file)
@@ -92,7 +92,7 @@
   basicstyle=\ttfamily\small, pos=r, breaklines=true,
   numbers=none, rframe={}, basewidth=0.5em, numberstyle=\tiny, numbersep=0.5em,
   explpreset={numberstyle=\tiny, numbers=left, numbersep=1em, columns=fixed},
-  morecomment=[l]{\%}, commentstyle=\color{green},
+  morecomment=[l]{\%}, commentstyle=\color{green}
 }
 % Suppress output from showexpl to stdout.
 \makeatletter
@@ -1693,7 +1693,6 @@ as an external package \Pkg{luatexja-otf}.
 一部を(\Pkg{luatexja-otf}という別のパッケージとして)実装した.
 %</ja>
 
-%!!! BROKEN
 \begin{LTXexample}[width=0.4\textwidth]
 \jfontspec{KozMinPr6N-Regular.otf}
 森\UTF{9DD7}外と内田百\UTF{9592}とが\UTF{9AD9}島屋に\\
index 04cae9d..6541181 100644 (file)
@@ -40,8 +40,7 @@ do
 local nulltable = {}
 local function get_cidinfo(id) -- table
   local t = getfont(id)
-  local a = t and (t.cidinfo or (t.resources and t.resources and t.resources.cidinfo)) or nulltable
-  return a
+  return t and (t.resources and t.resources.cidinfo or t.cidinfo) or nulltable
 end
 aux.get_cidinfo = get_cidinfo
 end
index 48fe4bd..1082394 100644 (file)
@@ -78,7 +78,7 @@ local function get_ucs_from_rmlgbm(c)
       local tfmdata = font_getfont(curjfnt)
       if tfmdata and tfmdata.resources then
         local base, ivs = v % 0x200000, 0xE00FF + math.floor(v/0x200000)
-        curjfnt = tfmdata and tfmdata.variants
+        curjfnt = tfmdata.resources.variants
         curjfnt = curjfnt and curjfnt[ivs]
         return curjfnt and curjfnt[base] or base
       else return base
@@ -144,7 +144,7 @@ do
       if key==0 then return append_jglyph(0) end
       local curjfnt = tex_get_attr((ltjd_get_dir_count()==dir_tate)
                                         and attr_curtfnt or attr_curjfnt)
-      local cidinfo = ltju.get_cidinfo(cudjfnt)
+      local cidinfo = ltju.get_cidinfo(curjfnt)
       if type(cidinfo)~="table" or
          cidinfo.ordering ~= "Japan1" and
          cidinfo.ordering ~= "GB1" and