-
-
Notifications
You must be signed in to change notification settings - Fork 73
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 #447 from SixLabors/js/additional-linebreak-fixes
Fix Tracking of Last Line Break
- Loading branch information
Showing
4 changed files
with
82 additions
and
28 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
3 changes: 3 additions & 0 deletions
3
tests/Images/ReferenceOutput/Issue_446_A__WrappingLength_860_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
tests/Images/ReferenceOutput/Issue_446_B__WrappingLength_860_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Six Labors Split License. | ||
|
||
using System.Numerics; | ||
|
||
namespace SixLabors.Fonts.Tests.Issues; | ||
|
||
public class Issues_446 | ||
{ | ||
private readonly FontFamily charisSIL = new FontCollection().Add(TestFonts.CharisSILRegular); | ||
|
||
[Fact] | ||
public void Issue_446_A() | ||
{ | ||
Font font = this.charisSIL.CreateFont(85); | ||
TextLayoutTestUtilities.TestLayout( | ||
"⇒ Tim Cook\n⇒ Jef Bezos\n⇒ Steve Jobs\n⇒ Mark Zuckerberg", | ||
new TextOptions(font) | ||
{ | ||
Origin = new Vector2(50, 20), | ||
WrappingLength = 860, | ||
}); | ||
} | ||
|
||
[Fact] | ||
public void Issue_446_B() | ||
{ | ||
Font font = this.charisSIL.CreateFont(85); | ||
TextLayoutTestUtilities.TestLayout( | ||
"⇒ Tim Cook\n⇒ Jeff Bezos\n⇒ Steve Jobs\n⇒ Mark Zuckerberg", | ||
new TextOptions(font) | ||
{ | ||
Origin = new Vector2(50, 20), | ||
WrappingLength = 860, | ||
}); | ||
} | ||
} |