i just testet BaseFont.MACROMAN and compared the effect on german umlauts between:
this:
PdfGraphics2D g2;
...
BaseFont mybasefont = BaseFont.createFont(fontDir + "/" +
fontName+".ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
myfont = new com.lowagie.text.Font(mybasefont, 12f);
g2.setBaseFont(myfont.getBaseFont());
g2.setFontSize(myfont.size());
and that:
BaseFont mybasefont2 = BaseFont.createFont(fontDir + "/" + fontName +
".afm", BaseFont.MACROMAN, BaseFont.EMBEDDED);
myfont2 = new com.lowagie.text.Font(mybasefont2, 12f);
g2.setBaseFont(myfont2.getBaseFont());
g2.setFontSize(myfont2.size());and then
g2.drawString("abcdea€öäüÖÄÜ?ß ", 15.0f, 15.0f);but, it does NOT work for BaseFont.MACROMAN, the umlauts just don't appear in the output pdf.
Kind Regards Bodo
Paulo Soares schrieb:
It works for 256 chars at a time, that's why there's an encoding.
----- Original Message ----- From: "bodo teichmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, December 29, 2004 8:34 PM
Subject: [iText-questions] Re: type1 font and unicode
Hi, i don't understand how that should work. after all, java uses unicode, my text that contains those special chars are therefore encoded in unicode, but MACRoman is a different encoding i suppose, so how does the transcoding from java/unicode to MacRoman work? and if yes, does is work for all unicode characters , or are there any limitations ? Bodo
Paulo Soares schrieb:
You don't need unicode and can't have in T1 fonts. If you use BaseFont.MACROMAN you have access to those charactres.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bodo teichmann Sent: Tuesday, December 28, 2004 8:58 PM To: [email protected] Subject: [iText-questions] type1 font and unicode
hi, is there any possiblity to use unicode with type1 fonts ? the thing is: we only have type1 fonts but need to encode special unicode characters such as german ligatures "fl" and "fi" and others that are available only with unicode encoding. bodo
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
------------------------------------------------------- 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 [email protected] 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 [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
