RFR: 8367867: [macosx] Ignorable whitespace in text not removed when printing [v2]
Daniel Gredler
dgredler at openjdk.org
Wed Sep 17 14:51:32 UTC 2025
> When text is printed (or drawn to screen), some whitespace characters like new lines should be ignored (see `FontUtilities.isIgnorableWhitespace(int)`). This is currently not being done when printing on macOS, and is one (of about half a dozen) reasons why `java/awt/print/PrinterJob/PrintTextTest.java` is currently problem listed on macOS. Fixing this bug will get us one step closer to removing this test from the problem list.
>
> Within `PrintTextTest`, this issue can be seen specifically with the extra space before and after "drawChars(" on every page of the printed document. This whitespace should not be present.
>
> This change aligns behavior with printing on other platforms (see `RasterPrinterJob.removeControlChars(String)`) and with screen display on macOS (see `CCharToGlyphMapper`) and other platforms.
Daniel Gredler has updated the pull request incrementally with one additional commit since the last revision:
Update removeControlChars() JavaDoc
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27345/files
- new: https://git.openjdk.org/jdk/pull/27345/files/601ec463..f9c3bca5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27345&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27345&range=00-01
Stats: 8 lines in 1 file changed: 3 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/27345.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27345/head:pull/27345
PR: https://git.openjdk.org/jdk/pull/27345
More information about the client-libs-dev
mailing list