0

I'm trying to add some extra fonts to my application war to use them with Jasper Reports plugin.
I've followed this answer to add font files to my application and made it work with absolute paths for font files. However, I can't make it work with relative paths, so I have to have a different jasper_fonts.xml config file for different deployments, which is no good.

I have an appname/web-app/fonts directory in my grails project which is deployed as appname/fonts in Tomcat6, but if I set font path in jasper_fonts.xml to fonts/font.ttf I get an InputStreamNotFound exception. What am I doing wrong here?

Community
  • 1
  • 1
svz
  • 4,516
  • 11
  • 40
  • 66
  • are you using ireport to make your jrxml file? – user1791574 Nov 07 '13 at 10:49
  • 1
    http://stackoverflow.com/questions/19218380/show-newly-installed-font-in-jasper-report-from-grails-in-pdf-format/19218876#19218876 follow this link to set your font in ireport. – user1791574 Nov 07 '13 at 11:29
  • @user1791574, that might help, but it's not exactly what I need. The described method requires installation of fonts into system where app is deployed and I want a fully operational war. The problem is in relative paths. – svz Nov 07 '13 at 12:14
  • Have you installed desired font in your system ? Also post your full stacktrace to understand problem in better way... – user1791574 Nov 07 '13 at 12:19
  • @user1791574, No, I haven't installed them and that is the reason for the question. I need jasper to use font files specified in `jasper_fonts.xml`. When I specify absolute paths to fonts, it works, but I can't make it work with relative paths. – svz Nov 08 '13 at 06:54
  • you do not need to provide absolute path. Just install your font in system. are you using linux or windows to develop your application. – user1791574 Nov 08 '13 at 07:04
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/40800/discussion-between-svz-and-user1791574) – svz Nov 08 '13 at 07:26

0 Answers0