marzieh.beiraghdar Posted February 2, 2015 Share Posted February 2, 2015 I am trying to add Tahoma font to jasper report in my web app. I use font extension mechanism.This exception was thrown: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'TahomaFont' is not available to the JVM. See the Javadoc for more details.Here is my font.xml file:<fontFamiles> <fontFamily name="TahomaFont"> <normal>export/fonts/BTahoma.ttf</normal> <pdfEncoding>Identity-H</pdfEncoding> <pdfEmbedded>true</pdfEmbedded> </fontFamily><fontFamiles>[/code]and here is my jasperreports.properties file :net.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactorynet.sf.jasperreports.extension.simple.font.families.TahomaFont=export/fonts/fonts.xml[/code]Also i have put Tahoma.ttf font file in my classpath. Here is the style tag in jasper report:<style fontName="TahomaFont" name="tahoma"/>[/code]Please let me know where i am going wrong. Thanks in advance. Link to comment Share on other sites More sharing options...
Ankur Gupta Posted February 4, 2015 Share Posted February 4, 2015 Hi , To run a new font in jasper server you need to place the Jar file (the font extension jar export ) at the location Navigate to your location on disk /apache-tomcat/webapps/jasperserver/WEB-INF/ (create a folder font) and place the jar here and restart the server tp get the new font in the jasper server.In the iReport you will need to add font from the option --> Fonts and add new font. Hope that this helps.I will be creating a video soon, will update on this link.ThanksAnkur Guptawww.ankurthetechie.blogspot.in Link to comment Share on other sites More sharing options...
hungncv.apt Posted November 9, 2019 Share Posted November 9, 2019 You put "Tahoma.tt"f font file in classpath , but you using "BTahoma.ttf" in font.xml.Let change them to the same. 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