Jump to content
We've recently updated our Privacy Statement, available here ×

Bold/Italic Unicode MS


mcdermotc

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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:

Map fontsMap = new HashMap();
map.put(new FontKey("Arial Unicode", true, false), new PdfFont("ArialUnicode.ttf", "Cp1252", embedded, true, false));
map.put(new FontKey("Arial Unicode", false, true), new PdfFont("ArialUnicode.ttf", "Cp1252", embedded, false, true));
//etc
pdfExporter.setParameter(JRExporterParameter.FONT_MAP, fontsMap);

 

HTH,

Lucian

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...