Skip to content

Commit 9dc074b

Browse files
Snipxitext-teamcity
authored andcommitted
Add a test that demonstrates a problem with the current approach to leading calculation
DEVSIX-1053 Autoported commit. Original commit hash: [898612d]
1 parent 898da01 commit 9dc074b

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

itext.tests/itext.layout.tests/itext/layout/TextWritingTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,22 @@ public virtual void LeadingTest01() {
129129
, "diff"));
130130
}
131131

132+
/// <exception cref="System.IO.IOException"/>
133+
/// <exception cref="System.Exception"/>
134+
[NUnit.Framework.Test]
135+
public virtual void LeadingTest02() {
136+
String outFileName = destinationFolder + "leadingTest02.pdf";
137+
String cmpFileName = sourceFolder + "cmp_leadingTest02.pdf";
138+
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
139+
Document document = new Document(pdfDocument);
140+
Paragraph p1 = new Paragraph().Add(new Text("Abdgsdfds ffs f dds").SetFontSize(60)).Add(new Text("fsd f dsf ds fds f ds"
141+
).SetFontSize(22)).SetMultipliedLeading(1);
142+
document.Add(p1);
143+
document.Close();
144+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
145+
, "diff"));
146+
}
147+
132148
/// <exception cref="System.IO.IOException"/>
133149
/// <exception cref="System.Exception"/>
134150
[NUnit.Framework.Test]
Binary file not shown.

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b311c7b8dd0ed210bdb31b36e12de82ec320a0b6
1+
898612dbe6c7a27077e10b543b975bebd887eefb

0 commit comments

Comments
 (0)