aristedes.maniatis Posted October 29, 2012 Share Posted October 29, 2012 Many questions have previously been asked about fonts and JasperReports. This is a different set of issues to the ones usually asked.Problem1. Our application is a standalone, double-clickable application released for Linux, Windows and OSX. Report generation is integrated within the application and users are free to add additional reports of their own creation. The Windows app is bundled inside an .exe so adding items to the classpath is non-trivial.2. Printing directly to a printer works just fine with custom fonts we specify inside the jrxml file. We don't use the new font extensions at all.3. Printing to pdf via itext causes the font to be lost and some default Arial to be substituted. Why we can't use the Jasper font extension1. We want to use fonts located in the user's installed font location. This might be /Library/Fonts on a Mac for instance.2. Users cannot easy edit fonts.xml themselves since we can't easily put that file into the classpath3. Even if users were to create a copy of all their fonts, we need a mechanism to add them to the classpath programmatically. We don't know in advance which fonts they might like to use. Attempted solutions1. 'registering' fonts using the itext FontFactory.register(path) did not help2. Trying to programmatically add the font to the Jasper font extension registry was met with a problem because the getExtensions(type) method makes a copy of the font list and therefore we can't append to it. See http://grepcode.com/file/repo1.maven.org/maven2/net.sf.jasperreports/jasperreports/4.6.0/net/sf/jasperreports/extensions/DefaultExtensionsRegistry.java#103Does anyone have ideas on this? Link to comment Share on other sites More sharing options...
balizeiro_1 Posted November 6, 2014 Share Posted November 6, 2014 Did you managed to get a solution for this? 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