Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url, b, u and i tags in RichTextLabel don´t respect the margin #32753

Open
Tracked by #39144
Bethleem opened this issue Oct 11, 2019 · 2 comments
Open
Tracked by #39144

url, b, u and i tags in RichTextLabel don´t respect the margin #32753

Bethleem opened this issue Oct 11, 2019 · 2 comments

Comments

@Bethleem
Copy link

Bethleem commented Oct 11, 2019

Godot version: 3.1.1-stable_win32

OS/device including version: Windows 7/PC

Issue description: When a text marked with a url, u, b or i tag inside a Richtextlabel hits the margin area, it just go over the margin no matter what. The regular text detects the margin and jumps to the next line, but the tags doesn´t and just continue like no margin is in place.

Steps to reproduce:
-Create a Rich text label, set a right margin and disable scroll_active.
-Fill the Richtextlabel with a text so a word marked with a tag reaches the right margin.
-Enjoy the bug!

Minimal reproduction project:
See the word "Paleolítico" in the second line of this capture:
bug

@Bethleem Bethleem changed the title url, b, u and i tags in RichTextLabel doesn´t respect the url, b, u and i tags in RichTextLabel don´t respect the margin Oct 11, 2019
@theoway
Copy link
Contributor

theoway commented Jun 20, 2020

@Bethleem Can you upload a minimum reproduction project? I'm not able to reproduce it.

@Bethleem
Copy link
Author

Sorry for the delay, I drop the project over a year ago waiting for godot (blame me for the joke) to fix a number of bugs. I see most of them are still in place a year and several versions later.
I was mistaken by the time I put this bug report. It´s not about the margin, it´s another tag related bug. When you put text into fill tag, the last word of each visual line (not paragraph, screen lines) is "glued" with a space character after it. At least with regular text. When that line last word is between a tag (u, b, u, url...), it does not glue that extra space character, so it seems to break the margin, but what actually happens is that last tagged word breaks the visual vertical line of glued extra space characters.

There is an easy workaround in GDScript for that to be avoid: force an extra space character in any last line word with a tag. I know, is dirty and inefficient but it works just fine. I think efforts for bug fixing may better be put into critical, non-hackable, project-stoppers bugs like the url-fill one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants