Return-Path: X-Original-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Delivered-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E23CC7BD for ; Tue, 12 Aug 2014 07:21:12 +0000 (UTC) Received: (qmail 97220 invoked by uid 500); 12 Aug 2014 07:21:12 -0000 Delivered-To: apmail-xmlgraphics-batik-dev-archive@xmlgraphics.apache.org Received: (qmail 97178 invoked by uid 500); 12 Aug 2014 07:21:12 -0000 Mailing-List: contact batik-dev-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-dev@xmlgraphics.apache.org Delivered-To: mailing list batik-dev@xmlgraphics.apache.org Received: (qmail 97100 invoked by uid 99); 12 Aug 2014 07:21:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 07:21:11 +0000 Date: Tue, 12 Aug 2014 07:21:11 +0000 (UTC) From: "Pascal Sancho (JIRA)" To: batik-dev@xmlgraphics.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BATIK-1053) Text rendering of some Persian characters has issues when converting SVG to PNG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BATIK-1053?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1409= 3837#comment-14093837 ]=20 Pascal Sancho commented on BATIK-1053: -------------------------------------- This issue is due to the lake of support of complex script in BATIK. So, it is platform independent. Note that Glenn Adam is porting his work on complex script to BATIK, but I = can't tell you when this will be available. > 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 ou= tput has issues on characters "=DB=8C", "=DA=A9", "=D9=BE" and "=DA=AF". No= te that theses characters are part of the Persian character set of utf-8, a= nd other characters which are in the common set of Arabic and Persian chara= cter sets, don't seem to have any problems. > I have attached a sample of one of my tests. The text in the box should r= ead > "=D9=85=D8=A7 =DA=A9=D8=A8 =DA=AF=D9=BE =D8=AC=DB=8C=D8=A8 =D8=AC=D9=88= =D8=A8 =D9=BE=D8=A7" > which is incorrectly shown as > "=D9=85=D8=A7 =DA=A9=E2=80=8C=D8=A8 =DA=AF=E2=80=8C=D9=BE =D8=AC=E2=80=8C= =DB=8C=E2=80=8C=D8=A8 =D8=AC=D9=88=D8=A8 =D9=BE=E2=80=8C=D8=A7" > I traced the problem in Activiti Explorer code to this small code snippet= : > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > InputStream svgStream =3D new ByteArrayInputStream(modelForm.getFir= stValue("svg_xml").getBytes("utf-8")); > TranscoderInput input =3D new TranscoderInput(svgStream); > =20 > PNGTranscoder transcoder =3D new PNGTranscoder(); > // Setup output > ByteArrayOutputStream outStream =3D new ByteArrayOutputStream(); > TranscoderOutput output =3D new TranscoderOutput(outStream); > =20 > // Do the transformation > transcoder.transcode(input, output); > final byte[] result =3D outStream.toByteArray(); > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > It seems that the issues are coming from the PNGTranscoder not being able= to render persian text correctly. PNGTranscoder is part of Apache Batik (o= rg.apache.batik.transcoder.image.PNGTranscoder). > I have also created a very small eclipse project which does the same thin= g, independent of any Activiti Explorer code, which helps a lot to debug th= e 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