Text not obeying Minimum or Size when Justified

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Text not obeying Minimum or Size when Justified

#1 Post by ISAWHIM »

I am having an issue where Justify does not fit to any set sizes.

When setting the text to xanchor 0.0, or 0... The text sometimes justifies to the actual size, but is often not. So it looks like there is a thicker margin on the right-hand side, at various times. Not desirable... Looks like dialogue is misaligned.

When setting the xanchor to 0.5, (centered)... The text is getting compressed, even when setting values for...
xminimum
xsize

Thus, it only justifies to whatever the longest line in the text is. Leaving it "centered text", which can't be aligned, when there is not enough text to fill a line. So, it may be 500 pixels wide one minute, then 400, then 600, if you set a minimum to 600 or a size to 600, it should be expanding to 600. Also, the last-line remains centered.

How can I fix this? I can't use the left-aligned xanchor 0.0, or set an actual width for it to justify to.

I just need it to justify to the specified width. Every time, no matter what is typed in the text.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Text not obeying Minimum or Size when Justified

#2 Post by Imperf3kt »

I think you are specifying the say window width, not the text width, so you're only affecting the area your text can occupy and not the area it does occupy

I don't have an answer to your question, but thought I'd point that out.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Text not obeying Minimum or Size when Justified

#3 Post by ISAWHIM »

Imperf3kt wrote: Thu Nov 09, 2017 5:38 pm I think you are specifying the say window width, not the text width, so you're only affecting the area your text can occupy and not the area it does occupy

I don't have an answer to your question, but thought I'd point that out.
I have tried every element from the actual text element, to the vbox, to the window and even the screen. The end-result is always the same. It is "centering" and squishing the text to the largest line size. Then it uses that value for the justification, not the size you tell it to be.

I have decided to use the horrible "centered" output, which, at-least is consistently, incorrectly squishing things with equal distance on the right and left. It just looks horrible with the lat line being centered. I can live with it being a few pixels less than what I tell it, then actually filling-out to the set limit, randomly.

To see what I am talking about... Use a test phrase like this.
"Blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, "

Fit that in a box which wraps it to about three lines... Then give it a fixed width, or a limit, or margins... Now remove one word, and reload it... then another word, and reload it... then another word, and reload it.

Each time it will be NOT the width you set it to. The right-hand margin will get wide and then narrow. Only once or twice, matching the left-hand margin, as the "fit to width" value changes. Like it is randomly including the space at the end, or not adjusting the spaces correctly, in the calculations. Same thing happens with it being centered, but the space remains equal on both sides, not just growing and shrinking on the right-hand side. (With the flaw of it centering the last line, or the first line, if the first line doesn't fit the width of the box/text size you set.)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Tony_Tan