Bug on justifying text with negative fractional kerning?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Paulaner
Newbie
Posts: 20
Joined: Thu Nov 04, 2010 6:28 am
Contact:

Bug on justifying text with negative fractional kerning?

#1 Post by Paulaner » Sat Jan 21, 2012 11:10 am

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]
Image

Fig. 2 [-0.2 kerning]
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Bug on justifying text with negative fractional kerning?

#2 Post by PyTom » Sat Jan 21, 2012 11:20 am

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Paulaner
Newbie
Posts: 20
Joined: Thu Nov 04, 2010 6:28 am
Contact:

Re: Bug on justifying text with negative fractional kerning?

#3 Post by Paulaner » Sat Jan 21, 2012 1:54 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users