8262470: Printed GlyphVector outline with low DPI has bad quality on Windows #2756
Printing text using GlyphVector outline has bad quality on printers with low DPI on Windows.
The issue had been reported as JDK-8256264 but was reverted because of the regression JDK-8259007 "This test printed a blank page".
The fix JDK-8256264 scaled coordinates in wPrinterJob.moveTo()/lineTo() methods up and scaled transforms in wPrinterJob.beginPath()/endPath() down.
The regression was in the WPathGraphics.deviceDrawLine() method which uses wPrinterJob.moveTo()/lineTo() methods without surrounding them with wPrinterJob.beginPath()/endPath() so the line coordinates were only scaled up.
I tried to put wPrinterJob.beginPath()/endPath() methods around wPrinterJob.moveTo()/lineTo() in the method WPathGraphics.deviceDrawLine() but the line was not drawn at all even without scaling coordinates up and transform down (without JDK-8256264 fix). It looks like GDI treats this case as an empty shape.
The proposed fix applies path coordinates and transform scaling only in WPathGraphics.convertToWPath() method.
There are two failed automated tests which fail without the fix as well:
The following manual tests have issues on my system:
The text was updated successfully, but these errors were encountered:
@AlexanderScherbatiy This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 478 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@AlexanderScherbatiy Since your change was applied there have been 484 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 0228734.