bodo
Paulo Soares schrieb:
My objective was to match the awt and pdf spacing.
----- Original Message ----- From: "Bill Ensley" <[EMAIL PROTECTED]>
To: "iText Mail Group" <itext-questions@lists.sourceforge.net>
Sent: Friday, January 07, 2005 6:48 PM
Subject: RE: [iText-questions] Re: why is PdfGraphics2D using cb.showText(s)
instead of cb.showTextKerned(s) ?
Thank you for your efforts, I tried it and it looks good for the PDF, but my problem is in AWT and SWING itself and how they measure text. iText has much more control. :(
Bill Ensley Bear Printing
-----Original Message----- From: Paulo Soares [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 10:04 AM To: Bill Ensley Subject: RE: [iText-questions] Re: why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
I posted a solution but the mailing list is really slow. Try this.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Ensley Sent: Friday, January 07, 2005 4:44 PM To: iText Mail Group Subject: RE: [iText-questions] Re: why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
I may be mistaken, but iText uses Fractional Metrics on fonts by default?
Of course this is good, but AWT and Swing fart on Fractional Metrics.
I have successfully overridden methods in View that measure the text and now have a Fractional Metrics JTextPane that outputs to iText almost exactly as seen on the screen.
There is quite a bit of code to modify, so I won't post it all here, but if anyone is interested I will be glad to forward along what I have learned.
Bill Ensley Bear Printing
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of bodo teichmann Sent: Friday, January 07, 2005 3:51 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Re: why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
BTW: javas Graphics2D.drawString() unfortunantely ignores kerning(). but for kerning, you can correct the the glyph position by hand: first call Font.createGlyphVector() then use kering table from the font and correct the glyph positions with the value from the kering table, then call Graphics2D.drawGlyphVector(). Bodo
Paulo Soares schrieb:
Perhaps next week. I have a couple of ideas.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Ensley Sent: Thursday, January 06, 2005 8:40 PM To: iText Mail Group Subject: RE: [iText-questions] why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
Is there any way to make the AWT and PDF Spacing match closer?
Bill Ensley Bear Printing
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Paulo
Soares Sent: Thursday, December 30, 2004 6:52 AM To: bodo teichmann; itext-questions@lists.sourceforge.net Subject: RE: [iText-questions] why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
It's a design option. The pdf and the awt spacing will not match in any case.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bodo teichmann Sent: Thursday, December 30, 2004 1:23 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] why is PdfGraphics2D using cb.showText(s) instead of cb.showTextKerned(s) ?
just wondering ,why PdfGraphics2D seems to ignore the font's kerning ? and why does it use FontMetrics fm = getFontMetrics(); double width = fm.stringWidth(s); instead of this: double mywidth = baseFont.getWidthPointKerned(s,fontSize); or double mywidth = baseFont.getWidthPoint(s,fontSize);
bodo
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well,
almost....http://www.thinkgeek.com/sfshirt
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well,
almost....http://www.thinkgeek.com/sfshirt
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well,
almost....http://www.thinkgeek.com/sfshirt
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well,
almost....http://www.thinkgeek.com/sfshirt
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions