Is jasper-font library (DejaVu font) useless ?

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

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: 2 years 4 months ago

0 Answers:

No answers yet