diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/printer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index ff5a65b93..49135d79c 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -150,8 +150,12 @@ void Printer::render(int pages) QSize originalSize = profile->size(); if (collection.count() > 0) { - printFontScale = (double)collection.at(0).geometry().size().height() / (double)profile->size().height(); - profile->resize(collection.at(0).geometry().size()); + // A "standard" profile has about 600 pixels in height. + // Scale the fonts in the printed profile accordingly. + // This is arbitrary, but it seems to work reasonably. + QSize size = collection[0].geometry().size(); + printFontScale = size.height() / 600.0; + profile->resize(size); } profile->setFontPrintScale(printFontScale); |