Bold/Italic Unicode MS

Greetings,
I am generating reports in 9 different languages, so for simplicity I am using the Arial Unicode MS font for everything, which contains all characters I could possibly need.

The problem arises when I try to bold or italicize the font for export to a pdf. I can either use the Arial Bold fonts etc. - at which point none of my special characters show up - or I can stick with the Unicode MS, but all the bold/italic formatting is ignored.

Is there any way around this? Thanks in advance.
mcdermotc's picture
Joined: Sep 14 2006 - 6:07am
Last seen: 3 years 11 months ago

2 Answers:

I have the same problem. Somebody know how to solve this problem?
Apolo's picture
425
Joined: Sep 7 2006 - 8:06pm
Last seen: 3 years 7 months ago
If you don't want to use bold/italic PDF fonts, you can use the FONT_MAP export parameter to instruct the PDF exporter to "simulate" bold/italic fonts.

Your code should be something like this:
Code:
<br />
Map fontsMap = new HashMap();<br />
map.put(new FontKey("Arial Unicode", true, false), new PdfFont("ArialUnicode.ttf", "Cp1252", embedded, true, false));<br />
map.put(new FontKey("Arial Unicode", false, true), new PdfFont("ArialUnicode.ttf", "Cp1252", embedded, false, true));<br />
//etc<br />
pdfExporter.setParameter(JRExporterParameter.FONT_MAP, fontsMap);<br />
</td></tr></tbody></table><br />
<br />
HTH,<br />
Lucian
lucianc's picture
86875
Joined: Jul 17 2006 - 1:10am
Last seen: 1 hour 19 min ago
Feedback