Text Node height (SOLVED)

Hi,

I have a text node with dynamic text on it (line break is on).
Is there a way to know the height of the node once the text is set?

Thanks.

No, there is currently no way of knowing the height. gui.get_text_metrics() returns a lot of useful information, but unfortunately not height. There is a ticket for this in our backlog.

2 Likes

Actually, gui.get_text_metrics() returned me the height of the text, so that´s what I wanted :slight_smile:

Thanks

2 Likes

Ah, yes, you’re right! It was added in 1.2.75: Defold 1.2.75 has been releasen

@sicher, the documentation doesn’t reflect this change.

2 Likes

Thanks. The height field is mentioned in the docs now.

1 Like