Empty Print dialog with custom font
-
Max Shamanov
- Posts: 1137
- Joined: Tue Sep 07, 2021 10:11 am
Re: Empty Print dialog with custom font
Hello,
Our HTML tag mode is currently implemented in a simplified manner: letter width is measured separately for each character. This works perfectly for simple European languages.
Problems arise with Eastern languages, where the appearance of a letter depends on its position in the word and the surrounding letters.
To improve the handling of Arabic languages, we used a method of replacing glyph forms according to a static, predefined table. With this method, the width of a line is calculated more accurately.
But this is for universal fonts. If special fonts are used for a specific language, these ready-made forms are often not available, and all replacements are made based on internal font tables (‘GSUB’ in TrueType fonts).
In this case, the width is calculated incorrectly, with large gaps.
We need time to investigate the issue with exporting glyphs to PDF in more detail.
Thank you.
#19592
Our HTML tag mode is currently implemented in a simplified manner: letter width is measured separately for each character. This works perfectly for simple European languages.
Problems arise with Eastern languages, where the appearance of a letter depends on its position in the word and the surrounding letters.
To improve the handling of Arabic languages, we used a method of replacing glyph forms according to a static, predefined table. With this method, the width of a line is calculated more accurately.
But this is for universal fonts. If special fonts are used for a specific language, these ready-made forms are often not available, and all replacements are made based on internal font tables (‘GSUB’ in TrueType fonts).
In this case, the width is calculated incorrectly, with large gaps.
We need time to investigate the issue with exporting glyphs to PDF in more detail.
Thank you.
#19592
Re: Empty Print dialog with custom font
Hello,
What are the universal fonts for Arabic or Central Kurdish Unicode defined in your table for calculating width? Also, what font for the Kurdish language is best to use in reports that render correctly in both PDF and standard print dialogs?
What are the universal fonts for Arabic or Central Kurdish Unicode defined in your table for calculating width? Also, what font for the Kurdish language is best to use in reports that render correctly in both PDF and standard print dialogs?
-
Max Shamanov
- Posts: 1137
- Joined: Tue Sep 07, 2021 10:11 am
Re: Empty Print dialog with custom font
Hello.
We would need more time to get an answer for you.
We will let you know as soon as we have any results.
Thank you.
We would need more time to get an answer for you.
We will let you know as soon as we have any results.
Thank you.
Re: Empty Print dialog with custom font
Hello Max,
I’m currently using Stimulsoft.Blazor (Server Interactive) 2026.2.1. Everything is working as expected, including PDF export and the viewer with custom Kurdish fonts.
However, I’m facing a specific issue with the "Noto Naskh Arabic" font. When the page loads for the first time, the report viewer renders correctly. But when I click Print (opening the browser’s print dialog), any component using the "Noto Naskh Arabic" font does not render.
If I close the print dialog and click Print again, everything renders correctly on the second attempt.
Do you know why this happens on the first print after the initial page load? or any suggestions?
Thanks.
I’m currently using Stimulsoft.Blazor (Server Interactive) 2026.2.1. Everything is working as expected, including PDF export and the viewer with custom Kurdish fonts.
However, I’m facing a specific issue with the "Noto Naskh Arabic" font. When the page loads for the first time, the report viewer renders correctly. But when I click Print (opening the browser’s print dialog), any component using the "Noto Naskh Arabic" font does not render.
If I close the print dialog and click Print again, everything renders correctly on the second attempt.
Do you know why this happens on the first print after the initial page load? or any suggestions?
Thanks.
-
Max Shamanov
- Posts: 1137
- Joined: Tue Sep 07, 2021 10:11 am
Re: Empty Print dialog with custom font
Hello,
We would need more time to get an answer for you.
We will let you know as soon as we have any results.
Thank you.
We would need more time to get an answer for you.
We will let you know as soon as we have any results.
Thank you.
Re: Empty Print dialog with custom font
Thanks.
Please let me know ASAP, as its critical issue in our side.
Please let me know ASAP, as its critical issue in our side.
-
Max Shamanov
- Posts: 1137
- Joined: Tue Sep 07, 2021 10:11 am
Re: Empty Print dialog with custom font
Hello,
Unfortunately, we were unable to reproduce the issue.
We loaded your report from the code into the viewer and selected Print -> Print; the text displays correctly.
Please see the attached image.
Thank you.
Unfortunately, we were unable to reproduce the issue.
We loaded your report from the code into the viewer and selected Print -> Print; the text displays correctly.
Please see the attached image.
Thank you.
- Attachments
-
- chrome_sPd8BxvoTT.png (20.75 KiB) Viewed 3840 times
Re: Empty Print dialog with custom font
any suggestions how to debug from my end to find the issue?
Re: Empty Print dialog with custom font
Found the issue, when I add the Font to Stimulsoft.Base.StiFontCollection.AddFontBase64 then this problem happens.
so any fix for that or workaround to keep using that above code so PDF export works correctly. because if I don't add the font to the Resources or StiFontCollection then PDF export functionality will break.
so any fix for that or workaround to keep using that above code so PDF export works correctly. because if I don't add the font to the Resources or StiFontCollection then PDF export functionality will break.
Re: Empty Print dialog with custom font
and another issue about the PDF export (Save as PDF) only for the 'Noto Naskh Arabic' font when added to Resources in the designer or added to StiFontCollection via code:
check below screenshots of the Preview and the Exported PDF, as the dots of the letters are not positioned well and correctly.
check below screenshots of the Preview and the Exported PDF, as the dots of the letters are not positioned well and correctly.