OSDN Git Service

240b0ec causes inf. loop... why?
[luatex-ja/luatexja.git] / src / ltj-adjust.lua
index 7758d93..d9bd77a 100644 (file)
@@ -496,7 +496,7 @@ do
         if h>hmax then hmax=h end
         if (bw-h-d)<lmin then lmin=bw-h-d end
       end
-      if lmin==1/0 then lmin = 0 end
+      if lmin==1/0 then lmin = bw end
       return lmin, 
          bw - lmin - getfield(before, 'depth')
              - getfield(after, mirrored and 'depth' or 'height')
@@ -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)