Skip to content

Commit fb62dd1

Browse files
Update TextBuilderTests.cs
1 parent 9f54ed0 commit fb62dd1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/ImageSharp.Drawing.Tests/Shapes/TextBuilderTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ public void TextBuilder_Bounds_AreCorrect()
1818
Origin = position
1919
};
2020

21-
string text = "Hello World";
21+
const string text = "Hello World";
2222

2323
IPathCollection glyphs = TextBuilder.GenerateGlyphs(text, options);
2424

2525
RectangleF builderBounds = glyphs.Bounds;
26-
FontRectangle measuredBounds = TextMeasurer.MeasureBounds(text, options);
26+
FontRectangle directMeasured = TextMeasurer.MeasureBounds(text, options);
27+
var measuredBounds = new FontRectangle(new(0, 0), directMeasured.Size + directMeasured.Location);
2728

2829
Assert.Equal(measuredBounds.X, builderBounds.X);
2930
Assert.Equal(measuredBounds.Y, builderBounds.Y);

0 commit comments

Comments
 (0)