Prerequisites
Fonts version
3.0.0
Other Six Labors packages and versions
SixLabors.ImageSharp.Drawing 3.0.0
Environment (Operating system, version and so on)
Linux (PopOS 22.04)
.NET Framework version
.net 9
Description
I'm working on updating my ImageSharp dependency from 3 to 4. This font file loaded fine in 3 but throws System.OverflowException: Arithmetic operation resulted in an overflow. in 4.
Steps to Reproduce
Repro code:
using SixLabors.Fonts;
var fontFile = typeof(Program).Assembly.GetManifestResourceStream("ImageSharpRepro.HomeVideo-Regular.ttf");
if (fontFile is null) throw new Exception("Could not find font file");
var fontCollection = new FontCollection();
fontCollection.Add(fontFile); // Throws here
Here's a zip that contains the font: home_video.zip
And the stack trace:
Unhandled exception. System.OverflowException: Arithmetic operation resulted in an overflow.
at SixLabors.Fonts.BigEndianBinaryReader.ReadBytes(Int32 count)
at SixLabors.Fonts.Tables.General.Svg.SvgTable.Load(BigEndianBinaryReader reader)
at SixLabors.Fonts.Tables.General.Svg.SvgTable.Load(FontReader fontReader)
at SixLabors.Fonts.Tables.TableLoader.Load[TTable](FontReader reader)
at SixLabors.Fonts.FontReader.TryGetTable[TTableType]()
at SixLabors.Fonts.StreamFontMetrics.LoadTrueTypeFont(FontReader reader)
at SixLabors.Fonts.StreamFontMetrics.LoadFont(FontReader reader)
at SixLabors.Fonts.StreamFontMetrics.LoadFont(Stream stream)
at SixLabors.Fonts.FontCollection.AddImpl(Stream stream, CultureInfo culture, FontDescription& description)
at SixLabors.Fonts.FontCollection.Add(Stream stream, FontDescription& description)
at SixLabors.Fonts.FontCollection.Add(Stream stream)
Images
No response
Prerequisites
DEBUGandRELEASEmodeFonts version
3.0.0
Other Six Labors packages and versions
SixLabors.ImageSharp.Drawing 3.0.0
Environment (Operating system, version and so on)
Linux (PopOS 22.04)
.NET Framework version
.net 9
Description
I'm working on updating my ImageSharp dependency from 3 to 4. This font file loaded fine in 3 but throws
System.OverflowException: Arithmetic operation resulted in an overflow.in 4.Steps to Reproduce
Repro code:
Here's a zip that contains the font: home_video.zip
And the stack trace:
Images
No response