RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object [v2]
    Daniel Gredler 
    dgredler at openjdk.org
       
    Wed May  7 22:23:02 UTC 2025
    
    
  
> 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.
Daniel Gredler has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
 - Merge branch 'master' into ignored-whitespace
 - Make Graphics2D.drawString ignore tabs and newlines on macOS
 - Add actual bug ID
 - Add ignored whitespace test
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/23665/files
  - new: https://git.openjdk.org/jdk/pull/23665/files/a0aeed4a..db3a1ff7
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23665&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23665&range=00-01
  Stats: 499365 lines in 6751 files changed: 183758 ins; 279967 del; 35640 mod
  Patch: https://git.openjdk.org/jdk/pull/23665.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23665/head:pull/23665
PR: https://git.openjdk.org/jdk/pull/23665
    
    
More information about the client-libs-dev
mailing list