w = @w - @r_margin - @x;
end
- wmax = (w - 2 * @c_margin);
+ wmax = (w - 3 * @c_margin);
s = txt.gsub("\r", ''); # remove carriage returns
nb = s.length;
ns += 1;
end
- l = GetStringWidth(s[from_j, to_index - from_j + 1]);
+ l = GetStringWidth(s[from_j, to_index - from_j]);
if (l > wmax)
#Automatic line break
#Output text in flowing mode
w = @w - @r_margin - @x;
- wmax = (w - 2 * @c_margin);
+ wmax = (w - 3 * @c_margin);
s = txt.gsub("\r", '');
nb = s.length;
if (nl == 1)
@x = @l_margin;
w = @w - @r_margin - @x;
- wmax = (w - 2 * @c_margin);
+ wmax = (w - 3 * @c_margin);
end
nl += 1;
next
if (c == " "[0])
sep= i;
end
- l = GetStringWidth(s[j, i - j + 1]);
+ l = GetStringWidth(s[j, i - j]);
if (l > wmax)
#Automatic line break (word wrapping)
if (sep == -1)
@x = @l_margin;
@y += h;
w=@w - @r_margin - @x;
- wmax=(w - 2 * @c_margin);
+ wmax=(w - 3 * @c_margin);
i += 1
nl += 1
next
if (nl==1)
@x = @l_margin;
w = @w - @r_margin - @x;
- wmax = (w - 2 * @c_margin);
+ wmax = (w - 3 * @c_margin);
end
nl += 1;
else