When convert emf with japanese text to png in unix- japanese did not show right

Hi Raza,

any update for this?
sorry for the push, but this is really a big issue for us.

Could you please share the progress with us, for example, have some clues already or other.

Regards,
Stone

Hi Stone,


Thank you for your patience with us.

We have been able to track down the problem to JDK’s Graphic2D.Draw method. The Shape renders correctly in Windows as well as Linux environments with recent releases of JDK. However with JDK 1.6, the Shape isn’t rendering correctly due some unknown reasons. We have planned to debug the JDK to find concrete answers to this issue, and to find a possible workaround to avoid such situation.

As soon as we have more updates, we will post here for your kind reference.

Hi Raza,

We had tried jdk 1.7, have the same issue. You can find our test result in this post earlier.

So maybe this is not jdk6's issue, or the newest jdk has the same issue.

please notice this.

Regards,

Stone

Hi Stone,


Thank you for writing back.

Yes, we are aware of the fact that you are unable to get the desired results with JDK 1.7, and we are not sure of the reason behind this use-case failure. However, we have tested the scenario on our side with different revisions of JDK 1.7, and we have been able to generate correct results every time we performed the test. Furthermore, our detailed investigation pointed out that the behavior of JDK’s Graphics2D.Draw method is different for 1.6 & 1.7, where 1.6 is producing incorrect results in Linux environments. Based on these facts, we are currently working on similar lines to isolate the problem cause, and to propose a solution for you.

Hi Stone,


Thank you for your patience with us.

We have dug deeper in your presented scenario in past few weeks, and have summed up the problem cause to be the the unavailability of the required CJK fonts (containing Chinese/Japanese/Korean characters) in the environment or to the Java runtime.

The following code snippet can help to identify if CJK fonts are available to the Java runtime.

Java

Font font = new Font(Font.DIALOG, Font.PLAIN, 24);
boolean b = font.canDisplay(‘賃’);
System.out.println("Can Display: " + b);


If Font.canDisplay returns true that means the fonts are installed as well as configured correctly. However, if the aforesaid method returns false, there could be one of the two possibilities as follow,

  • Fonts are not installed in the environment. Different Linux distributions have different mechanisms to install the CJK fonts. RHEL provides this support through the Package Manager.
  • Fonts are installed but not configured and available to the Java runtime. Java 7 makes use of fontconfig library, and generally should not have any problems. Please refer to the documentation for fontconfig library for details on its configuration. Java 6 has different font resolution mechanism based on the distribution-specific property files.

We hope you find this information helpful.

Hi Babar Raza,

Thanks for your hard investigation.

You are right, it is font lack issue. We installed the whole JP fonts in test machine several days ago, and ASPOSE works well there. And we are trying to install in our PROD server.

Plan to reply here when we completely finish our work. And you reach before the time.

Thanks again, and will ask if any other issue.

Regards,

Stone

Hi Stone.


Thank you for your positive feedback, and good to know that you are in process of resolving this issue. Please keep us updated with your test results so we can appropriately close the ticket attached to this thread.

Once again, we are really sorry to take too much time to properly investigate the matter on our side.

Hi Stone,


We haven’t heard from you in while, and we are wondering if you are able to completely resolve the said problem. Please post us with updates in this regard so we may close the ticket attached to this thread.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.