The following program:
BaseFont bf = BaseFont.createFont("Courier", "winansi", false);
System.out.println(bf.getFontDescriptor(BaseFont.DESCENT, 10));
prints -1.57.
I was complaining about the java awt not iText. iText works well or at
least I know how it works.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of David Thielen
> Sent: Wednesday, April 21, 2004 3:55 PM
> To: 'itext'
> Subject: RE: [iText-questions]
> BaseFont.getFontDescriptor(BaseFont.ASCENT, fontSize) seems
> to be wrong
>
> The thing is, Courier does need to have a non-zero descent -
> gjqy - those
> four letters all descend below the baseline. Doesn't that make sense?
>
> Thanks - dave
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Paulo
> Soares
> Sent: Wednesday, April 21, 2004 3:55 AM
> To: David Thielen; itext
> Subject: RE: [iText-questions]
> BaseFont.getFontDescriptor(BaseFont.ASCENT,
> fontSize) seems to be wrong
>
> Those are the values returned by the font data. Only God
> knows where the
> values used by the java awt come from.
>
> Best Regards,
> Paulo Soares
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of David Thielen
> > Sent: Wednesday, April 21, 2004 6:55 AM
> > To: itext
> > Subject: [iText-questions]
> > BaseFont.getFontDescriptor(BaseFont.ASCENT, fontSize) seems
> > to be wrong
> >
> > Hi;
> >
> >
> >
> > I am comparing the values returned by TextLayout with
> > BaseFont.getFontDescriptor. I am doing this with 12 pt.
> > Courier New running
> > on Windows.
> >
> >
> >
> > Here is what I am getting
> >
> >
> >
> > BaseFont.getFontDescriptor
> >
> > ADVANCE: 7.3535156
> >
> > AWT_ADVANCE: 9.990234
> >
> > DESCENT: 0
> >
> > AWT_DESCENT: 0
> >
> > AWT_LEADING: 0
> >
> >
> >
> > TextLayout:
> >
> > Ascent: 9.95
> >
> > Descent: 3.6
> >
> > Leading: 0
> >
> >
> >
> > So AWT_ADVANCE seems to pat to TextLayout.getAdvance(). But
> > why is there the
> > big difference in descent values returned?
> >
> >
> >
> > Thanks - dave
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President
> and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> >
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions