Is jasper-font library (DejaVu font) useless ?

0

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):

report:

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

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):

ddaitarn304@gmail.com's picture
Joined: Sep 9 2015 - 6:39am
Last seen: 1 month 4 weeks ago

0 Answers:

No answers yet
Feedback