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

John Hendrikx jhendrikx at openjdk.org
Fri Feb 9 21:38:13 UTC 2024


On Fri, 9 Feb 2024 17:36:04 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> John Hendrikx has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add some clarifying documentation
>>  - Do not collapse trailing spaces of last line (where no soft wrap occurs)
>
> tests/system/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
> 
> weird, github shows this file as new, but it is not.
> 2024

It's sort of new, it's moved, it used to reside in the graphics project, but as it needs real fonts for its tests to work, it had to be a system test.

> tests/system/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java line 58:
> 
>> 56:     private final PrismTextLayout layout = new PrismTextLayout();
>> 57:     private final PGFont font = (PGFont) FontHelper.getNativeFont(Font.font("Monaco", 12));
>> 58:     private final PGFont font2 = (PGFont) FontHelper.getNativeFont(Font.font("Tahoma", 12));
> 
> are these fonts available on all platforms?
> what would happen if the font with this name is not found?

They may not be present on all platforms, but that doesn't matter. All that matters is that they're present in our 3 build environments (linux, mac, windows), and since the build is succeeding, they must be present :)

If they're not present, the test will simply fail.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1236#discussion_r1484825164
PR Review Comment: https://git.openjdk.org/jfx/pull/1236#discussion_r1484826625


More information about the openjfx-dev mailing list