Page 1 of 1

Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure

Posted: Sun Aug 27, 2023 5:24 pm
by iiror
Hey,

I noticed an issue in the Stimulsoft.Reports.Engine.NetCore version 2023.3.2 that it cannot find a method from the SixLabors.Fonts-library.

It seems that the library has a dependency on SixLabors.Fonts >= 1.0.0-beta19, but I'm using another library with version 1.0.0 which might then be used for the report engine, instead of the beta version. There are some API changes between the beta and final version of SixLabors.Fonts, which probably breaks the report. Below is the full error message and stack trace. I also attached a screenshot of the API changes in SixLabors.Fonts.

Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure(System.String, SixLabors.Fonts.TextOptions)'.

System.MissingMethodException:
at Stimulsoft.Drawing.Graphics.MeasureString (Stimulsoft.Drawing, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Drawing.Graphics.MeasureString (Stimulsoft.Drawing, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Base.Drawing.StiTextDrawing.GetAdditionalSpaceSize (Stimulsoft.Base, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Base.Drawing.StiTextDrawing.MeasureString (Stimulsoft.Base, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Components.StiStandardTextRenderer.MeasureString (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Components.StiText.GetActualSize (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Components.StiContainerHelper.CheckSize (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiContainerV2Builder.InternalRender (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Components.StiComponent.InternalRender (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiEngine.InternalRenderBand (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiEngine.RenderBand (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderBand (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderMaster (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Components.StiDataBand.RenderMaster (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiPageHelper.RenderPage (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiRenderProviderV2.RenderReport (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.RenderReport (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)
at Stimulsoft.Report.StiReport.Render (Stimulsoft.Report, Version=2023.3.2.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a)

Re: Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure

Posted: Tue Aug 29, 2023 8:56 pm
by Lech Kulikowski
Hello,

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

Thank you.
#12322

Re: Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure

Posted: Wed Sep 06, 2023 2:22 pm
by kx197
If it helps:

There seems to be a clash with ClosedXml; when the latest version (0.102.1) is included, the error occurs as soon as one TextField is set to growable. However, downgrading to 0.102.0 (or removing the library) removes the error.

Re: Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure

Posted: Wed Sep 06, 2023 2:37 pm
by Lech Kulikowski
Hello,

Thank you for the information.

Re: Method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure

Posted: Thu Sep 21, 2023 7:52 am
by Lech Kulikowski
Hello,

The issue is fixed. Please check the next release within a week or two.

Thank you.