Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311867 - Non-ASCII characters not rendered correctly by Postscript emitter with standard fonts
Summary: Non-ASCII characters not rendered correctly by Postscript emitter with standa...
Status: CLOSED DUPLICATE of bug 308780
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 2.6.0 RC1   Edit
Assignee: Jun Ouyang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 08:47 EDT by Henning G Jensen CLA
Modified: 2010-05-12 01:49 EDT (History)
1 user (show)

See Also:


Attachments
Report with non-ASCII characters (2.69 KB, application/octet-stream)
2010-05-06 08:48 EDT, Henning G Jensen CLA
no flags Details
Genereated postscript result (30.41 KB, application/postscript)
2010-05-06 08:49 EDT, Henning G Jensen CLA
no flags Details
Snapshot from GSView (5.10 KB, image/png)
2010-05-06 08:53 EDT, Henning G Jensen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henning G Jensen CLA 2010-05-06 08:47:01 EDT
Build Identifier: 20090920-1017

Non-ASCII characters are not encoded according to the Postscript specification if used with a standard Postscript font. With a non-standard font they are rendered correctly.

The problem seems to lie in the method org.eclipse.birt.report.engine.emitter.postscript.PostscriptWriter.applyIntrinsicFont(String, int, float, String), which does not take encoding into account.

For a standard (intrinsic) font it generates something like this:
/Helvetica 18.0 usefont
0.0 0.0 0.0 18.54 721.476 0.0 0.0 (abc זרו - sans serif) false drawstring

For a non-standard font the output is a font definition (I think) and an encoded text:
/Century 18.0 usefont
0.0 0.0 0.0 18.54 695.505 0.0 0.0 <004400450046000300a000a1006e000300100003002600480051005700580055005c> false drawstring


Reproducible: Always

Steps to Reproduce:
1. Create a simple report and add a label that contains non-ASCII charaters (e.g. "זרו") and use a standard font, e.g., sans-serif (which becomes Helvetica). Create another label in the same way, but with a non-standard font. An example is attached
2. Render the report as postscript
3. View or print the file. The non-ASCII characters are not rendered correctly with the standard font
Comment 1 Henning G Jensen CLA 2010-05-06 08:48:32 EDT
Created attachment 167292 [details]
Report with non-ASCII characters
Comment 2 Henning G Jensen CLA 2010-05-06 08:49:33 EDT
Created attachment 167293 [details]
Genereated postscript result
Comment 3 Henning G Jensen CLA 2010-05-06 08:53:01 EDT
Created attachment 167294 [details]
Snapshot from GSView
Comment 4 Jun Ouyang CLA 2010-05-12 01:49:42 EDT
This is caused by the incorrect font mapping of Sans-serif, which should be mapped to a true type font, otherwise, the non-ascii characters can't be displayed.
Standard fonts can't be used to display non-ascii characters.
It was fixed with bug 308780.

*** This bug has been marked as a duplicate of bug 308780 ***