Eric Summkeller wrote:
> But I have still one question. How can I get the information how much the 
> offset has to be? I mean how can I get the coordinates where the underline 
> starts.

iText already does this for you:

float fontSize = chunk.font().size();
float ascender =
   chunk.font().getFont().getFontDescriptor(BaseFont.ASCENT, fontSize);
float descender =
   chunk.font().getFont().getFontDescriptor(BaseFont.DESCENT, fontSize);

The font provides the values for ASCENT and DESCENT.
If you want to fine tune this, you'll have to dig into
the font and hope the metrics you need are available.

br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to