Skip to content

Commit 11ef89b

Browse files
Add test for #37
1 parent 221267f commit 11ef89b

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright (c) Six Labors.
2+
// Licensed under the Apache License, Version 2.0.
3+
4+
using SixLabors.ImageSharp.Drawing.Processing;
5+
using SixLabors.ImageSharp.PixelFormats;
6+
using SixLabors.ImageSharp.Processing;
7+
using Xunit;
8+
9+
namespace SixLabors.ImageSharp.Drawing.Tests.Issues
10+
{
11+
public class Issue_37
12+
{
13+
[Fact]
14+
public void CanRenderLargeFont()
15+
{
16+
using (var image = new Image<Rgba32>(300, 200))
17+
{
18+
string text = "TEST text foiw|\\";
19+
20+
Fonts.Font font = Fonts.SystemFonts.CreateFont("Arial", 40, Fonts.FontStyle.Regular);
21+
var graphicsOptions = new GraphicsOptions { Antialias = false };
22+
image.Mutate(x =>
23+
{
24+
x.BackgroundColor(Color.White)
25+
.DrawLines(
26+
new ShapeGraphicsOptions { GraphicsOptions = graphicsOptions },
27+
Color.Black,
28+
1,
29+
new PointF(0, 50),
30+
new PointF(150, 50))
31+
.DrawText(
32+
new TextGraphicsOptions { GraphicsOptions = graphicsOptions },
33+
text,
34+
font,
35+
Color.Black,
36+
new PointF(50, 50));
37+
});
38+
}
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)