Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0004139Openbravo ERPA. Platformpublic2008-06-24 12:222009-12-02 11:18
pjuvara 
iciordia 
urgenttrivialhave not tried
acknowledgedopen 
5
 
pi 
Core
No
0004139: Unicode fonts in iReports
The chosen font for Jasper Reports for 2.40 only includes Western European characters. We need to replace it with one that includes Unicode characters as well.
Localization, ReleaseCandidate
blocks defect 0008550 closed jonalegriaesarte Non ROMAN fonts appear in Jasper Reports 
blocks design defect 0011514 acknowledged platform Unable to generate pdf report unsing Identity-H encoding 
? LegacyJasperInputStream.java (6,605) 2009-06-19 03:21
https://issues.openbravo.com/file_download.php?file_id=1439&type=bug
Issue History
2008-06-24 12:22pjuvaraNew Issue
2008-06-24 12:22pjuvaraAssigned To => cromero
2008-06-24 12:22pjuvarasf_bug_id0 => 2001616
2008-06-24 12:22pjuvaraTag Attached: ReleaseCandidate
2008-06-24 12:22pjuvaraStatusnew => acknowledged
2008-06-24 12:22pjuvaraStatusacknowledged => scheduled
2008-06-24 18:51pjuvaraPriorityhigh => urgent
2008-06-24 18:51pjuvaraSeveritymajor => trivial
2008-07-22 01:17cromeroAssigned Tocromero => pheenan
2008-10-28 10:56pjuvaraTarget Version2.50 => 2.60
2008-11-18 19:00pjuvaraCategoryF. Localization => A. Platform
2008-11-18 19:00pjuvaraTag Attached: Localization
2008-11-21 16:45pjuvaraStatusscheduled => acknowledged
2008-11-21 17:05pjuvaraTarget Version2.60 => trunk
2009-03-24 11:04AinhoaPagolaAssigned Topheenan => pjuvara
2009-03-24 12:16stalkerNote Added: 0014891
2009-04-22 14:38stalkerIssue Monitored: stalker
2009-04-23 16:07pjuvaraRelationship addedrelated to 0008550
2009-05-22 19:33pjuvaraAssigned Topjuvara => iciordia
2009-06-04 07:02pjuvaraNote Added: 0016933
2009-06-15 18:08stalkerNote Added: 0017328
2009-06-15 18:47iciordiaNote Added: 0017329
2009-06-15 23:45stalkerNote Added: 0017332
2009-06-19 03:20stalkerNote Added: 0017437
2009-06-19 03:21stalkerFile Added: LegacyJasperInputStream.java
2009-12-02 11:18rafarodaRelationship addedblocks 0011514
2009-12-02 11:18rafarodaRelationship replacedblocks 0008550

Notes
(0014891)
stalker   
2009-03-24 12:16   
hope, this will also help Russian localization...
(0016933)
pjuvara   
2009-06-04 07:02   
Please see also forum post:
http://forge.openbravo.com/plugins/espforum/view.php?group_id=100&forumid=549510&topicid=6996156 [^]
(0017328)
stalker   
2009-06-15 18:08   
the only applicable solution at the moment is to feed ALL jrxml Rreports with the following tag:
<reportFont name="foo" isDefault="true" pdfEncoding="Cp1251" pdfFontName="/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf"/>

right after <import> tags....

I couldn't manage the way to specify relative path in pdfFontName attrib.
Can anybody help?
(0017329)
iciordia   
2009-06-15 18:47   
Stalker,

please have a look to this post: http://forge.openbravo.com/plugins/espforum/view.php?group_id=100&forumid=549512&topicid=6993189 [^]

It seems that the relative path starts from "tomcat_home/yourOBContext/WEB-INF/classes".

Please let me know so we can prepare modularity in OB to properly include and deploy fonts in a module.

Thanks,

Ismael
(0017332)
stalker   
2009-06-15 23:45   
The above proposal seams to work for us!
Thank you, Ismael
(0017437)
stalker   
2009-06-19 03:20   
Here is a fix with a third party code (under GPL2.1).. which I adapted to have all existing reports speak Cyrillic.
install steps:
1. create dir structure OBroot/src/com/brunata/webbill/backend/reporting
2. put the attached file there
3. apply below patch
4. ant smartbuild
5. put appropriate font in WEB-INF/classes (LiberationSans-Regular.ttf in my case)
 
~/OpenbravoERP-2.50/src/org/openbravo/erpCommon/utility$ diff Utility.java Utility.java.orig
-----------
71,73d70
< import com.brunata.webbill.backend.reporting.LegacyJasperInputStream;
<
<
2128c2125
< String language, String baseDesignPath) throws FileNotFoundException, JRException {
---
> String language, String baseDesignPath) throws JRException {
2143,2144c2140
< // jasperDesign = JRXmlLoader.load(reportInputStream);
< jasperDesign = JRXmlLoader.load(new LegacyJasperInputStream(reportInputStream));
---
> jasperDesign = JRXmlLoader.load(reportInputStream);
2147,2148c2143
< // jasperDesign = JRXmlLoader.load(reportName);
< jasperDesign = JRXmlLoader.load(new LegacyJasperInputStream(new FileInputStream(reportName)));
---
> jasperDesign = JRXmlLoader.load(reportName);