Aspose.Words for java converts simplified Arabic font wrongly

Hi,

The simplified Arabic font is not installed in my windows 10 environment, but it is installed in the testing server, when I execute my java code, Aspose converts the document correctly in my environment, but it is converted wrongly for some words in the server.

When I installed the simplified Arabic font in my machine, I faced the same conversion error. I found that the same word has some characters converted using the simplified Arabic and other characters were converted using Arial-BoldMT although in the docx file the whole word is in simplified Arabic, this makes the word appears wrongly.

When the font was not installed in my machine, the pdf was generated using TimesNewRoman-PSMT for the whole word, so the words appeared correctly.

Is there a problem related to the simplified Arabic font?

Thank you for your help

@kfarouk

Could you please ZIP and attach your input, problematic PDF and expected output PDF file here for testing? We will investigate the issue and provide you more information on it.

Please find the attached file sample.zip (708.5 KB)

I highlighted the wrong text

@kfarouk

We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22932. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you Tahir,
please note there is a similar problem with the font Arabic Typesetting, please check the attached word document and add it to the ticket. Problem2.zip (772.0 KB)

@kfarouk

Please create a sample application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you more information on it.

@tahir.manzoor

Please find the sample project AsposeSample.zip (175.0 KB)

@kfarouk

Please enable open type feature as shown below to get the correct output.

Document doc = new Document(MyDir + "input.docx");
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());
doc.save(MyDir + "output.pdf");

For more detail, please read the following article.
Enable OpenType Features

You need to include aspose-words-21.10-shaping-harfbuzz-plugin.jar into your application to use this feature.

@kfarouk

We have closed the issue WORDSNET-22932 as ‘Not a bug’. Please enable open type feature as suggested in my previous post.

Aspose.Words is able to render the document to PDF correctly except for the part where the “Justify High” option is applied. The justification for Arabic is not supported yet. The issue ID for this feature is WORDSNET-11360. We will inform you via this forum thread once this feature is available.

@tahir.manzoor
Thank you very much Tahir.