Jump to content

Go to solution Solved by mrabbi,

Recommended Posts


I have upgraded from IReport 5.10 to Jasper Studio 5.5.5, how do I install a new font using a .jar file? I don't have the actual fonts only this file.

In IReport you could simply add it as a new classpath and it would appear in the fonts list, but I can't figure it out in Jasper Studio. Going to the font option you have to select the individual fonts and I don't know how to add the new class path

Any help would be highly appreciated.


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution


you can modify the Build-Path of your JasperReports project. Simple right-click on the project, I suppose you have "MyReports" default one, and hit "Properties".

After that choose "Java Build Path", tab libraries and 1) "Add Jars" if you can access them in the workspace 2) "Add External Jars" if they are located in the file system. 

This way you should be able to access the fonts. 

Moreover in the Jaspersoft Studio Preferences you can access the page "Jaspersoft Studio > Fonts" and from there add manually fonts if you will have to work with TTF files.

Hope this can help.
Best regards,

Link to comment
Share on other sites

  • 6 months later...

I am having the exact same issue. I did Project Properties ->Fonts --> Configure Workspace settings ->Add->

  1. True Type : C:tmpARIALN.TTF
  2. PDF Font Name : Left empty as none of the choices has arial narrow
  3. Embed this font in PDF doc : checked. 
  4. Everything else is default

Then applied my new font to a lable on my report and I keep getting this error:

at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction$1.run(AbstractExportAction.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: com.lowagie.text.DocumentException: Font '' with 'Cp1252' is not recognized.
at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2062)
at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1818)
at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1787)
at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:89)
at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:100)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2158)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:861)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:821)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:698)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:420)
at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction.exportWithProgress(AbstractExportAction.java:219)
at com.jaspersoft.studio.editor.preview.actions.export.AbstractExportAction$1.run(AbstractExportAction.java:119)
... 1 more
Caused by: com.lowagie.text.DocumentException: Font '' with 'Cp1252' is not recognized.
at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2051)
... 12 more
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...