On Fri, 9 Feb 2024 22:44:07 GMT, Andy Goryachev <ango...@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)
>
> The test is failing on macOS 14.3:
> 
> 
> 3a93cdf4f7 HEAD@{0}: checkout: moving from review.rtl_hittest_issue to 
> review.wrapped-aligned-text-rendering
> 
> TextLayoutTest > caseTest(Case) > [7] SOFT_WRAP_WITH_COMPLEX_TEXT FAILED
>     org.opentest4j.AssertionFailedError: left aligned: line 0 for 
> Parameters[text=The quick brown लोमड़ी jumps over the lazy कुत्ता, 
> font=Font[name=Monaco, family=Monaco, style=Regular, size=12.0], 
> wrapWidth=200.0, lineWidths=[189.89648, 122.583984], ascent=12.0, 
> descent=4.001953] ==> expected: <RectBounds { minX:0.0, minY:-12.0, 
> maxX:189.89648, maxY:4.001953} (w:189.89648, h:16.001953)> but was: 
> <RectBounds { minX:0.0, minY:-12.0, maxX:187.00978, maxY:4.001953} 
> (w:187.00978, h:16.001953)>
>         at 
> app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>         at 
> app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
>         at 
> app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
>         at 
> app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
>         at 
> app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:468)
> 
> TextLayoutTest > caseTest(Case) > [8] 
> SOFT_WRAP_WITH_COMPLEX_TEXT_AND_EXTRA_TRAILING_SPACE FAILED
>     org.opentest4j.AssertionFailedError: left aligned: line 0 for 
> Parameters[text=The quick brown लोमड़ी jumps           over the lazy कुत्ता, 
> font=Font[name=Monaco, family=Monaco, style=Regular, size=12.0], 
> wrapWidth=200.0, lineWidths=[189.89648, 122.583984], ascent=12.0, 
> descent=4.001953] ==> expected: <RectBounds { minX:0.0, minY:-12.0, 
> maxX:189.89648, maxY:4.001953} (w:189.89648, h:16.001953)> but was: 
> <RectBounds { minX:0.0, minY:-12.0, maxX:187.00978, maxY:4.001953} 
> (w:187.00978, h:16.001953)>
>         at 
> app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>         at 
> app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
>         at 
> app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
>         at 
> app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1152)
>         at 
> app//test.com.sun.javafx.text.TextLayoutTest.caseTest(TextLayoutTest.java:468)
> 
> TextLayoutTest > fixedComplexTestsToEnsureNoFurtherRegressions() FAILED
>     org.opentest4j.AssertionFailedError: runCount ==> expected: <2> but was: 
> <1>
>         at 
> app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>         at 
> app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtil...

@andy-goryachev-oracle 

> The test is failing on macOS 14.3:

I can't do much here, I don't own a mac, and it does work in the build 
environment. Although I can't confirm that those tests actually run there...

My own two tests fail because there is some 3 pixel width difference when 
complex text is used.  The last test (an original one) fails due to a different 
number of runs.  This suggests that it is not switching between character sets 
when it encounters the complex glyphs, so perhaps the font it is using doesn't 
have those glyphs?

These are the reason I can think of why the test fails for you:

1. The test doesn't run on our build environment, and so it was never run on a 
mac before
2. There are multiple versions of the Monaco font
3. You don't have an international version of the Monaco font (if there is a 
distinction...) -- ie, the complex characters are rendered as "boxes" (that 
would be consistent with a width increase, the boxes are likely to be wider, 
and with a lower amount of runs)
4. You don't have the Monaco font at all, and it is falling back to something
5. Mac isn't consistent across different OS versions(?)

Perhaps we can add an assumption in this test so it only runs on our build 
environment?  All that matters (for me) is that no regressions get introduced, 
we'd just discover that a bit later then.

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

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

Reply via email to