Skip to content

Commit c0d89c1

Browse files
Snipxitext-teamcity
authored andcommitted
Merge branch 'feature/inline_blocks_support_and_leading_improvements' into develop
Autoported commit. Original commit hash: [1dfb78f]
2 parents 47daceb + 617d1ef commit c0d89c1

File tree

23 files changed

+266
-36
lines changed

23 files changed

+266
-36
lines changed

itext.tests/itext.layout.tests/itext/layout/CollapsingMarginsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public virtual void CollapsingMarginsTest04() {
193193
p.Add("When a man hath no freedom to fight for at home,\n" + " Let him combat for that of his neighbours;\n"
194194
+ "Let him think of the glories of Greece and of Rome,\n" + " And get knocked on the head for his labours.\n"
195195
+ "To do good to Mankind is the chivalrous plan,\n");
196-
p.Add(new Text("small text").SetFontSize(6));
196+
p.Add(new Text("small text").SetFontSize(5.1f));
197197
p.Add("\nAnd is always as nobly requited;\n" + "Then battle for Freedom wherever you can,\n" + "And, if not shot or hanged, you'll get knighted."
198198
);
199199
Div div1 = new Div();

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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)