On Fri, 8 Nov 2024 14:44:18 GMT, Daniel Gredler <dgred...@openjdk.org> wrote:

> This PR fixes the issue identified in JDK-8148334 in screenshots 
> `Page8_landscape.JPG` and `Page8_portrait.JPG`.
> 
> It does not address `mac_Page1.png` or `mac_Page8.png`, which I'm not even 
> sure are still issues (I have no access to a Mac).
> 
> The method in question, `PathGraphics.printedSimpleGlyphVector(...)` is quite 
> complex, with many special cases being handled in different ways. In this 
> specific scenario (page 8 of `PrintTextTest`), all special case checks fail, 
> and we fall through all the way to the final handling block, which draws the 
> individual characters one by one. It looks like the problem is that the font 
> transform translation is applied twice, once via the glyph positions, and 
> again by `drawString(...)` via the font. The proposed fix is to provide 
> `drawString(...)` a font without any translation transform.
> 
> Testing looks good on Linux, but needs to be done on Mac and Windows.

This pull request has now been integrated.

Changeset: c018a604
Author:    Daniel Gredler <dgred...@openjdk.org>
Committer: Phil Race <p...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/c018a604f6857e319bf8b14913c14dc2d36aaca1
Stats:     44 lines in 4 files changed: 21 ins; 13 del; 10 mod

8344637: Fix Page8 of manual test java/awt/print/PrinterJob/PrintTextTest.java 
on Linux and Windows

Reviewed-by: honkar, prr

-------------

PR: https://git.openjdk.org/jdk/pull/21980

Reply via email to