RFR: 8356966: java/awt/Graphics2D/DrawString/IgnoredWhitespaceTest.java fails on Linux after JDK-8350203
Harshitha Onkar
honkar at openjdk.org
Wed May 14 20:41:55 UTC 2025
On Wed, 14 May 2025 17:45:54 GMT, Daniel Gredler <dgredler at openjdk.org> wrote:
> If the new test (`IgnoredWhitespaceTest`) runs on a system with Type1 physical fonts, it fails because the Type1 handling of ignorable whitespace characters does not match the behavior of the TrueType and macOS glyph mappers.
>
> This PR updates the Type1 glyph mapper to follow the same rules in this area as the other glyph mappers.
>
> It would probably be a good idea to consolidate all of this into the `CharToGlyphMapper` superclass at some point, so that we're not duplicating this handling across the subclasses, but some users are reporting failing builds and I wanted to keep the PR simple.
Since this issue specifically occurs on some flavors of linux (RHEL,SLES) I wasn't able verify the fix.
test/jdk/java/awt/Graphics2D/DrawString/IgnoredWhitespaceTest.java line 126:
> 124: .replace("\t", "\\t");
> 125: String msg = String.format("for text '%s' with font '%s': %s != %s",
> 126: escaped, font.getName(), r1.toString(), r2.toString());
Suggestion: you could get more details about the font using font.toString() or font.getAttributes()
-------------
PR Review: https://git.openjdk.org/jdk/pull/25235#pullrequestreview-2841436270
PR Review Comment: https://git.openjdk.org/jdk/pull/25235#discussion_r2089697980
More information about the client-libs-dev
mailing list