RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object
Phil Race
prr at openjdk.org
Tue Mar 11 04:31:52 UTC 2025
On Mon, 17 Feb 2025 14:06:53 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.
Without even yet having looked at the fix in upstream I'll say something
In general I am not in favour of taking point fixes.
(1) we are supposed to say what version of [upstream library] is in JDK and where do you draw the line of we have version N, vs N+1.
(2) un-released patches may not be properly tested.
(3) They may be reverted, and then where are we ?
Upgrading harfbuzz is not frequent (we don't need busy work) but if there's a clear and valuable reason, it can be done.
In this case, there should be very few (weeks vs years) upstream changes, so I'd support doing it if it makes sense.
But I need to look at the specifics of the upstream fix.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23665#issuecomment-2712581534
More information about the client-libs-dev
mailing list