RFR: JDK-8328750: [TestBug] Improve Stub Font Support

Marius Hanl mhanl at openjdk.org
Tue Mar 26 20:27:27 UTC 2024


On Mon, 25 Mar 2024 23:11:12 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> AFAIK, we do not have other tests with that problem.
>> I tried to keep the diff small, but nothing against writing a better method to compare the points here with a delta.
>
> I am not sure why this is needed here, so my concern stems from the fact that `ceil()` might introduce a large bias (0.000001 -> 1.0), and `rnd()` _seems_ to be a better choice.
> 
> But then again, ceil() or rnd() might be a wrong thing to do if we are dealing with scaled coordinates and we don't expect the whole integers, but instead are dealing with small differences between expected and obtained values (in which case a better comparison is required).

I can also use `round` here. Seems to be a bit safer, I agree.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1422#discussion_r1540048636


More information about the openjfx-dev mailing list