我试过了
<textElement markup="html">
<font fontName="$P{contentFont}"/>
</textElement>并将Arial Unicode MS放在$P{contentFont}上,但iReport抛出:
Error filling print... Font '$P{contentFont}' is not available to the JVM.
See the Javadoc for more details.
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '$P{contentFont}'
is not available to the JVM. See the Javadoc for more details. 在net.sf.jasperreports.engine.fonts.FontUtil.checkAwtFont(FontUtil.java:347)上,
所以我猜没有办法在运行时预定义字体系列?有什么办法可以解决这个问题吗?
发布于 2015-06-29 20:18:46
有一个特性可以实现你想要的东西,
查看Jasper Report Style Templates
Jasper报表有font extensions,它支持一些字体,包括,
DejaVu Sans
DejaVu Serif
DejaVu Sans Mono如果你想使用Jasper Font Extesnions以外的字体,可以看看here。
希望这能有所帮助。
https://stackoverflow.com/questions/30987230
复制相似问题