xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh Balasubaramaniam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BATIK-1053) Text rendering of some Persian characters has issues when converting SVG to PNG
Date Mon, 11 Aug 2014 14:58:13 GMT

    [ https://issues.apache.org/jira/browse/BATIK-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092846#comment-14092846
] 

Ramesh Balasubaramaniam commented on BATIK-1053:
------------------------------------------------

is this issue occurs only in Unix/Linux ? Windows it is working fine ?. I am facing same issue
for Chinese characters. works fine in Windows but Linux give [][][] characters.

> Text rendering of some Persian characters has issues when converting SVG to PNG
> -------------------------------------------------------------------------------
>
>                 Key: BATIK-1053
>                 URL: https://issues.apache.org/jira/browse/BATIK-1053
>             Project: Batik
>          Issue Type: Bug
>          Components: SVG Rasterizer
>    Affects Versions: 1.7
>         Environment: OS: Ubuntu Linux 12.04 (3.2.0-44-generic #69-Ubuntu SMP Thu May
16 17:35:01 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux)
> Java: java version "1.7.0_21"
> OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1)
>            Reporter: Mostafa Mahdieh
>         Attachments: BatikPersianTest.zip, sample.png
>
>
> I am using Activiti Explorer 5.12.1, which uses batik transcoder 1.7 as a library. When
exporting bpmn models to png using Activiti Explorer, the output has issues on characters
"ی", "ک", "پ" and "گ". Note that theses characters are part of the Persian character set
of utf-8, and other characters which are in the common set of Arabic and Persian character
sets, don't seem to have any problems.
> I have attached a sample of one of my tests. The text in the box should read
> "ما کب گپ جیب جوب پا"
> which is incorrectly shown as
> "ما ک‌ب گ‌پ ج‌ی‌ب جوب پ‌ا"
> I traced the problem in Activiti Explorer code to this small code snippet:
> =======================
>       InputStream svgStream = new ByteArrayInputStream(modelForm.getFirstValue("svg_xml").getBytes("utf-8"));
>       TranscoderInput input = new TranscoderInput(svgStream);
>       
>       PNGTranscoder transcoder = new PNGTranscoder();
>       // Setup output
>       ByteArrayOutputStream outStream = new ByteArrayOutputStream();
>       TranscoderOutput output = new TranscoderOutput(outStream);
>       
>       // Do the transformation
>       transcoder.transcode(input, output);
>       final byte[] result = outStream.toByteArray();
> =======================
> It seems that the issues are coming from the PNGTranscoder not being able to render persian
text correctly. PNGTranscoder is part of Apache Batik (org.apache.batik.transcoder.image.PNGTranscoder).
> I have also created a very small eclipse project which does the same thing, independent
of any Activiti Explorer code, which helps a lot to debug the problem. The project is attached.
> More details:
> OS: Ubuntu Linux 12.04 (3.2.0-44-generic #69-Ubuntu SMP Thu May 16 17:35:01 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux)
> Java: java version "1.7.0_21"
> OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1)
> Batik version used by Activiti Explorer (found in the MANIFEST.MF of the jar file included):
1.7+r608262
> Regards



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message