Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Fonts to v2.0.3 and ImageSharp to v3.1.4 #326

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.drawing\sixlabors.imagesharp.drawing.128.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.Fonts" Version="2.0.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.3" />
<PackageReference Include="SixLabors.Fonts" Version="2.0.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
</ItemGroup>
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
</Project>
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.
Loading