From 9e05eb42b5eb3bfa6c35e9469894fc2eeb4cbf9a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 25 Jul 2018 13:52:49 +0200 Subject: [PATCH] Fix outdated comment in wxHtmlPrintout unit test This should have been part of 321854b5193b8025cce2ca76302aff9d96a105c8 which changed the code, but not the accompanying comment. --- tests/html/htmprint.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/html/htmprint.cpp b/tests/html/htmprint.cpp index 0209ecfe4d..64ce4b144e 100644 --- a/tests/html/htmprint.cpp +++ b/tests/html/htmprint.cpp @@ -59,9 +59,14 @@ TEST_CASE("wxHtmlPrintout::Pagination", "[html][print]") // the DPI-dependent factor, but it doesn't seem to be worth doing it). pr.SetMargins(0, 0, 0, 0, 0); - // We do need to use DPI-proportional font sizes in order for the text used - // in the page-break-inside:avoid test to take the same amount of pixels - // for any DPI (12 being the font size used by wxHtmlDCRenderer by default). + // Use font size in pixels to make it DPI-independent: if we just used a + // normal (say 12pt) font, it would have different height in pixels on 96 + // and 200 DPI systems, meaning that the text at the end of this test would + // take different number of (fixed to 1000px height) pages. + // + // We could also make the page height proportional to the DPI, but this + // would be more complicated as we also wouldn't be able to use hardcoded + // height attribute values in the HTML snippets below then. const wxFont fontFixedPixelSize(wxFontInfo(wxSize(10, 16))); pr.SetStandardFonts(fontFixedPixelSize.GetPointSize(), "Helvetica");