Go Back   Forum - BIRT Exchange > Deploying Reports Forums > Deploying BIRT Reports in Deployment Kit or iServer Express

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-13-2010, 03:31 PM
Junior Member
 
Join Date: Mar 2009
Posts: 4
Unhappy Using ARIALUNI font with bold style

Hi,

I'm working on a report that is deployed in multiple localized versions. We purchased the AscenderFonts' ARIALUNI True Type font, and we have modified the fonts_config to include it in the designer and the runtime.

While the ARIALUNI fonts provide excellent coverage for many locales, we got complaints from users about the header (which were using BOLD attribute). After some debugging, we narrowed the problem to the fact the the ARIALUNI font does not have pre-defined BOLD (and ITALIC) variants. Instead the itext package is using "simulated" bold (using wide stroke for the drawing the outline).

Most other fonts (Helvetica, Times, ...) have hand-crafted Bold variant - that looks much better that ARIALUNI

The source of the bad headers seems to the the values that is used for the simulated bold (simulateBold in the org.eclipse.birt.report.engine.emitter.pdf plugins, under: src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java).

The original version is using a LineWidth of 0.9 (see below). Replacing the 0.9 with 0.2 created a much nicer output for English characters, and a readable output for eastern languages (Japanese, Korean, ...).

private void simulateBold( PdfContentByte cb )
{
cb.setTextRenderingMode( PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE );
cb.setLineWidth( 0.9f );
cb.setTextMatrix( 0, 0 );
}

My questions:

1. Does anyone know how to modify that code so that it can take the "Weight" level parameter from the css/style, and use it to decide on the value. e.g. Currently, any number between 100-900 can be entered (as well as "Bold", "Light"). The ideal solution will use the value (probably LineWidth= bold/600.)

2. How can the change be submitted into the baseline BIRT ? Is there a developer that can take make the simple change and integrate it into future BIRT version.

If parameterization is hard, may be one can use a configuration parameter, system property or similar to override the setting. It will be nice to support the same logic to the "Italic" option (which is using hard-coded constants EmitterUtil.ITALIC_HORIZONTAL_COEFFICIENT).

Any suggestion will be appreciated.

Yair

Last edited by YairLenga : 01-14-2010 at 06:11 AM.
Reply With Quote
  #2 (permalink)  
Old 01-22-2010, 01:59 AM
Junior Member
 
Join Date: Sep 2008
Posts: 4
Default

Currently BIRT doesn't provide a way to customize the simulation of BOLD/ITLIC font, you can create a enhancement entry for this issue on
https://bugs.eclipse.org/bugs/enter_...ification=BIRT
You also could attach you patch, it should be welcome.
Quote:
Originally Posted by YairLenga View Post
Hi,

I'm working on a report that is deployed in multiple localized versions. We purchased the AscenderFonts' ARIALUNI True Type font, and we have modified the fonts_config to include it in the designer and the runtime.

While the ARIALUNI fonts provide excellent coverage for many locales, we got complaints from users about the header (which were using BOLD attribute). After some debugging, we narrowed the problem to the fact the the ARIALUNI font does not have pre-defined BOLD (and ITALIC) variants. Instead the itext package is using "simulated" bold (using wide stroke for the drawing the outline).

Most other fonts (Helvetica, Times, ...) have hand-crafted Bold variant - that looks much better that ARIALUNI

The source of the bad headers seems to the the values that is used for the simulated bold (simulateBold in the org.eclipse.birt.report.engine.emitter.pdf plugins, under: src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java).

The original version is using a LineWidth of 0.9 (see below). Replacing the 0.9 with 0.2 created a much nicer output for English characters, and a readable output for eastern languages (Japanese, Korean, ...).

private void simulateBold( PdfContentByte cb )
{
cb.setTextRenderingMode( PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE );
cb.setLineWidth( 0.9f );
cb.setTextMatrix( 0, 0 );
}

My questions:

1. Does anyone know how to modify that code so that it can take the "Weight" level parameter from the css/style, and use it to decide on the value. e.g. Currently, any number between 100-900 can be entered (as well as "Bold", "Light"). The ideal solution will use the value (probably LineWidth= bold/600.)

2. How can the change be submitted into the baseline BIRT ? Is there a developer that can take make the simple change and integrate it into future BIRT version.

If parameterization is hard, may be one can use a configuration parameter, system property or similar to override the setting. It will be nice to support the same logic to the "Italic" option (which is using hard-coded constants EmitterUtil.ITALIC_HORIZONTAL_COEFFICIENT).

Any suggestion will be appreciated.

Yair
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 05:53 AM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0