Skip to content

Commit 4d9f46d

Browse files
author
glenn.volckaert
committed
Adds proper handling of empty properties in CssFontFaceRule
DEVSIX-6339
1 parent e81ed88 commit 4d9f46d

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/FontFaceTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ public static void beforeClass() {
7777
createOrClearDestinationFolder(destinationFolder);
7878
}
7979

80+
81+
@LogMessages(messages = {
82+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.UNABLE_TO_RETRIEVE_FONT) })
83+
@Test
84+
public void emptyFontDefinitionTest() throws IOException, InterruptedException {
85+
runTest("emptyWebFontCssTest");
86+
}
87+
88+
8089
@Test
8190
public void droidSerifWebFontTest() throws IOException, InterruptedException {
8291
runTest("droidSerifWebFontTest");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@font-face {
2+
3+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link href='empty-font.css' rel='stylesheet' type='text/css'>
5+
</head>
6+
<body>
7+
<div>You can't reference an empty font definition</div>
8+
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)