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

How to change default font in Jasperreport maven dependancy to support chinese characters?


meryem.ben-nsir-ext

Recommended Posts

I'm trying to use  Arial Unicode MS in my jasperstudio-generated pdf files in my java web application. However, I get this error : 

net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font: pdfFontName: Arial Unicode MSpdfEncoding: Identity-HisPdfEmbedded : false

here's what I have in my jasperreports_extenstions.properties :

net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.extensions.SpringExtensionsRegistryFactorynet.sf.jasperreports.extension.fonts.spring.beans.resource=fonts/fonts1284146005640.xml[/code]

however when I look at the jasperreports jar file in my java app, I find this  in the jasperreports-fonts.xml file : 

<?xml version="1.0" encoding="UTF-8"?><fontFamilies>    <fontFamily name="JasperReports Icons" visible="false">        <normal>            <ttf>net/sf/jasperreports/fonts/icons/icons.ttf</ttf>            <svg>net/sf/jasperreports/fonts/icons/icons.svg</svg>            <eot>net/sf/jasperreports/fonts/icons/icons.eot</eot>            <woff>net/sf/jasperreports/fonts/icons/icons.woff</woff>        </normal>        <pdfEncoding>Identity-H</pdfEncoding>        <pdfEmbedded>true</pdfEmbedded>    </fontFamily>    <!--         Deprecated and no longer used. Kept for backward compatibility with persisted        generated reports in JasperPrint or JRPXML format.    -->    <fontFamily name="Pictonic" visible="false">        <normal>            <ttf>net/sf/jasperreports/fonts/icons/icons.ttf</ttf>            <svg>net/sf/jasperreports/fonts/icons/icons.svg</svg>            <eot>net/sf/jasperreports/fonts/icons/icons.eot</eot>            <woff>net/sf/jasperreports/fonts/icons/icons.woff</woff>        </normal>        <pdfEncoding>Identity-H</pdfEncoding>        <pdfEmbedded>true</pdfEmbedded>    </fontFamily></fontFamilies>[/code]


I feel like it looks for the Arial font but it doesnt find it, how can I fix this ? 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...