OSDN Git Service

Updated a document; added lltjlisting.sty in doc/
[luatex-ja/luatexja.git] / src / luatexja / setwidth.lua
index 0fb33a5..84c0ac6 100644 (file)
@@ -64,14 +64,14 @@ function capsule_glyph(p, dir, mode)
         h = p; p.next = nil
       else
         h = node_new(id_kern); h.subtype = 0
-        if char_data.align=='left' then
-           h.kern = total; p.next = h; h = p
-        elseif char_data.align=='right' then
+        if char_data.align=='right' then
            h.kern = total; p.next = nil; h.next = p
         elseif char_data.align=='middle' then
            h.kern = round(total/2); p.next = h
            h = node_new(id_kern); h.subtype = 0
            h.kern = total - round(total/2); h.next = p
+        else -- left
+           h.kern = total; p.next = h; h = p
         end
       end
       box = node_new(id_hlist);