Unicode Currency Symbols not rendering in BIRT pdf

Hi, we need help with getting the Costa Rican Colon, South Korea Won, Philippine Peso, and Indian Rupee currency symbols to display when running a BIRT pdf report. Within our .rptDesign we have 5 Text Items (HTML Dynamic Text) that contains a Unicode to display currency symbols. Out of the 5 currency symbols none of them display except for the Israeli Shekel (₪). Please see the attachment for the list of currency symbols and unicodes.


 


We are running BIRT 3.7.2 on Red Hat Enterprise Linux Server release 6.9 (Santiago). We have two rpm of fonts that are installed with tomcat rpm, msttcorefonts-2.5 and fonts-chinese-3.02.  The fonts have not been updated in long time, so we updated to the latest 2.6.1 version; https://sourceforge.net/projects/mscorefonts2/files/ and rpm


https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm


 


The font package that was installed (http://corefonts.sourceforge.net/ 2.5.1) , BIRT font configuration


 


<font>


       <font-paths>


        <path path="/usr/share/fonts/msttcorefonts" />


              <path path="/usr/share/fonts/default/Type1" />


       </font-paths>


       <!--


       Not All Chinese Characters Displaying in report


              - Overriding the all-fonts BIRT report configuration to use Simplified Chinese (STSong-Light)


                font encoding catalog instead of Traditional Chinese (MSung-Light).


              - BIRT's default PDF font configuration is in plugins\org.eclipse.birt.report.engine.fonts\fontsConfig_pdf.xml


              - BIRT bug (Bug 427672)


       -->


       <composite-font name="all-fonts">


              <font font-family="Times-Roman" catalog="Western" />


              <font font-family="STSong-Light" catalog="Chinese" />


              <font font-family="HeiseiKakuGo-W5" catalog="Japanese" />


              <font font-family="HYGoThic-Medium" catalog="Korean" />


       </composite-font>


</font>


 


The debugging we did like echo –e “<<Unicode>>” to confirm the character is available in OS, but not getting rendered in BIRT.


 


Would anyone know why none of the symbols display except for Israeli Shekel (&#8362;) and how can we get the other currency symbols display when rendering the report in pdf? Thanks!


Comments

  • Can you attach a sample .rptdesign with those symbols?  What font is used in the .rptdesign?


     


    When you generate this report and view the report as PDF *from the Designer*, are you seeing the expected results?  What OS do you run the Designer on?


     


    Where did you modify the "fontsConfig.xml" file in your RHEL server environment?


     


    Can you attach the fontsConfig.xml you have in your server environment?


     


    Can you also attach the resulting PDF generated from your server environment?


    Clement Wong
    Principal Analytics Architect

    OpenText Corporation
    http://www.actuate.com | http://www.opentext.com

  • I have attached the .rptDesign file. You will see two grids and each grid will have 6 rows. The first row has a string column (data binding) to display the java source code values and the remaining 5 rows are dynamic text item (HTML) for each Unicode. The first grid uses Arial font and the second grid uses Times New Roman font.


     


    When I generate the report and view the report as PDF *from the Designer*, I see all currency symbols for both the data binding and text items. Please see the attachment "Preview from the BIRT Designer.pdf". I'm running Windows 7 Enterprise.


     


    However, when generating the report from the server environment only the Israeli Shekel currency symbol displays for both the data binding and text items in both fonts. Please see the attachment “Preview from the Server Environment.pdf”.


     


    I’m working on getting the information for the “fontsConfig.xml”.


  • We didn’t modify the default fontsConfig.xml found in BIRT Runtime JAR. Instead we specify the Font configuration when initializing BIRT ReportEngine. The following is the way we override the font configuration file. Please find the attached font config xml.


     


    Thanks.



    EngineConfig engineConfig = new EngineConfig();
                   
    String fontConfigPath = ReportingUtils.getFontsConfigFilePath();
    logger.info( String.format( "Fonts configuration file path: %s ", fontConfigPath ) );
    engineConfig.setFontConfig( new URL( fontConfigPath ) );
                   
    reportEngineFactory = (IReportEngineFactory)Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
    reportEngine = reportEngineFactory.createReportEngine( engineConfig );

Sign In or Register to comment.