-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from SixLabors/js/fix-378
Prevent key collision in glyphmetrics cache.
- Loading branch information
Showing
5 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Six Labors Split License. | ||
|
||
namespace SixLabors.Fonts.Tests.Issues; | ||
public class Issues_378 | ||
{ | ||
[Fact] | ||
public void DoesNotBreakIncorrectly() | ||
{ | ||
Font font = new FontCollection().Add(TestFonts.PlantinStdRegularFile).CreateFont(2048); | ||
|
||
TextOptions options = new(font) { WrappingLength = float.MaxValue }; | ||
FontRectangle size = TextMeasurer.MeasureSize("D\r\nD", options); | ||
|
||
FontRectangle size2 = TextMeasurer.MeasureSize("D D", options); | ||
|
||
Assert.NotEqual(size, size2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters