Well, in the beginning of my project, I looked for a way to convert my awt Font in itext Font, and the only way I found was using method awtToPdf of DefaultFontMapper class, probably it was in this mailing list that I have known that method.
Till now, that method has always worked fine for me, my user can specify a Font awt, and the final rendered pdf show text correclty with the converted right itext font. But now, my user, has let me know that while rtf prints correclty arabic and asian (my software produces both rtf and pdf using where it is possible the same code, it was originally this feature that I like in itext), pdf doesn't work with those languages. To use poor words in my code the word Graphics2D and PdfGraphics2D ever appears, and so, at this point, as you say I'm wrong, then: 1) How is the right way to covnert awt font in itext font? 2) I have an input string that can be in any charset, can be from english to arabic to chinese and so on, I'm only asking which is the way in itext pdf to print that string. The flow in my software starts from an xml, in which there can be froma simple paragraph to a complex table, I must be able to use every element, either Paragraph either PdfPTable to show the right content just as RTF fantastically already does. >From javadoc of FontMapper: A FontMapper implementation handles mappings between AWT Fonts and PDF fonts. An interface is used instead of a fixed class because there isn't an exact correlation between the font types, so each application is free to define a mapping which is appropriate for it. In that javadoc too there isn't mention of PdfGraphics2D. Best regards. Raffaele -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of 1T3XT info Sent: lunedì 14 aprile 2008 14.57 To: Post all your questions about iText here Subject: Re: [iText-questions] Asian and Arabic text GAMBELLI Raffaele wrote: > Sorry Paulo and Bruno, I don't understand your answer: > Why should I draw glyph shapes instead of using a PDF font? If you are using Graphics2D, you should draw glyph shapes. If you are not using Graphics2D, go back to my initial answer. > Why have you written about Graphics2D? Because in your original mail, you say: "I did the following method: private Font awtToItextFont(java.awt.Font awtFont) { DefaultFontMapper mapper = new DefaultFontMapper();" Why on earth would you need the DefaultFontMapper if you're not using PdfGraphics2D? Nowhere in chapter 8 or 9 is there any mention of DefaultFontMapper; only in chapter 12. > I don't use it, I have awt Font that have to transform in itext Font Er... now you've lost me. You'll have to explain because what you say doesn't make sense to me. I'm sure I'm missing something, please clarify. -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
