RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v14]

John Hendrikx jhendrikx at openjdk.org
Sat Feb 10 04:01:03 UTC 2024


On Sat, 10 Feb 2024 00:40:41 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> And on Linux I get similar failures to my Windows system due to no Monaco font.

Was the Tahoma font available there (you can see from the `TextLayoutTest > fail()` test) ?

If so, I could rewrite most of the tests to use the Tahoma font, and then probably disable most of the tests for MacOS, unless we can find a font that is common to all platforms -- searching around the web, I get the impression that the fonts "Arial", "Verdana" and "Times New Roman" may be present on all three platforms.

The test isn't so much a test of the font rendering or engine, but a test of alignment and soft wrapping, so having it run on even one OS is a big win.  Variations in font, sizes, etc, don't really change what code paths are hit, just the resulting widths will be off by a few pixels (still need a specific font to use as baseline though as the test widths are manually picked to match).

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

PR Comment: https://git.openjdk.org/jfx/pull/1236#issuecomment-1936846984


More information about the openjfx-dev mailing list