Page 1 of 1

HTML tags property not working with Arabic fonts

Posted: Fri Feb 09, 2024 9:33 am
by Sarmad12
Hello dear in Stimulsoft support,

I am using: Version 2024.1.3 from 18 January 2024, PHP

I would like to explain this problem by images for each problem:


Problem 1 - properties used: HTML tags property set to true - font "Noto Kufi Arabic" is used - Justify text is used.

Status 1: in preview there no problem with text justify alignment
Status 2: When export to PDF, text justify not working.

Problem 2 - properties used: HTML tags property set to true - font "Arial" is used - Justify text is used.

Status 3: in preview there no problem with text justify alignment
Status 4: When export to PDF, text justify works but the font is not rendered correctly

Tow mrt report files are attached. Each for each font used in this problem.

Thanks!

Re: HTML tags property not working with Arabic fonts

Posted: Fri Feb 09, 2024 11:47 pm
by Lech Kulikowski
Hello,

Please try to add your font in the font collection:
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile()

Thank you.

Re: HTML tags property not working with Arabic fonts

Posted: Sat Feb 10, 2024 12:29 pm
by Sarmad12
Lech Kulikowski wrote: Fri Feb 09, 2024 11:47 pm Hello,

Please try to add your font in the font collection:
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile()

Thank you.
Isn't report resource method is as same as StiFontCollection method for adding fonts ?
I have used report resource method for this.
I didn't use StiFontCollection method but if there is any difference I will take a try.

Thank you

Re: HTML tags property not working with Arabic fonts

Posted: Sat Feb 10, 2024 1:24 pm
by Sarmad12
However, I have used Stimulsoft.Base.StiFontCollection.addOpentypeFontFile() method for adding the font but no change !.

Justify is not working nor in designer nor in viewer when exporting to PDF and only work in preview.

The only fonts that Justify is working for are system fonts in preview mode, but they are not rendered correctly (disconnected letters) when exporting to PDF

Best

Re: HTML tags property not working with Arabic fonts

Posted: Sat Feb 10, 2024 6:20 pm
by Sarmad12
Hi,
Your attention is very important here !.

Another very very strange behavior with JUSTIFY alignment !!!!!

This time Set HTML tags to false and use JUSTIFY alignment for text box. If there are numbers within a text and you try to export report to PDF the following error occur:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'xAdvance')
at _Z.renderTextLine (stimulsoft.reports.js:58:211823)
at _Z.renderText3 (stimulsoft.reports.js:58:210511)
at _Z.renderText (stimulsoft.reports.js:58:185414)
at XZ.exportPdf1 (stimulsoft.reports.js:58:62568)
at XZ.exportTo (stimulsoft.reports.js:57:262789)
at stimulsoft.reports.js:57:263053

So to solve this situation one should either remove numbers or cancel the JUSTIFY alignment !.

This problem was not exist in version 2021

I am asking how to solve this while using JUSTIFY alignment ?
This problem occur when I use Arabic custom fonts.

Thanks!

Re: HTML tags property not working with Arabic fonts

Posted: Wed Feb 14, 2024 9:20 am
by Lech Kulikowski
Hello,

Please send us your request with detailed description on support@stimulsoft.com.

Thank you.