Skip to content

Commit 0237063

Browse files
Kate IvanovaiText-CI
authored andcommitted
Move html tests from FT repository
DEVSIX-3038
1 parent 832c192 commit 0237063

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

src/test/java/com/itextpdf/html2pdf/FontProviderTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,11 @@ public void devanagariTest() throws IOException, InterruptedException {
8484
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "devanagari.pdf", sourceFolder + "cmp_devanagari.pdf", destinationFolder, "diffDevanagari_"));
8585
}
8686

87+
@Test
88+
//For more specific tests see FontSelectorTimesFontTest in html2pdf and FontSelectorHelveticaFontTest in html2pdf-private
89+
public void convertStandardFonts() throws IOException, InterruptedException {
90+
HtmlConverter.convertToPdf(new File(sourceFolder + "convertStandardFonts.html"), new File(destinationFolder + "convertStandardFonts.pdf"));
91+
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "convertStandardFonts.pdf", sourceFolder + "cmp_convertStandardFonts", destinationFolder, "difffontstand_"));
92+
}
93+
8794
}
Binary file not shown.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
4+
<title>Standard Type 1 fonts</title>
5+
</head>
6+
<body>
7+
<h1>Standard Type 1 fonts</h1>
8+
These fonts are never embedded.
9+
<table width="100%" padding="3pt">
10+
<tbody>
11+
<tr>
12+
<th>Font family</th>
13+
<th>Font name</th>
14+
<th>Example</th>
15+
</tr>
16+
<tr>
17+
<td rowspan="4">Helvetica</td>
18+
<td>Helvetica regular</td>
19+
<td style="font-family: helvetica">quick brown fox jumps over the lazy dog</td>
20+
</tr>
21+
<tr>
22+
<td>Helvetica bold</td>
23+
<td style="font-family: helvetica; font-weight: bold;">quick brown fox jumps over the lazy dog</td>
24+
</tr>
25+
<tr>
26+
<td>Helvetica oblique</td>
27+
<td style="font-family: helvetica; font-style: italic;">quick brown fox jumps over the lazy dog</td>
28+
</tr>
29+
<tr>
30+
<td>Helvetica bold-oblique</td>
31+
<td style="font-family: helvetica; font-weight: bold; font-style: italic;">quick brown fox jumps over the lazy
32+
dog
33+
</td>
34+
</tr>
35+
<tr>
36+
<td rowspan="4">Times-Roman</td>
37+
<td>Times-Roman regular</td>
38+
<td style="font-family: times">quick brown fox jumps over the lazy dog</td>
39+
</tr>
40+
<tr>
41+
<td>Times-Roman bold</td>
42+
<td style="font-family: times; font-weight: bold;">quick brown fox jumps over the lazy dog</td>
43+
</tr>
44+
<tr>
45+
<td>Times-Roman italic</td>
46+
<td style="font-family: times; font-style: italic;">quick brown fox jumps over the lazy dog</td>
47+
</tr>
48+
<tr>
49+
<td>Times-Roman bold-italic</td>
50+
<td style="font-family: times; font-weight: bold; font-style: italic;">quick brown fox jumps over the lazy dog
51+
</td>
52+
</tr>
53+
<tr>
54+
<td rowspan="4">Courier</td>
55+
<td>Courier regular</td>
56+
<td style="font-family: courier">quick brown fox jumps over the lazy dog</td>
57+
</tr>
58+
<tr>
59+
<td>Courier bold</td>
60+
<td style="font-family: courier; font-weight: bold;">quick brown fox jumps over the lazy dog</td>
61+
</tr>
62+
<tr>
63+
<td>Courier oblique</td>
64+
<td style="font-family: courier; font-style: italic;">quick brown fox jumps over the lazy dog</td>
65+
</tr>
66+
<tr>
67+
<td>Courier bold-oblique</td>
68+
<td style="font-family: courier; font-weight: bold; font-style: italic;">quick brown fox jumps over the lazy
69+
dog
70+
</td>
71+
</tr>
72+
<tr>
73+
<td>Symbol</td>
74+
<td>Symbol</td>
75+
<td style="font-family: symbol">0123456789</td>
76+
</tr>
77+
<tr>
78+
<td>ZapfDingbats</td>
79+
<td>ZapfDingbats</td>
80+
<td style="font-family: zapfdingbats">&nbsp;</td>
81+
</tr>
82+
</tbody>
83+
</table>
84+
85+
</body>
86+
</html>

0 commit comments

Comments
 (0)