0 votes

I am being pressed on to create a new line before a single character word in a RichTextLabel. However, the text is aligned to the block using the bbcode tag [fill]. If I press enter, the text will have an indent on the right. If I make the sinlgle character word skip to the next line using spaces, the indent will be smaller, but still noticeable. I tried things like \n or [newline], looked through the documentation but couldn't find a way to make a new line that wouldn't break the [fill] alignment. Is there a way to go around this?

Godot version 3.2.3
in Engine by (72 points)

Can you post an image of your issue? I don't see an indent when I'm using fill tags.

I tried posting images to this site before, but it never worked. However, if you try to forcefully move a word to the new line without using enter (using space), you should see an indent.. I'm sorry I can't provide more information.

There areknown issues with [fill] in RichTextLabel: https://github.com/godotengine/godot/issues/45488

Thanks, however that's not really my case. If you write a sentence in the RichTextLabel that spans several lines, apply the [fill] tag and try to push the word on the end of one line to the next one, either by pressing enter, or by pushing it with spacebar, you'll see an indent appear, because of the way that enter starts a new paragraph or that the [fill] tag treats spaces. The last line of the paragraph behaves as if it was aligned to the right, instead of filling the entire length of the RichTextLabel and the spacebar takes up space on the end of the line, which is why the text appears indented. What I was looking for was some kind of linebreaker that wouldn't start a new paragraph - the line that was broken would still fill the width of the RichTextLabel. But thanks for your help!

Did you solve your issue? I tried to replicate your issue with the fill tag by pressing enter before a single-character word or using space, no indent appears in front of the single-word character. It seems to me that your issue is that you want the bottom line to fill the entire width of the RichTextLabel, right?

The indent appears on the end of the first line, not in the front of the second line, in front of the word.

Can you try posting an image? Or if you can't, link to an image?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.