shayl.voss Posted November 13, 2013 Share Posted November 13, 2013 Hi,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 pathAny help would be highly appreciated.Thanks Link to comment Share on other sites More sharing options...
Solution mrabbi Posted November 15, 2013 Solution Share Posted November 15, 2013 Hi,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,Massimo. Link to comment Share on other sites More sharing options...
shayl.voss Posted November 18, 2013 Author Share Posted November 18, 2013 Excellent, thanks for the answer Link to comment Share on other sites More sharing options...
haidar_hadi_205 Posted May 31, 2014 Share Posted May 31, 2014 I am having the exact same issue. I did Project Properties ->Fonts --> Configure Workspace settings ->Add->True Type : C:tmpARIALN.TTFPDF Font Name : Left empty as none of the choices has arial narrowEmbed this font in PDF doc : checked. Everything else is defaultThen applied my new font to a lable on my report and I keep getting this error:java.lang.reflect.InvocationTargetExceptionat 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 moreCaused 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now