yazsaw7 Posted April 29, 2010 Share Posted April 29, 2010 I am trying to upgrade my jasper from 3.1 to 3.7.2Some of my reports are throwing an exception:net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Times-Roman' I have the jasper fonts available in my classpath (via maven) <artifactId>jasperreports-fonts</artifactId> But the jasper report export is not making the connection to the jasper font jar please help!thxjason Link to comment Share on other sites More sharing options...
lucianc Posted May 4, 2010 Share Posted May 4, 2010 The jasperreports-fonts jar contains the DejaVu fonts. If you want to use different fonts, you must package them yourself in font extension jars.Or you could set the net.sf.jasperreports.awt.ignore.missing.font property if you don't want errors on missing fonts.Regards,Lucian Link to comment Share on other sites More sharing options...
nicknxswart.nl Posted April 12, 2023 Share Posted April 12, 2023 @lucianc thanks for your reply.If I for example follow https://community.jaspersoft.com/wiki/custom-font-font-extension I cant get the custom front added there because of a bug in the jasper studio 6.20.1I created a jar file manualy but I do not if it's correct:The jasperreports_extension.properties looks like:net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactorynet.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactorynet.sf.jasperreports.extension.simple.font.families.calibri=net/sf/jasperreports/fonts/fonts.xml The font.xml like:<?xml version="1.0" encoding="UTF-8"?><fontFamilies><fontFamily name="Calibri"><normal>net/sf/jasperreports/fonts/calibri/calibri.ttf</normal><bold>net/sf/jasperreports/fonts/calibri/calibrib.ttf</bold><italic>net/sf/jasperreports/fonts/calibri/calibrii.ttf</italic><boldItalic>net/sf/jasperreports/fonts/calibri/calibriz.ttf</boldItalic><pdfEncoding>Identity-H</pdfEncoding><pdfEmbedded>true</pdfEmbedded></fontFamily></fontFamilies> And the fonts are also in the jar. I added this jar file to the WEB-INF/lib folder and restarted the server but if I run the report the font's are not working 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