File tree Expand file tree Collapse file tree
tests/ImageSharp.Drawing.Tests/Issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments