RTF Area and Fonts

Hi

I want to use an field as RTF Area with a specific font. This works fine untill I want to generate an report (JasperReports) with an field that has the property markup rtf. Then the problem is the report is not able to find the font. It is an OTF-Font (TheSansOsF). And the font is defined with elements.elementName.setFont(TheSansOsF);

Has anybody the same problem? Or an solution for this problem?

Regards, Stef

stefbrt:
It is an OTF-Font (TheSansOsF). And the font is defined with elements.elementName.setFont(TheSansOsF);

Did you already install this font as font extension in Jasper?

if not: iReport > preferences > iReport > Fonts

  • after that move the extension.jar to the server plugins folder
  • add the extension.jar to the jnlp file
  • restart server

Hope this helps…

I have the font installed in a jar file in the plugin an it is deployed to the client.

So this is not the Problem.

The Error is:

2011-08-19 14:53:27,398 ERROR [RMI TCP Connection(113)-172.29.200.62] net.sf.jasperreports.engine.fill.JRFillSubreport - Fill 2079447581: exception
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'The Sans-' is not available to the JVM. See the Javadoc for more details.
	at net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358)
	at net.sf.jasperreports.engine.util.JRStyledText.getAwtAttributedString(JRStyledText.java:226)
	at net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:362)
	at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:1130)
	at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:540)
	at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
	at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)
	at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:378)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2038)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
	at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:609)
	at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
	at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)
	at java.lang.Thread.run(Unknown Source)