Is jasper-font library (DejaVu font) useless ?


I think font extension is useless if the font is not installed on client, because if font "extension" is not installed, the print output is awful.

For example (before ensure you don't have the "DejaVu" font installed as windows font, If the font is installed, then it works perfectly):


<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version using JasperReports Library version 6.1.1  -->
<!-- 2015-10-23T14:30:24 -->
<jasperReport xmlns="" xmlns:xsi="" xsi:schemaLocation="" name="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7ee78a0a-3bca-4639-ac2f-edba39f77627">
        <band splitType="Stretch"/>
        <band height="79" splitType="Stretch">
                <reportElement x="10" y="10" width="171" height="51" uuid="62506953-cc8e-4d72-9247-4ab8dbccf9c0"/>
                    <font size="24"/>
                <text><![CDATA[Hello World]]></text>
                <reportElement x="240" y="10" width="191" height="51" uuid="2368c8a9-29af-4d06-a608-a5e1b67cdc54"/>
                    <font fontName="DejaVu Sans" size="24"/>
                <text><![CDATA[Hello World]]></text>

If you display in preview, it seems all ok, but when printed (for example on FinePrint):

public class Test {
    public static void main(String[] args) throws JRException {
        JasperPrint p = JasperFillManager.fillReport("src/test/Blank_A4.jasper", null, new JREmptyDataSource());
        JasperPrintManager.printReport(p, false);

The image is like this (the second "hello world" is printed in "DejaVu" font):'s picture
Joined: Sep 9 2015 - 6:39am
Last seen: 1 year 1 week ago

0 Answers:

No answers yet