You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After fixes to line wrapping 2.0.8 and 2.0.9, I've noticed a regression in a particular test of mine (see steps to reproduce for the program). This works as expected with 2.0.7.
Steps to Reproduce
using System.Numerics;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Fonts;
namespace TextRunTest;
internal class Program {
static void Main(string[] args) {
Console.WriteLine("Rendering test images...");
test3();
Console.WriteLine("Done.");
}
private static void test3() {
var fontManager = new FontManager();
Image imgTest1 = new Image<Rgba32>(1100, 500, Color.White);
imgTest1.Mutate(x =>
x.DrawText(
new RichTextOptions(fontManager.GetFont("Arial", 80, FontStyle.Regular)) {
Origin = new Vector2(50, 20),
WrappingLength = 800,
},
"What connects the following: x",
Color.Black
)
);
imgTest1.SaveAsPng("c:/development/diff/testImg1.png");
// ^ correct in 2.0.9
Image imgTest2 = new Image<Rgba32>(1100, 500, Color.White);
imgTest2.Mutate(x =>
x.DrawText(
new RichTextOptions(fontManager.GetFont("Arial", 80, FontStyle.Regular)) {
Origin = new Vector2(50, 20),
WrappingLength = 800,
},
"What connects the following:\nx",
Color.Black
)
);
imgTest2.SaveAsPng("c:/development/diff/testImg2.png");
// ^ incorrect in 2.0.9; does not wrap "following:"
}
}
Images
Correct behaviour in 2.0.7:
Incorrect behaviour in 2.0.9:
The text was updated successfully, but these errors were encountered:
Prerequisites
DEBUG
andRELEASE
modeFonts version
2.0.9
Other Six Labors packages and versions
SixLabors.ImageSharp 3.1.6, SixLabors.ImageSharp.Drawing 2.1.5
Environment (Operating system, version and so on)
Windows 10
.NET Framework version
.NET 9
Description
After fixes to line wrapping 2.0.8 and 2.0.9, I've noticed a regression in a particular test of mine (see steps to reproduce for the program). This works as expected with 2.0.7.
Steps to Reproduce
Images
Correct behaviour in 2.0.7:
Incorrect behaviour in 2.0.9:
The text was updated successfully, but these errors were encountered: