On Mon, 17 Feb 2025 14:06:53 GMT, Daniel Gredler <dgred...@openjdk.org> wrote:
> On other platforms like Windows and Linux, the `\n`, `\r` and `\t` characters > are ignored when drawing text to a `Graphics2D` object. On macOS this is not > currently the case. > > See, for example, `CMap.getControlCodeGlyph(int, boolean)` or > `RasterPrinterJob.removeControlChars(String)`. > > This bug was found while running > `test/jdk/java/awt/print/PrinterJob/PrintTextTest.java` on macOS. > > The new test class passes on Linux, Windows and macOS. This pull request has now been integrated. Changeset: 85db4631 Author: Daniel Gredler <dgred...@openjdk.org> Committer: Alexey Ivanov <aiva...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/85db4631ae5208fba74fa8b8638c32d4e42d3268 Stats: 195 lines in 2 files changed: 193 ins; 0 del; 2 mod 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object 8353187: Test TextLayout/TestControls fails on macOS: width of 0x9, 0xa, 0xd isn't zero Reviewed-by: honkar, aivanov, prr ------------- PR: https://git.openjdk.org/jdk/pull/23665