Page 1 of 1

Font not found after upgrade from 2024.2.4 to 2026.1.2

Posted: Wed Jan 28, 2026 9:59 am
by Sigmund
Hi,

we upgraded, now some reports not load because of null Reference exception. If i change the font from "Arial Narrow" to "Arial" it is working fine. Arial Narrow is installed on the system.
* We also use the JS version there the "Arial Narrow" makes no problems
* The Designer is installed on that system where the report is generated with the dotnet version. The designer see the "Arial Narrow"
* The report is generated in a IIS backend


System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Stimulsoft.Drawing
StackTrace:
at Stimulsoft.Drawing.FontFamily.get_Name()
at Stimulsoft.Base.StiFontCollection.GetFontFamily(String fontName, FontStyle baseFontStyle, Boolean allowNullResult)
at Stimulsoft.Base.StiJsonReportObjectHelper.Deserialize.Font(String text, Font defaultFont)
at Stimulsoft.Base.StiJsonReportObjectHelper.Deserialize.Font(JProperty prop, Font defaultFont)
at Stimulsoft.Base.StiJsonReportObjectHelper.DeserializeFont(JProperty property, Font defaultFont)
at Stimulsoft.Report.Components.StiText.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiComponentsCollection.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiContainer.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiBand.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiPageHeaderBand.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiComponentsCollection.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiContainer.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiPanel.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiPage.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.Components.StiPagesCollection.LoadFromJsonObjectInternal(JObject propJObject)
at Stimulsoft.Report.Components.StiPagesCollection.LoadFromJsonObject(JObject jObject)
at Stimulsoft.Report.StiReport.LoadFromJsonInternal(Stream stream)
at Stimulsoft.Report.StiReport.LoadFromJson(Stream stream)
at Stimulsoft.Report.StiReport.LoadFromJson(String json)

Re: Font not found after upgrade from 2024.2.4 to 2026.1.2

Posted: Wed Jan 28, 2026 9:42 pm
by Lech Kulikowski
Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.

Re: Font not found after upgrade from 2024.2.4 to 2026.1.2

Posted: Thu Jan 29, 2026 12:19 pm
by Sigmund
Ok, i found my problem. In GDI mode i have to register all fonts i want to use. Some was registered but not Arial black and narrow.
The old version seems to silently fall back to Arial if the font was not registered.

A helpful error message instead of "Null Reference exception" would be very nice. Something like "Font Arial Black must be registered in GDI Render mode. See StiFontCollection.AddFontBytes(...)"

Re: Font not found after upgrade from 2024.2.4 to 2026.1.2

Posted: Thu Jan 29, 2026 6:43 pm
by Lech Kulikowski
Hello,

Thank you for the information.

We have added this task to our to-do list.

Thank you.
#19375