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

2024-03-27 Thread Andy Goryachev
On Wed, 27 Mar 2024 22:20:42 GMT, Marius Hanl wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >> T

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

2024-03-27 Thread Marius Hanl
On Tue, 26 Mar 2024 20:53:17 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> improve (stub) font tests, fallback and documentation > > modules/javafx.graphics/src/test/java/test/com/sun/javafx/pg

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

2024-03-27 Thread Marius Hanl
> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings > of the stub font implementation. As I don't want to clutter the PR with that, > I decided to cherrypick the improvements I did to a new ticket and PR. > > The current implementation has the following shortcomings: >

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

2024-03-27 Thread Andy Goryachev
On Tue, 26 Mar 2024 20:47:37 GMT, Marius Hanl wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >> T

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

2024-03-27 Thread Marius Hanl
On Tue, 26 Mar 2024 20:36:02 GMT, Andy Goryachev wrote: >> I can also use `round` here. Seems to be a bit safer, I agree. > > thank you. > > one more question - is it possible to set fractional scale with the > StubToolkit, and how would that work in the StubFontLoader? Does it mean > we'll b

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

2024-03-26 Thread Andy Goryachev
On Tue, 26 Mar 2024 20:49:00 GMT, Marius Hanl wrote: > Yes, it should! Thank you so much for the code and explanations! I'll try to do a formal review tomorrow, using Labeled.truncated as a test bed. - PR Comment: https://git.openjdk.org/jfx/pull/1422#issuecomment-2021457118

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

2024-03-26 Thread Andy Goryachev
On Tue, 26 Mar 2024 20:47:37 GMT, Marius Hanl wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >> T

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

2024-03-26 Thread Andy Goryachev
On Tue, 26 Mar 2024 20:25:07 GMT, Marius Hanl wrote: >> I am not sure why this is needed here, so my concern stems from the fact >> that `ceil()` might introduce a large bias (0.01 -> 1.0), and `rnd()` >> _seems_ to be a better choice. >> >> But then again, ceil() or rnd() might be a wrong

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

2024-03-26 Thread Marius Hanl
On Mon, 25 Mar 2024 23:00:25 GMT, Marius Hanl wrote: >> modules/javafx.graphics/src/test/java/test/com/sun/javafx/pgstub/StubFontLoader.java >> line 76: >> >>> 74: FontHelper.setNativeFont(font, nativeFont, >>> font.getName(), "Amble LtCn", "Regular"); >>> 75: c

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

2024-03-26 Thread Marius Hanl
On Tue, 26 Mar 2024 20:40:11 GMT, Andy Goryachev wrote: > If I write a test that uses the StubToolkit, one that requires some kind of > font metrics - would that work? Will I get some kind of semi-valid values for > preferred width of a text (Text, Labeled, etc.), or I cannot really rely on >

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

2024-03-26 Thread Marius Hanl
> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings > of the stub font implementation. As I don't want to clutter the PR with that, > I decided to cherrypick the improvements I did to a new ticket and PR. > > The current implementation has the following shortcomings: >

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

2024-03-26 Thread Andy Goryachev
On Thu, 21 Mar 2024 22:06:42 GMT, Marius Hanl wrote: > In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings > of the stub font implementation. As I don't want to clutter the PR with that, > I decided to cherrypick the improvements I did to a new ticket and PR. > > The cu

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

2024-03-26 Thread Marius Hanl
On Mon, 25 Mar 2024 23:11:12 GMT, Andy Goryachev 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 stem

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

2024-03-25 Thread Andy Goryachev
On Mon, 25 Mar 2024 22:49:22 GMT, Marius Hanl wrote: >> modules/javafx.controls/src/test/java/test/javafx/scene/chart/AreaChartTest.java >> line 538: >> >>> 536: .map(lineTo -> new Point2D( >>> 537: >>> Math.ceil(xAxis.getValueForDisplay(lineTo.getX()).d

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

2024-03-25 Thread Marius Hanl
On Fri, 22 Mar 2024 22:32:25 GMT, Andy Goryachev wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >

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

2024-03-25 Thread Marius Hanl
On Fri, 22 Mar 2024 22:37:09 GMT, Andy Goryachev wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >

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

2024-03-25 Thread Marius Hanl
On Fri, 22 Mar 2024 22:29:32 GMT, Andy Goryachev wrote: >> In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings >> of the stub font implementation. As I don't want to clutter the PR with >> that, I decided to cherrypick the improvements I did to a new ticket and PR. >> >

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

2024-03-22 Thread Andy Goryachev
On Thu, 21 Mar 2024 22:06:42 GMT, Marius Hanl wrote: > In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings > of the stub font implementation. As I don't want to clutter the PR with that, > I decided to cherrypick the improvements I did to a new ticket and PR. > > The cu

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

2024-03-21 Thread Marius Hanl
In https://github.com/openjdk/jfx/pull/1405, I identified some shortcomings of the stub font implementation. As I don't want to clutter the PR with that, I decided to cherrypick the improvements I did to a new ticket and PR. The current implementation has the following shortcomings: - It does no