OSDN Git Service

fix IVS, CID related codes
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 4 May 2016 01:45:42 +0000 (10:45 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 4 May 2016 01:45:42 +0000 (10:45 +0900)
src/ltj-jfont.lua
src/ltj-otf.lua

index 5b9cbe4..0aa5239 100644 (file)
@@ -700,7 +700,7 @@ do
                      end
                     if uniq_flag then
                        dest = dest or {}; dest[bu] = dest[bu] or {}
-                       dest[bu][vsel] = unitable[i]
+                       dest[bu][vsel] = unitable[gv.name]
                     end
                  end
               end
index bdaf8ad..6a1447a 100644 (file)
@@ -173,7 +173,8 @@ ltjb.add_to_callback('pre_linebreak_filter', extract,'ltj.otf',
 local function cid_to_char(fmtable, fn)
    local fi = identifiers[fn]
    local fe = ltjf_font_extra_info[fn]
-   if fi.cidinfo and fi.cidinfo.ordering == "Japan1" and fe then
+   if (fi.resources and fi.resources.cidinfo and fi.resources.cidinfo.ordering == "Japan1" )
+      and (fe and fe.unicodes) then
       for i, v in pairs(fmtable.chars) do
         local j = string.match(i, "^AJ1%-([0-9]*)")
         if j then
@@ -236,7 +237,7 @@ do
                   if qc>=0xE0100 then qc = qc - 0xE0100 end
                   local pf = getfont(p)
                   local pt = ltjf_font_extra_info[pf]
-                  pt = pt and pt[getchar(p)];  pt = pt and  pt[qc]
+                 pt = pt and pt[getchar(p)];  pt = pt and  pt[qc]
                   head, r = node_remove(head,q)
                  node_free(q)
                   if pt then