Skip to content

Commit

Permalink
Merge pull request #335 from SixLabors/js/update-refs
Browse files Browse the repository at this point in the history
Update references and fix casting of RichTextRuns
  • Loading branch information
JimBobSquarePants committed Jul 22, 2024
2 parents db32b13 + b7dfb7f commit b4a25da
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
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.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="SixLabors.Fonts" Version="2.0.4" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
</ItemGroup>
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
</Project>
3 changes: 1 addition & 2 deletions src/ImageSharp.Drawing/Processing/RichTextOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public class RichTextOptions : TextOptions
/// <param name="font">The font.</param>
public RichTextOptions(Font font)
: base(font)
{
}
=> this.TextRuns = Array.Empty<RichTextRun>();

/// <summary>
/// Initializes a new instance of the <see cref="RichTextOptions" /> class from properties
Expand Down
18 changes: 18 additions & 0 deletions tests/ImageSharp.Drawing.Tests/Issues/Issue_332.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.

using SixLabors.Fonts;
using SixLabors.ImageSharp.Drawing.Processing;

namespace SixLabors.ImageSharp.Drawing.Tests.Issues;

public class Issue_332
{
[Fact]
public void CanAccessEmptyRichTextRuns()
{
Font font = TestFontUtilities.GetFont(TestFonts.OpenSans, 70);
RichTextOptions options = new(font);
Assert.Empty(options.TextRuns);
}
}
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
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 b4a25da

Please sign in to comment.