Steps to reproduce:
- Install the Symbols Nerd Font.
- Run the attached project.
Expected results:
Spreadsheet Document API doesn't throw the System.OverflowException: 'Arithmetic operation resulted in an overflow.' error and saves the document.
Current results:
Spreadsheet Document API throws the System.OverflowException: 'Arithmetic operation resulted in an overflow.' error and can't save the document.
Additional information:
Call StackDevExpress.Office.v24.2.Core.dll!DevExpress.Office.PInvoke.Win32.GetCharWidth(System.IntPtr hdc, uint firstChar, uint lastChar) Line 103 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.PrepareWidthAndKerningArrays.AnonymousMethod__0(char first, char last) Line 494 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Utils.CharWidthArrayChunk.Update(System.Func<char, char, int[]> widthUpdater, System.Func<char, char, int[]> abcUpdater) Line 57 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Utils.CharWidthArrayPrimaryLevel.Update(System.Func<char, char, int[]> widthUpdater, System.Func<char, char, int[]> abcUpdater) Line 105 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Utils.CharWidthArray.Update(System.Func<char, char, int[]> widthUpdater, System.Func<char, char, int[]> abcUpdater) Line 132 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.PrepareWidthAndKerningArrays(System.IntPtr hdc, string text) Line 493 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.PrepareWidthAndKerningArrays.AnonymousMethod__0(System.IntPtr hdc) Line 469 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.GdiPlusFontInfoMeasurer.GetReleaseGraphicsHdc<object>(System.Func<System.IntPtr, object> function) Line 192 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.PrepareWidthAndKerningArrays(DevExpress.Office.Drawing.GdiFontInfoMeasurer measurer, string text) Line 468 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.GetCharactersWidth(DevExpress.Office.Drawing.GdiFontInfoMeasurer measurer, string text, DevExpress.Drawing.DXStringFormat stringFormat) Line 515 C# DevExpress.Spreadsheet.v24.2.Core.dll!DevExpress.XtraSpreadsheet.Drawing.PureGdiFontInfoMeasurer.MeasureMaxDigitWidthF(DevExpress.Office.Drawing.FontInfo fontInfo) Line 184 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontInfo.CalculateMaxDigitWidth(DevExpress.Office.Drawing.FontInfoMeasurer measurer) Line 204 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontInfo.CalculateFontParameters(DevExpress.Office.Drawing.FontInfoMeasurer measurer, bool allowCjkCorrection) Line 201 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.CalculateFontParameters(DevExpress.Office.Drawing.FontInfoMeasurer measurer, bool allowCjkCorrection) Line 433 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontInfo.Initialize(DevExpress.Office.Drawing.FontInfoMeasurer measurer, string fontName, int doubleFontSize, bool fontBold, bool fontItalic, bool fontStrikeout, bool fontUnderline, bool allowCjkCorrection, int textRotation, bool useSystemFontQuality, DevExpress.Office.Drawing.FontInfo baselineFontInfo, DevExpress.Office.Drawing.FontInfo smallCapsBaselineFontInfo) Line 185 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontInfo.FontInfo(DevExpress.Office.Drawing.FontInfoMeasurer measurer, string fontName, int doubleFontSize, bool fontBold, bool fontItalic, bool fontStrikeout, bool fontUnderline, bool allowCjkCorrection, int textRotation, bool useSystemFontQuality, DevExpress.Office.Drawing.FontInfo baselineFontInfo, DevExpress.Office.Drawing.FontInfo smallCapsBaselineFontInfo) Line 89 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontInfo.WindowsPlatformFontInfo(DevExpress.Office.Drawing.FontInfoMeasurer measurer, string fontName, int doubleFontSize, bool fontBold, bool fontItalic, bool fontStrikeout, bool fontUnderline, bool allowCjkCorrection, int textRotation, bool useSystemFontQuality, DevExpress.Office.Drawing.FontInfo baselineFontInfo, DevExpress.Office.Drawing.FontInfo smallCapsBaselineFontInfo) Line 126 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontCache.CreateFontInfoCore(string fontName, int doubleFontSize, bool fontBold, bool fontItalic, bool fontStrikeout, bool fontUnderline, int textRotation, DevExpress.Office.Drawing.FontInfo baselineFontInfo, DevExpress.Office.Drawing.FontInfo smallCapsBaselineFontInfo) Line 72 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.WindowsPlatformFontCache.CreateFontCharacterSet(DevExpress.Office.Drawing.FontDescription fontDescription) Line 94 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontCache.CreateFontFamilyCharacterSet(string fontName) Line 359 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontCache.GetFontCharacterSet(DevExpress.Office.Drawing.FontDescription fontDescription) Line 349 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontCache.PopulateNameToCharacterSetMap() Line 320 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Drawing.FontCache.FindSubstituteFont(DevExpress.Office.Drawing.FontDescription sourceFont, char ch) Line 297 C# DevExpress.Office.v24.2.Core.dll!DevExpress.Office.Utils.SubstituteFontBuilder.SubstituteFont(DevExpress.Office.Drawing.FontInfo fontInfo, string text) Line 59 C#
Workaround:
As a workaround, remove the Symbols Nerd Font from the problematic machine.