how do i add underline to text?

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

I am using an asset that has a custom label for unicode languages (Bengali, Thai, Hebrew, etc.) but it doesn’t have a custom RichTextLabel though, so i’m not sure how i could add an underline to it… is there any way to add bbcode without a RichTextLabel??

:bust_in_silhouette: Reply From: jgodfrey

I guess it depends on the asset you’re using (link?), though, if it’s not based on a RichTextLabel, you won’t have access to bbcode. Outside of that, the only thoughts I have are:

  • Find and use a font that includes the underline, though it’d underline the entire string I guess.
  • Add the underlines “manually” (on top of the label) via some other mechanism…

here’s the link Arabic Support - Godot Asset Library

perhaps i could use an animation player & a texture rect that underlines each word

pixeljp | 2023-07-06 20:23

Yeah, you’re right - that’s definitely based on Label, which doesn’t help you for this issue.

I guess how you choose to solve it depends on the details how you expect it to work / look.

If you’re considering adding the underlines by-hand, you might find something useful in the Custom drawing in 2D docs…

jgodfrey | 2023-07-06 20:33