Hello,
Paulo thank you for your quick answer, but I have still one question. What do the values mean, that I get for BBOXLLY and BBOXURY (you mean probably this key as second value) ? If I print those values to my console, then I get for Arial 10pt the following value:
BBOXLLY: -3.2470703
BBOXURY: 10.371094,
which are more than 10pt max. height a glyph of than font can have. Or are those values are only relative values to baseline and dont mean -3.2.. pt below baseline, for example ?
Thank you in advance
Best Regards, Stefan Duffner
Paulo Soares wrote:
Use the BBOXLLY and the BBOXURY to get the limits. The values are all relative to the baseline.
Best Regards, Paulo Soares
----- Original Message ----- From: "Stefan Duffner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 16:17
Subject: [iText-questions] baseline of Fonts
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
-- Mit freundlichen Gr�ssen Stefan Duffner
P.S.: Holen Sie sich 100 Euro! Wechseln Sie bis sp�testens zum 30.09.2004 zur DIG und Sie erhalten beim Abschluss eines DIG SDSL Internetnutzungsvertrages einen Einkaufsgutschein, im Wert von 100,00 Euro in einem Mediamarkt Ihrer Wahl. Mehr Informationen finden Sie unter www.dig.de!
********************************************* DIG Digitale Medienberatungs- und Produktions- GmbH Neckarstrasse 1-5, D-78727 Oberndorf, Germany Phone: +49 7423 8750-0 Fax: +49 7423 8750-23 mailto:[EMAIL PROTECTED] http://www.dig.de
------------------------------------------------------- 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
