RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object

Harshitha Onkar honkar at openjdk.org
Mon Mar 10 20:40:54 UTC 2025


On Mon, 10 Mar 2025 20:13:51 GMT, Daniel Gredler <dgredler at 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.
>
> Good news: it looks like it was possible to resolve the `0xFFFF` conflict on the HarfBuzz side by adjusting the HarfBuzz internal representation of AAT deleted glyphs. Amazingly quick turnaround from @behdad! I think we'll want to put this PR on hold until the next HarfBuzz upgrade. How often are dependencies like HarfBuzz upgraded? I saw we just completed one today, coincidentally.

@gredler  Yes, JDK harfbuzz was just upgraded to v10.4.0 - https://github.com/openjdk/jdk/pull/23910.

@prrace Do we consider patching the fix from upstream for this upgrade or can it wait till the next time harfbuzz is upgraded  - https://github.com/harfbuzz/harfbuzz/pull/5119 ?

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

PR Comment: https://git.openjdk.org/jdk/pull/23665#issuecomment-2711768686


More information about the client-libs-dev mailing list