diff --git a/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/ListItemPainter.java b/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/ListItemPainter.java index a2f146ecc..e4025bedc 100755 --- a/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/ListItemPainter.java +++ b/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/ListItemPainter.java @@ -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); } diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/expected/list-counter-after-page-break.pdf b/openhtmltopdf-examples/src/main/resources/visualtest/expected/list-counter-after-page-break.pdf new file mode 100644 index 000000000..f4dfeb1ce Binary files /dev/null and b/openhtmltopdf-examples/src/main/resources/visualtest/expected/list-counter-after-page-break.pdf differ diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/list-counter-after-page-break.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/list-counter-after-page-break.html new file mode 100644 index 000000000..cbabf7a48 --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/list-counter-after-page-break.html @@ -0,0 +1,17 @@ + +
+ + + ++ bolded text +
+