specific bbcode newline

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mymokol

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?

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

exuin | 2021-03-06 18:29

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.

mymokol | 2021-03-06 20:19

There areknown issues with [fill] in RichTextLabel: RichTextLabel BB Code fill problem · Issue #45488 · godotengine/godot · GitHub

Calinou | 2021-03-07 00:00

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!

mymokol | 2021-03-07 08:32

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?

exuin | 2021-03-13 18:42

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

mymokol | 2021-03-13 23:07

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

exuin | 2021-03-13 23:08