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

RichTextLabel bbcode support evaluation #21488

Closed
Tracked by #39144
ganlub opened this issue Aug 27, 2018 · 3 comments · Fixed by godotengine/godot-docs#7512
Closed
Tracked by #39144

RichTextLabel bbcode support evaluation #21488

ganlub opened this issue Aug 27, 2018 · 3 comments · Fixed by godotengine/godot-docs#7512

Comments

@ganlub
Copy link

ganlub commented Aug 27, 2018

Godot version:
v3.0.6

I've experienced some issues with RTL such as #21482 and #21285 and I decided to evaluate bbcode's full support against the official tags reference.

So far I couldn't find support for the following (names from the official reference):

  1. Font-size (Ability to change font size in RichTextLabel without requiring separate font resources when using DynamicFont #5557)
  2. Left align text
  3. Quote
  4. Image (resized)
  5. Image attributes title and alt
  6. Preformatted
  7. Youtube videos

3, 5 and 7 probably aren't something that need to be implemented on a platform like Godot. But the others could be quite handy.

The only available reference on Godot's documentation doesn't clearly state if more tags are supported. For example lists and tables are supported, yet they aren't there.

I thought this situation could be discussed and maybe get some of this implemented.
Maybe this issue could also be used to group the other RTL's issues and make them easier to work on.

@ganlub ganlub changed the title RichTextLabel bbcode missing tags support RichTextLabel bbcode support evaluation Aug 27, 2018
@Calinou
Copy link
Member

Calinou commented Aug 27, 2018

There's already an issue about setting the font size in a RichTextLabel: #5557

Text in RichTextLabel is currently left-aligned by default, but I agree the default alignment should be configurable. If this is implemented, then a [left] tag would become useful.

As for preformatted text, RichTextLabel already supports [code] tags (which requires a font to be loaded into the Mono Font property). Line breaks should be preserved inside of those tags, so I'm not sure if another tag for pre-formatted text would be useful.

@ganlub
Copy link
Author

ganlub commented Aug 28, 2018

@Calinou I updated the list with the issue reference.

I've seen that it is left aligned by default, but at least on their example it acts like a line break, which in that case make sense.

The difference between [code] and [pre], if I'm not mistaken, is it that the last one preserves the indentation and spacing. Maybe [code] could, if it isn't already, handle those and reduce the overhead of having two that are basically the same.

@Calinou
Copy link
Member

Calinou commented Jun 14, 2023

In 4.0, the [img] tag supports defining a width and/or height. You can specify only a width to let the image scale automatically while preserving its aspect ratio.

The difference between [code] and [pre], if I'm not mistaken, is it that the last one preserves the indentation and spacing. Maybe [code] could, if it isn't already, handle those and reduce the overhead of having two that are basically the same.

RichTextLabel does not interfere with whitespace in any way, unlike HTML in general (which is why <pre> is needed there). I've documented this in godotengine/godot-docs#7512.

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

Successfully merging a pull request may close this issue.

5 participants