Jump to content

Font extension occurs flickering problem on browsers

Recommended Posts

Hi gurus,

Could anyone help me to understand next behavior?

1. on server (Centos VM) installed font google-crosextra-

carlito-fonts.noarch (only this one contains necessary calibri font for my customer):
# yum search calibri
google-crosextra-carlito-fonts.noarch : Sans-serif font metric-compatible with Calibri font

# yum install google-crosextra-carlito-fonts.noarch
# ls -l /usr/share/fonts/google-crosextra-carlito
-rw-r--r-- 1 root root 816716 Sep 20 2013 Carlito-BoldItalic.ttf
-rw-r--r-- 1 root root 690516 Sep 20 2013 Carlito-Bold.ttf
-rw-r--r-- 1 root root 623416 Sep 20 2013 Carlito-Italic.ttf
-rw-r--r-- 1 root root 635996 Sep 20 2013 Carlito-Regular.ttf

"registered" new font in the system with command (but also reboot server):
# fc-cache -f -v

2. created simple report on Studio with some text fields (Blank_A4.jrxml)
3. added font Carlito-Regular.ttf (from Centos server) to Studio (see screen)
4. exported Carlito-Regular.jar file from Carlito-Regular.ttf copied to WEB-INF/lib folder; restarted application server + removed all caches from /temp & /work
5. added to report font extension, saved it and published to JRS

As result - on JRS it seems flickering problem during report execution. Please see screencast:

Tried to apply a few different font to the report (Blank_A4_2 & Blank_A4_3 on video) as well as calibri.ttf downloaded from internet - the same result (on Chrome, Firefox, IE).
It looks like report is first trying to load the some default font form OS and then the applied font from font family.

Will be appreciate for any help.


Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I think this problem usually arises because of the use of a custom font, I have experienced the same using a standard font and a custom font both for the same report and the custom font text shows, disppears and then re-appears. Can you please try using a standard font and see if the problem happens again on the same report?


Link to comment
Share on other sites

<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.4.2.final using JasperReports Library version 6.4.1  --><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" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f0d27607-3956-4a23-9f8a-92189b2e6fb7">    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>    <property name="ireport.jasperserver.url" value="http://hostanme:8080/jasperserver-pro/"/>    <property name="ireport.jasperserver.user" value="superuser"/>    <property name="ireport.jasperserver.reportUnit" value="/public/Blank_A4"/>    <property name="ireport.jasperserver.report.resource" value="/public/Blank_A4_files/main_jrxml"/>    <queryString>        <![CDATA[]]>    </queryString>    <background>        <band splitType="Stretch"/>    </background>    <title>        <band height="79" splitType="Stretch">            <staticText>                <reportElement x="0" y="0" width="555" height="79" uuid="aaffc397-2eb6-44d3-a25c-cf8eb1bc689f"/>                <textElement textAlignment="Center" verticalAlignment="Middle">                    <font fontName="Carlito-Regular" size="35"/>                </textElement>                <text><![CDATA[Report Title Text]]></text>            </staticText>        </band>    </title>    <summary>        <band height="90">            <staticText>                <reportElement x="0" y="20" width="555" height="70" uuid="9d1e7c46-dadd-42f5-af78-49f96bdecb75"/>                <textElement>                    <font fontName="Carlito-Regular" size="19"/>                </textElement>                <text><![CDATA[This is a test report. Ddddd PPPpppp CCCCCcccc.]]></text>            </staticText>        </band>    </summary></jasperReport>[/code]



Carlito-Regular.ttf you could get by commands:

# yum install google-crosextra-carlito-fonts.noarch

# cd /usr/share/fonts/google-crosextra-carlito

Link to comment
Share on other sites

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...