Skip to content

Commit 49fc8ac

Browse files
Create Issue_241.cs
1 parent 626900c commit 49fc8ac

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) Six Labors.
2+
// Licensed under the Apache License, Version 2.0.
3+
4+
using System.Numerics;
5+
using SixLabors.Fonts;
6+
using SixLabors.ImageSharp.Drawing.Processing;
7+
using SixLabors.ImageSharp.PixelFormats;
8+
using SixLabors.ImageSharp.Processing;
9+
using Xunit;
10+
11+
namespace SixLabors.ImageSharp.Drawing.Tests.Issues
12+
{
13+
public class Issue_241
14+
{
15+
[Fact]
16+
public void DoesNotThrowArgumentOutOfRangeException()
17+
{
18+
if (!TestEnvironment.IsWindows)
19+
{
20+
return;
21+
}
22+
23+
FontFamily fontFamily = SystemFonts.Get("Arial");
24+
RichTextOptions opt = new(fontFamily.CreateFont(100, FontStyle.Regular))
25+
{
26+
Origin = new Vector2(159, 0)
27+
};
28+
const string content = "TEST";
29+
30+
using Image image = new Image<Rgba32>(512, 256, Color.Black);
31+
image.Mutate(x => x.DrawText(opt, content, Brushes.Horizontal(Color.Orange)));
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)