| Issue 220: | correct display of Russian characters when exporting to pdfp of jmesa | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Good day! I agonized for a long time, trying to make the correct display of Russian characters when exporting to pdfp of jmesa. And, finally, editing the source code jmesa, I realized that the file PdfPView.java in the method getFontWithColor need to pass a string BaseFont.IDENTITY_H, but not fontEncoding. I decided that showing export.pdf.fontEncoding = Identity-H in my jmesa.properties file.
Oct 22, 2009
Is it working for you now? If so then what I need to do is make sure that the feature is documented! Thank you for the code snippet. I will include that as well, as I could see that offering a lot of clarity to why the fontName and fontEncoding is necessary.
Status:
Accepted
Nov 5, 2009
Yes, it works now. Since I need to create a Unicode font, but it creates only when the encoding is equal to line "IDENTITY_H" or "IDENTITY_V", then we have to specify the encoding as these lines! I think this is a iText error.
Mar 10, 2011
(No comment was entered for this change.)
Status:
Invalid
|
I found the file in the library iText BaseFont.java this code: if (nameBase.toLowerCase().endsWith(".ttf") || nameBase.toLowerCase().endsWith (".otf") || nameBase.toLowerCase().indexOf(".ttc,") > 0) { if (encoding.equals(IDENTITY_H) || encoding.equals(IDENTITY_V)) fontBuilt = new TrueTypeFontUnicode(name, encoding, embedded, ttfAfm, forceRead); else { fontBuilt = new TrueTypeFont(name, encoding, embedded, ttfAfm, false, forceRead); fontBuilt.fastWinansi = encoding.equals(CP1252); } } If encoding is not equal to line "IDENTITY-H" or "IDENTITY-V", it is created non- Unicode font, and so the Cyrillic characters are displayed incorrectly.