Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ private static void drawText(RenderingContext c, BlockBox box, IdentValue listSt

c.getOutputDevice().setColor(box.getStyle().getColor());
c.getOutputDevice().setFont(box.getStyle().getFSFont(c));
if (c.getOutputDevice() instanceof AbstractOutputDevice) {
((AbstractOutputDevice) c.getOutputDevice()).setFontSpecification(box.getStyle().getFontSpecification());
}
c.getTextRenderer().drawString(
c.getOutputDevice(), text.getText(), x, y);
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>
<head>
<style>
p {
page-break-after: always;
}
</style>
</head>
<body>
<p>
<b>bolded text</b>
</p>
<ol>
<li>counter should not be bold</li>
</ol>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,15 @@ public void testFloatClearBoth() throws IOException {
public void testBorderRadius() throws IOException {
assertTrue(vt.runTest("border-radius"));
}

/**
* Check counter style after page break, it should not be affected by a previous bolded text, see issue
* https://github.com/danfickle/openhtmltopdf/issues/366
*/
@Test
public void testListCounterAfterPageBreak() throws IOException {
assertTrue(vt.runTest("list-counter-after-page-break"));
}

// TODO:
// + Elements that appear just on generated overflow pages.
Expand Down