How to Instruct JasperReports to Use a Set of Fonts for a Certain Text

0

I'm working on a report that will display textual input from users. As the report is for Chinese users, we are not sure on whether the input will have commonly used Chinese characters or from the Ideographs Ext B. Most Chinese fonts have two different fonts to address this (e.g. MingLiu will have a MingLiu-Ext-B counterpart) and it seems that we can usually set ONE font per field. 

How can we make a field behave as if it's using CSS wherein it will prefer Font A first, then switch to Font B if it can't display a certain character (related: https://community.jaspersoft.com/questions/844026/multi-language-fonts-r...)? Is this even possible?

Another related question is: https://community.jaspersoft.com/questions/823048/chinese-font-ireport

I've tested a single report with different Chinese fonts (MingLiu, MingLiu_HKSCS, Ming for ISO, Wen Quan Yi Zen Hei, etc) and behavior when output to different document types. 

Excel seems to fare the best, with each of our 7 test cases displaying save for Ming for ISO font.

For PDF, even with Font Embedding, none of the font seems to display all of our test cases. Max number of test cases displayed by a single font is 3 out of 7. 

For DOCx, it still does not show all, but have more success with 5 out of 7 test cases successful for a single font (2 ext B test cases failed). But when I try to edit the output document and set the font of the ext-2b characters to that particular font, it suddenly shows correctly. 

cutebluangel's picture
Joined: Sep 23 2012 - 8:45pm
Last seen: 10 months 1 day ago

1 Answer:

0

We can use Font Sets it seems.

cutebluangel's picture
Joined: Sep 23 2012 - 8:45pm
Last seen: 10 months 1 day ago
Feedback
randomness