OSDN Git Service

suppress loading Japanese fonts in unused direction (incomplete; altfont)
[luatex-ja/luatexja.git] / src / ltj-adjust.lua
index 3314874..382e760 100644 (file)
@@ -453,7 +453,7 @@ do
   function ltjl.p_profile(before, after, mirrored, bw)
     local t = {}
     do
-      local w_acc, d_before = 0, 0
+      local w_acc, d_before = getfield(before,'shift'), 0
       local x = getlist(before); local xn = node_next(x)
       while x do
         local w, d
@@ -469,7 +469,7 @@ do
       end
     end
     do
-      local w_acc, h_before = 0, 0
+      local w_acc, h_before = getfield(after,'shift'), 0
       local x = getlist(after); local xn = node_next(x)
       while x do
         local w, h, d
@@ -508,9 +508,12 @@ do
   local ltja = luatexja.adjust
   local copy_glue = ltjl.copy_glue
   local floor, max = math.floor, math.max
-  function ltjl.l_step(dist, g, adj, normal, bw)
+  function ltjl.l_step(dist, g, adj, normal, bw, loc)
+    if loc=='alignment' then
+      return ltjl.l_dummy(dist, g, adj, normal, bw, loc)
+    end
     if dist < tex.lineskiplimit then
-       local f = max(1, bw*ltja.step_factor)
+       local f = max(1, bw*ltja.step_factor)
        copy_glue(g, tex.baselineskip, 1, normal - f * floor((dist-tex.lineskip.width)/f))
     else
        copy_glue(g, tex.baselineskip, 2, normal)