Skip to content

Commit

Permalink
Update tests to reflect Fonts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants committed Apr 15, 2024
1 parent 536697e commit 6bca16c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ public void CanRotateFilledFont_Issue175<TPixel>(
AffineTransformBuilder builder = new AffineTransformBuilder().AppendRotationDegrees(angle);

RichTextOptions textOptions = new(font);
FontRectangle bounds = TextMeasurer.MeasureSize(text, textOptions);
Matrix3x2 transform = builder.BuildMatrix(Rectangle.Round(new RectangleF(bounds.X, bounds.Y, bounds.Width, bounds.Height)));
FontRectangle advance = TextMeasurer.MeasureAdvance(text, textOptions);
Matrix3x2 transform = builder.BuildMatrix(Rectangle.Round(new RectangleF(advance.X, advance.Y, advance.Width, advance.Height)));

provider.RunValidatingProcessorTest(
x => x.SetDrawingTransform(transform).DrawText(textOptions, text, Color.Black),
Expand All @@ -478,8 +478,8 @@ public void CanRotateOutlineFont_Issue175<TPixel>(
AffineTransformBuilder builder = new AffineTransformBuilder().AppendRotationDegrees(angle);

RichTextOptions textOptions = new(font);
FontRectangle bounds = TextMeasurer.MeasureSize(text, textOptions);
Matrix3x2 transform = builder.BuildMatrix(Rectangle.Round(new RectangleF(bounds.X, bounds.Y, bounds.Width, bounds.Height)));
FontRectangle advance = TextMeasurer.MeasureAdvance(text, textOptions);
Matrix3x2 transform = builder.BuildMatrix(Rectangle.Round(new RectangleF(advance.X, advance.Y, advance.Width, advance.Height)));

provider.RunValidatingProcessorTest(
x => x.SetDrawingTransform(transform)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bca16c

Please sign in to comment.