Page 1 of 1

Font Problem When Exporting

Posted: Mon Nov 13, 2023 9:47 am
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.

Re: Font Problem When Exporting

Posted: Mon Nov 13, 2023 4:34 pm
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.

Re: Font Problem When Exporting

Posted: Tue Nov 14, 2023 5:23 am
by progalion
Hi again

I'm using NET Core version

Thank you for helping

Re: Font Problem When Exporting

Posted: Tue Nov 14, 2023 9:56 am
by Lech Kulikowski
Hello,

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

Thank you.
#12997

Re: Font Problem When Exporting

Posted: Wed Nov 15, 2023 6:18 am
by progalion
Hi
Alright, Thank you a lot.

Re: Font Problem When Exporting

Posted: Wed Nov 15, 2023 8:22 am
by Lech Kulikowski
Hello,

You are welcome.

Re: Font Problem When Exporting

Posted: Thu Nov 16, 2023 6:02 pm
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.

Re: Font Problem When Exporting

Posted: Fri Nov 17, 2023 12:46 pm
by progalion
Hello

Alright then, I think I have to use older versions
Thank you so much.

Re: Font Problem When Exporting

Posted: Fri Nov 17, 2023 3:08 pm
by Lech Kulikowski
Hello,

You are welcome.