On Thu, 25 Sep 2025 12:49:31 GMT, Daniel Gredler <[email protected]> wrote:

> This PR fixes one more issue preventing 
> `test/jdk/java/awt/print/PrinterJob/PrintTextTest.java` from being removed 
> from the problem list on macOS. The issue is the placement of line 8 
> ("GlyphVector with position adjustments") during printing. There were two 
> issues: (a) the necessary transform was being applied to each glyph position, 
> but not to the initial start position, and (b) the y-advances were being 
> unnecessarily inverted. This last one is a head-scratcher, because it seems 
> very intentional, but seems to generate incorrect results (every second 
> character was drawing below the line instead of above it).

I've run the test with and without the fix - printing out all pages.
I see this fix correcting some cases, and don't see any new problems. Plenty 
remain of course but no new ones.
On-screen rendering is unaffected - SFAIK only printing ever uses this code.

The only thing I ask is that we annotate PrintTextTest.java with this bug id in 
the @bug tag

I don't know why that comment about the negative sign was there. The bug report 
dates from the very introduction of the macOS port and that line is part of 
what was contributed.
And we obviously already had that test, but I doubt Apple had a copy of it so 
likely never ran it pre-idk 7
But once upon a time, (JDK 1.5?) Apple used Quartz for on-screen. Perhaps that 
was needed in such a case because the coordinate system there  is flipped 
relative to this printer case ??

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

PR Comment: https://git.openjdk.org/jdk/pull/27486#issuecomment-3335886575

Reply via email to