Page 1 of 1
Bug on justifying text with negative fractional kerning?
Posted: Sat Jan 21, 2012 11:10 am
by Paulaner
I'm working with justified text. Using a -0.2 kerning, the result is somewhat corrupted. See the attached pictures: Fig. 1 uses the default kerning. Fig. 2 uses a -0.2 kerning. If I don't justify text, everything is fine.
Fig. 1 [default kerning]
Fig. 2 [-0.2 kerning]

Re: Bug on justifying text with negative fractional kerning?
Posted: Sat Jan 21, 2012 11:20 am
by PyTom
Just to confirm, is this with 6.13.8?
Also, is this actually wrong? Ren'Py's justification ensures that all lines are the same length, but it doesn't pad them out to any particular width. (Which might be something to add, come to think of it.) It looks like what's happening here is that the reduced kerning allowed Ren'Py to create a longer longest line, and then everything else is being laid out properly.
Consider supplying an xmaximum to the text, so that it can't overflow.
Re: Bug on justifying text with negative fractional kerning?
Posted: Sat Jan 21, 2012 1:54 pm
by Paulaner
PyTom wrote:Just to confirm, is this with 6.13.8?
Also, is this actually wrong? Ren'Py's justification ensures that all lines are the same length, but it doesn't pad them out to any particular width. (Which might be something to add, come to think of it.) It looks like what's happening here is that the reduced kerning allowed Ren'Py to create a longer longest line, and then everything else is being laid out properly.
Consider supplying an xmaximum to the text, so that it can't overflow.
I'm using 6.13.8.1675.
Also, the containing frame is supplying xmaximum and xminimum (438 pixels), but I tried supplying an xmaximum to the text itself (the same 438 pixels). The result is the same: the text overflows (more than 500 pixels).
EDIT: it seems to me that the modified kerning is forcing Ren'Py to miscalculate the width. an xmaximum of 438 renders to 500+, but if I reduce it to 380, the result is what I was trying to obtain. There seems to be an offset.