Prerequisites
Fonts version
3.0.0-alpha.0.4
Other Six Labors packages and versions
Drawing: 3.0.0-alpha.0.6 ImageSharp: 4.0.0-alpha.0.55
Environment (Operating system, version and so on)
Ubuntu 24.04
.NET Framework version
.net 9.0
Description
While doing some tests with font fallback, I got to this piece of text (see below) that is killing my computer (taking forever, using all the memory) when I try to render with ImageSharp, even if the font does not support those characters
Steps to Reproduce
Fonts available here: Fonts.zip
using SixLabors.Fonts;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
var fontCollection = new FontCollection();
fontCollection.AddSystemFonts();
fontCollection.Add("Fonts/NotoSans-Regular.ttf");
fontCollection.Add("Fonts/NotoSansSC-Regular.ttf");
using var img = new Image<Rgba32>(900, 150, Color.DimGray.ToPixel<Rgba32>());
img.Mutate(x => x
.Fill(Color.White)
.DrawText(new RichTextOptions(fontCollection.Get("Noto Sans").CreateFont(30, FontStyle.Regular))
{
FallbackFontFamilies =
[
fontCollection.Get("Noto Sans SC"),
],
},
"වේගවත් දුඹුරු හිවලා කම්මැලි බල්ලා උඩින් පනී",
Color.Black
)
);
await img.SaveAsync("test.png");
Images
No response
Prerequisites
DEBUGandRELEASEmodeFonts version
3.0.0-alpha.0.4
Other Six Labors packages and versions
Drawing: 3.0.0-alpha.0.6 ImageSharp: 4.0.0-alpha.0.55
Environment (Operating system, version and so on)
Ubuntu 24.04
.NET Framework version
.net 9.0
Description
While doing some tests with font fallback, I got to this piece of text (see below) that is killing my computer (taking forever, using all the memory) when I try to render with ImageSharp, even if the font does not support those characters
Steps to Reproduce
Fonts available here: Fonts.zip
Images
No response