Jump to content
Changes to the Jaspersoft community edition download ×

Is jasper-font library (DejaVu font) useless ?


ddaitarn304gmail.com

Recommended Posts

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>[/code]

 

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);    }}[/code]

The image is like this (the second "hello world" is printed in "DejaVu" font):

jasperfont.png.fc55b8bb4add9940a7ecd723afa5e648.png

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...