I've no idea what's going on. I create a dummy BufferedImage to create the FontMetrics so, it's all internal to the jdk. I noticed that I was not using fractional metrics there but after changing it the result was the same. I'm out of options.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Greg Steckman > Sent: Friday, August 19, 2005 3:03 AM > To: Paulo Soares > Cc: [email protected] > Subject: Re: [iText-questions] Font rendering problem with > Graphics2D and large scale factors > > Thanks for the fast fix. I've noticed some of the font bounds > are coming > back as 0, for example from the call: > > g2.getFontMetrics().getMaxCharBounds(g2).getHeight() > > but when I render to the screen they are non-zero. This is > throwing off > some of my text positions in the PDF. Is there a general > workaround to > this? I guess it's the rounding you referred to. > > Thanks, > > Greg > > > > > Paulo Soares wrote: > > >This is not really a bug as very small font sizes are in > many places rounded > >to zero but in any case I fixed iText to accept it. The fix > is in the CVS. > > > >----- Original Message ----- > >From: "Greg Steckman" <[EMAIL PROTECTED]> > >To: <[email protected]> > >Sent: Thursday, August 18, 2005 9:37 PM > >Subject: [iText-questions] Font rendering problem with > Graphics2D and large > >scale factors > > > > > > > > > >>I'm rendering to a Graphics2D and the font output is not correct. I > >>believe it is because I am using a large scale factor and > small values > >>for font size, positions, etc. Attached is the example from > the web site > >>(the one that draws a pear) with the modification that the scale has > >>been set to 2834.646, and the position and size values > correspondingly > >>reduced. The attached PDF created by this code has the > correct rendering > >>of the pear, but the string "Pear" printed above it has the letters > >>written on top of each other. > >> > >>I'm using the scale 2834.646 because 1 unit corresponds to > 1 meter in > >>output space, and is convenient for drawing things to scale. > >> > >>Is this a bug with iText, a limit in the PDF format's precision, or > >>something else? > >> > >>Thanks, > >> > >>Greg > >> > >> > >> > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development > Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * > Testing & QA > Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
