Text space occupation

Help
veej
2013-05-27
2013-05-27
  • veej
    veej
    2013-05-27

    Hi!
    For layout purposes in PDF creation, I would like to evaluate in advance the space (width and height) needed by a text given a font, the text size, the frame size and whether to apply the hyphenation or not.
    Is there something like the Font.getWidth() method that allow me to evaluate width and height occupied by a text? is there a way to achieve the same goal using information provided by the library?
    Thank you in advance.