Font Problem When Exporting

Stimulsoft Reports.NET discussion
Post Reply
progalion
Posts: 4
Joined: Mon Nov 13, 2023 9:39 am

Font Problem When Exporting

Post by progalion »

Hello

In Stimulsoft 2023, when I use custom Persian fonts , I get this error while exporting pdf :
the font is correctly installed and I'm exporting on my computer.
System.Exception: Exception in PdfFonts.GetFontMetrics, font 'B Nazanin' step #50: 'Object reference not set to an instance of an object.'
at Stimulsoft.Report.Export.PdfFonts.GetFontMetrics(Font font, PdfFontInfo currentFontInfo, UInt16[] glyphMap, Boolean isWpf)
at Stimulsoft.Report.Export.PdfFonts.InitFontsData(Boolean isWpf)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream)
PS: when I use this font only on numbers it's ok , but when I apply it on a text , the error above apprears.

any help would be greatly appreciated.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Font Problem When Exporting

Post by Lech Kulikowski »

Hello,

Please send the font file and sample report that reproduces the issue for analysis.

Also, please clarify what engine are you use - .NET or NET Core?

Thank you.
progalion
Posts: 4
Joined: Mon Nov 13, 2023 9:39 am

Re: Font Problem When Exporting

Post by progalion »

Hi again

I'm using NET Core version

Thank you for helping
Attachments
FontSample.rar
(25.15 KiB) Downloaded 90 times
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Font Problem When Exporting

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#12997
progalion
Posts: 4
Joined: Mon Nov 13, 2023 9:39 am

Re: Font Problem When Exporting

Post by progalion »

Hi
Alright, Thank you a lot.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Font Problem When Exporting

Post by Lech Kulikowski »

Hello,

You are welcome.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Font Problem When Exporting

Post by Lech Kulikowski »

Hello,

The error occurs inside the SixLabors.Fonts library, and it is on this font that the error occurs.
We will send the problem to the authors of the library, but a fix may not be available for a very long time.

In practice, sometimes we have to wait half a year for them to release a new version. At the current moment, we advice to use a different font.

Thank you.
progalion
Posts: 4
Joined: Mon Nov 13, 2023 9:39 am

Re: Font Problem When Exporting

Post by progalion »

Hello

Alright then, I think I have to use older versions
Thank you so much.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Font Problem When Exporting

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply