HTML tags property not working with Arabic fonts

Stimulsoft Reports.PHP discussion
Post Reply
Sarmad12
Posts: 8
Joined: Sat Jul 24, 2021 4:16 pm

HTML tags property not working with Arabic fonts

Post 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!
Attachments
html tags - Noto Kufi Arabic font.mrt
(176.83 KiB) Downloaded 9 times
html tags - Arial font.mrt
(176.79 KiB) Downloaded 18 times
Status 1 - Preview - font Noto Kufi Arabic is used.png
Status 1 - Preview - font Noto Kufi Arabic is used.png (60.02 KiB) Viewed 157 times
Status 2 - Export to PDF - font Noto Kufi Arabic is used.png
Status 2 - Export to PDF - font Noto Kufi Arabic is used.png (63.39 KiB) Viewed 157 times
Status 3 - preview - Arial font is used.png
Status 3 - preview - Arial font is used.png (67.68 KiB) Viewed 157 times
Status 4 - export to PDF - Arial font is used.png
Status 4 - export to PDF - Arial font is used.png (78.86 KiB) Viewed 157 times
Lech Kulikowski
Posts: 6092
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML tags property not working with Arabic fonts

Post by Lech Kulikowski »

Hello,

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

Thank you.
Sarmad12
Posts: 8
Joined: Sat Jul 24, 2021 4:16 pm

Re: HTML tags property not working with Arabic fonts

Post 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
Sarmad12
Posts: 8
Joined: Sat Jul 24, 2021 4:16 pm

Re: HTML tags property not working with Arabic fonts

Post 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
Sarmad12
Posts: 8
Joined: Sat Jul 24, 2021 4:16 pm

Re: HTML tags property not working with Arabic fonts

Post 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!
Lech Kulikowski
Posts: 6092
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML tags property not working with Arabic fonts

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply