- local y_shift = - p.yoffset + (has_attr(p,attr_yablshift) or 0)
- p.yoffset = -fshift.down
- head, q = node.remove(head, p)
- local total = fwidth - p.width
- if total == 0 then
- h = p; p.next = nil
+ local y_shift, total = - p.yoffset + (has_attr(p,attr_yablshift) or 0), fwidth - p.width
+ local q; head, q = node.remove(head, p)
+ p.yoffset, p.next = -fshift.down, nil
+ if total ~= 0 and char_data.align~='left' then
+ p.xoffset = p.xoffset - fshift.left
+ + (((char_data.align=='right') and total) or round(total*0.5))