Problem:
It's common in Japanese to have EUDC (End User Defined Characters, Gaiji) fonts. These are fonts defined for Unicode's private section starting at \uE000. It's not specific to Japanese... it's just that it's common in that language.
Normally this means there will be 2 fonts involved: MyStandardFont.ttf and MyEUDC.ttf.
In the case of a generated HTML report, JR simply puts the correct characters into the report. The browser then handles the magic of deciding that a character cannot be rendered in MyStandardFont, so it automatically uses MyEUDC which is presumably installed somewhere on the system.
But PDF poses a special problem. If you specify a text field with the font MyStandardFont then itext will not export the private characters because they do not have glyphs in that font.
Solution:
iText has a class/feature called FontSelector. This allows you to use multiple fonts as if they are one logical font. It would use MyStandardFont for all characters that it could, but then it would use MyEUDC for other fonts.
Complete solution:
I'm not really sure _how_ JR could add support for FontSelectors. But it seems that such a mechanism could be added.
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now