Skip to content

Commit 0025f70

Browse files
BlackEgoistars18wrw
authored andcommitted
Add monospace tests
DEVSIX-3406 Autoported commit. Original commit hash: [fa19409]
1 parent 6cb7942 commit 0025f70

File tree

6 files changed

+41
-1
lines changed

6 files changed

+41
-1
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/FontProviderTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,21 @@ public virtual void ConvertStandardFonts() {
8787
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(destinationFolder + "convertStandardFonts.pdf"
8888
, sourceFolder + "cmp_convertStandardFonts", destinationFolder, "difffontstand_"));
8989
}
90+
91+
[NUnit.Framework.Test]
92+
public virtual void NotoSansMonoItalicTest() {
93+
HtmlConverter.ConvertToPdf(new FileInfo(sourceFolder + "notoSansMonoItalic.html"), new FileInfo(destinationFolder
94+
+ "notoSansMonoItalic.pdf"));
95+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(destinationFolder + "notoSansMonoItalic.pdf"
96+
, sourceFolder + "cmp_notoSansMonoItalic.pdf", destinationFolder, "diffnotoSansMonoItalic_"));
97+
}
98+
99+
[NUnit.Framework.Test]
100+
public virtual void NotoSansMonoBoldItalicTest() {
101+
HtmlConverter.ConvertToPdf(new FileInfo(sourceFolder + "notoSansMonoBoldItalic.html"), new FileInfo(destinationFolder
102+
+ "notoSansMonoBoldItalic.pdf"));
103+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(destinationFolder + "notoSansMonoBoldItalic.pdf"
104+
, sourceFolder + "cmp_notoSansMonoBoldItalic.pdf", destinationFolder, "diffnotoSansMonoBoldItalic_"));
105+
}
90106
}
91107
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head></head>
4+
<body style="font-family: 'Noto Sans Mono'">
5+
<div>
6+
<p style="font-style: bold italic; font-weight: bold;">
7+
This text should be in monospace bold italic font. There is no default monospace bold italic font,
8+
with which this line was expected to be rendered, so Noto Sans Mono - Bold is used.
9+
</p>
10+
</div>
11+
</body>
12+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head></head>
4+
<body style="font-family: 'Noto Sans Mono'">
5+
<div>
6+
<p style="font-style: italic;">
7+
This text should be in monospace italic font. There is no default monospace italic font,
8+
with which this line was expected to be rendered, so Noto Sans Mono - Regular is used.
9+
</p>
10+
</div>
11+
</body>
12+
</html>

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
442c19868333223d9a733eb0305711ff790a0635
1+
fa1940922f618ce446c43ed0083a2f63883dce68

0 commit comments

Comments
 (0)