Hello,

is it possible to get the baseline y position of font as absolute value.
For example I have a Font with size 10pt then I want to know that the baseline y position is for example 3 pt. (Coordinate System like PDF)


I ask that, because I have the following problem:
I want to add Text in the position (0,0), but if I add this then the descending of a char like g is lost, because iText adds text to the baseline.


I thought the following will perhaps work. I get the maxAscending and maxDescending of the font by the method font.getFontDescriptor(BaseFont.ASCEND and BaseFont.DESCEND, SIZE_OF_FONT). I wanted to do the following calculation:

baseline_y_pos = (asc/desc) * fontsize

And this result will be my y-position, when I add the text to the pdf position (0,0). But there is the problem that maxAscend and maxDescend will probably never fill the complete font square (defined by units per em) and so I could not be sure that the ascent/descent ratio of the font is same as the ratio defined in the font by font square (defined by units per em) relation.

--
Best Regard and thanks for any comments in advance
Stefan Duffner




------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to