How to scale image inside richTextLabel

Godot Version

4.4

Question

Hello, I want to make a text that includes resource icon inside it. I do not want to make separate containers for texture and text , because I want the end result to be 1 sentence.

What should I do to make the image scale to the size of the font ?

I don’t know how to do it with text but the function RichTextLabel.add_image() allows you to specify image dimensions, in case that helps

1 Like

Check this table to see which formatting can the [img] tag have.

For example, you can set the width like [img=32]...[/img] or you can use the different image options inside the tag like [img height=32]...[/img]

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.