How to get width and height of a string?

I need to position numbers on 2D space so I wonder if is possible to get the width and height out of a string or int? if so how?

Any help will be much appreciated

if you are using a truetype font:


will return an ofRectangle with the w and h

Muchas gracias!