Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-05-01 Thread Johan Vos
On Mon, 27 Apr 2020 11:09:51 GMT, Alexander Scherbatiy  
wrote:

>> See the detailed issue description on: 
>> http://mail.openjdk.java.net/pipermail/openjfx-dev/2020-April/025975.html
>> 
>> The fix 8236448 https://github.com/openjdk/jfx/pull/75 changes
>> [MonocleApplication.staticScreen_getScreens()](https://github.com/openjdk/jfx/pull/75/files#diff-b66ff7fe72c6c5cd26003572ca901bfdL228)
>> method code from
>>> ns.getDPI(), ns.getDPI(), ns.getScale(), ns.getScale(), ns.getScale(), 
>>> ns.getScale()
>> 
>>  to
>>  > ns.getWidth(), ns.getHeight(), 1.f, 1.f, ns.getScale(), ns.getScale()"
>> 
>> so the font size is not properly calculated based on the given DPI value.
>> 
>> I left the platformScaleX and platformScaleY as 1.f because I do not know 
>> how it affects Android/Dalvik platform. On
>> Raspberry Pi where I run JavaFX code with Monocle the DispmanScreen is used 
>> which have fixed scale 1.0 value so the app
>> works in the same way.
>
> Alexander Scherbatiy has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Search javafx.platform.properties in jfx-runtime/lib directory

Marked as reviewed by jvos (Reviewer).

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-28 Thread Kevin Rushforth
On Mon, 27 Apr 2020 11:09:51 GMT, Alexander Scherbatiy  
wrote:

>> See the detailed issue description on: 
>> http://mail.openjdk.java.net/pipermail/openjfx-dev/2020-April/025975.html
>> 
>> The fix 8236448 https://github.com/openjdk/jfx/pull/75 changes
>> [MonocleApplication.staticScreen_getScreens()](https://github.com/openjdk/jfx/pull/75/files#diff-b66ff7fe72c6c5cd26003572ca901bfdL228)
>> method code from
>>> ns.getDPI(), ns.getDPI(), ns.getScale(), ns.getScale(), ns.getScale(), 
>>> ns.getScale()
>> 
>>  to
>>  > ns.getWidth(), ns.getHeight(), 1.f, 1.f, ns.getScale(), ns.getScale()"
>> 
>> so the font size is not properly calculated based on the given DPI value.
>> 
>> I left the platformScaleX and platformScaleY as 1.f because I do not know 
>> how it affects Android/Dalvik platform. On
>> Raspberry Pi where I run JavaFX code with Monocle the DispmanScreen is used 
>> which have fixed scale 1.0 value so the app
>> works in the same way.
>
> Alexander Scherbatiy has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Search javafx.platform.properties in jfx-runtime/lib directory

Marked as reviewed by kcr (Lead).

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-28 Thread Kevin Rushforth
On Tue, 28 Apr 2020 23:17:48 GMT, Kevin Rushforth  wrote:

>> Alexander Scherbatiy has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Search javafx.platform.properties in jfx-runtime/lib directory
>
> Marked as reviewed by kcr (Lead).

Pending review by @johanvos

> modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java line 241:
> 
>> 240: s.lastIndexOf('/'), s.lastIndexOf('\\'));
>> 241: return new File(new URL(s.substring(0, lastIndexOfSlash + 
>> 1)).getPath());
>> 242: } catch (MalformedURLException e) {
> 
> The previous code looks like a hold-over from JDK 8, where jfxrt.jar was in 
> `lib/ext`. It also assumes that the JavaFX
> runtime is being loaded from a jar URL, which isn't necessarily the case. 
> Probably the only reason it hasn't caused
> problems before now is that it is only used to locate 
> `javafx.platform.properties`. Worth noting is that we won't get
> here in the case JavaFX is jlinked into the Java runtime, although in that 
> case, the fallback method of locating it
> relative to the JDK should be used.  I'll take a closer look this specific 
> change, but I think it should be OK.  I'll
> defer the review as a whole to Johan.

I can confirm that this part of the fix is correct. The change to DPI looks 
correct to me, too.

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-27 Thread Kevin Rushforth
On Mon, 27 Apr 2020 11:09:51 GMT, Alexander Scherbatiy  
wrote:

>> See the detailed issue description on: 
>> http://mail.openjdk.java.net/pipermail/openjfx-dev/2020-April/025975.html
>> 
>> The fix 8236448 https://github.com/openjdk/jfx/pull/75 changes
>> [MonocleApplication.staticScreen_getScreens()](https://github.com/openjdk/jfx/pull/75/files#diff-b66ff7fe72c6c5cd26003572ca901bfdL228)
>> method code from
>>> ns.getDPI(), ns.getDPI(), ns.getScale(), ns.getScale(), ns.getScale(), 
>>> ns.getScale()
>> 
>>  to
>>  > ns.getWidth(), ns.getHeight(), 1.f, 1.f, ns.getScale(), ns.getScale()"
>> 
>> so the font size is not properly calculated based on the given DPI value.
>> 
>> I left the platformScaleX and platformScaleY as 1.f because I do not know 
>> how it affects Android/Dalvik platform. On
>> Raspberry Pi where I run JavaFX code with Monocle the DispmanScreen is used 
>> which have fixed scale 1.0 value so the app
>> works in the same way.
>
> Alexander Scherbatiy has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Search javafx.platform.properties in jfx-runtime/lib directory

modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java line 241:

> 240: s.lastIndexOf('/'), s.lastIndexOf('\\'));
> 241: return new File(new URL(s.substring(0, lastIndexOfSlash + 
> 1)).getPath());
> 242: } catch (MalformedURLException e) {

The previous code looks like a hold-over from JDK 8, where jfxrt.jar was in 
`lib/ext`. It also assumes that the JavaFX
runtime is being loaded from a jar URL, which isn't necessarily the case. 
Probably the only reason it hasn't caused
problems before now is that it is only used to locate 
`javafx.platform.properties`. Worth noting is that we won't get
here in the case JavaFX is jlinked into the Java runtime, although in that 
case, the fallback method of locating it
relative to the JDK should be used.

I'll take a closer look this specific change, but I think it should be OK.

I'll defer the review as a whole to Johan.

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-27 Thread Alexander Scherbatiy
On Mon, 27 Apr 2020 17:43:09 GMT, Johan Vos  wrote:

> I'm confused by this, what is the full version of JDK 14.0.1? JavaFX is not 
> part of the JDK anymore, therefore I don't
> expect a javafx.platform.properties in the JDK. Iif this is the case, it 
> seems a serious bug to me.

I used non Oracle jdk 14.0.1 build which full version includes JavaFX.

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-27 Thread Johan Vos
On Mon, 27 Apr 2020 15:49:31 GMT, John Neffenger 
 wrote:

>> Alexander Scherbatiy has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Search javafx.platform.properties in jfx-runtime/lib directory
>
> Thanks, Alexander! I just tested your pull request again, and JavaFX is now 
> picking up the properties file along with
> the correct native screen DPI on my Monocle ARM platform.

> > @AlexanderScherbatiy Did you move the _javafx.platform.properties_ file to 
> > its parent directory manually, as I just did?
> 
> I used the full version of jdk 14.0.1 on Raspberry Pi where JavaFX is 
> included in jdk so the file
> _javafx.platform.properties_ is already in jdk-14.0.1-full/lib directory.
> To debug the JavaFX on Raspberry Pi I built armv6hf-sdk and just copied the 
> file _javafx.platform.properties_ from the
> full jdk version with JavaFX to jdk-14.0.1/lib directory of jdk without 
> JavaFX which I used to run my java application
> with JavaFX modules from armv6hf-sdk/lib.

I'm confused by this, what is the full version of JDK 14.0.1? JavaFX is not 
part of the JDK anymore, therefore I don't
expect a javafx.platform.properties in the JDK. Iif this is the case, it seems 
a serious bug to me.

-

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-27 Thread John Neffenger
On Mon, 27 Apr 2020 11:09:51 GMT, Alexander Scherbatiy  
wrote:

>> See the detailed issue description on: 
>> http://mail.openjdk.java.net/pipermail/openjfx-dev/2020-April/025975.html
>> 
>> The fix 8236448 https://github.com/openjdk/jfx/pull/75 changes
>> [MonocleApplication.staticScreen_getScreens()](https://github.com/openjdk/jfx/pull/75/files#diff-b66ff7fe72c6c5cd26003572ca901bfdL228)
>> method code from
>>> ns.getDPI(), ns.getDPI(), ns.getScale(), ns.getScale(), ns.getScale(), 
>>> ns.getScale()
>> 
>>  to
>>  > ns.getWidth(), ns.getHeight(), 1.f, 1.f, ns.getScale(), ns.getScale()"
>> 
>> so the font size is not properly calculated based on the given DPI value.
>> 
>> I left the platformScaleX and platformScaleY as 1.f because I do not know 
>> how it affects Android/Dalvik platform. On
>> Raspberry Pi where I run JavaFX code with Monocle the DispmanScreen is used 
>> which have fixed scale 1.0 value so the app
>> works in the same way.
>
> Alexander Scherbatiy has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Search javafx.platform.properties in jfx-runtime/lib directory

Thanks, Alexander! I just tested your pull request again, and JavaFX is now 
picking up the properties file along with
the correct native screen DPI on my Monocle ARM platform.

-

Marked as reviewed by jgn...@github.com (no known OpenJDK username).

PR: https://git.openjdk.java.net/jfx/pull/193


Re: [Rev 01] RFR: 8243255: Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

2020-04-27 Thread Alexander Scherbatiy
> See the detailed issue description on: 
> http://mail.openjdk.java.net/pipermail/openjfx-dev/2020-April/025975.html
> 
> The fix 8236448 https://github.com/openjdk/jfx/pull/75 changes
> [MonocleApplication.staticScreen_getScreens()](https://github.com/openjdk/jfx/pull/75/files#diff-b66ff7fe72c6c5cd26003572ca901bfdL228)
> method code from
>> ns.getDPI(), ns.getDPI(), ns.getScale(), ns.getScale(), ns.getScale(), 
>> ns.getScale()
> 
>  to
>  > ns.getWidth(), ns.getHeight(), 1.f, 1.f, ns.getScale(), ns.getScale()"
> 
> so the font size is not properly calculated based on the given DPI value.
> 
> I left the platformScaleX and platformScaleY as 1.f because I do not know how 
> it affects Android/Dalvik platform. On
> Raspberry Pi where I run JavaFX code with Monocle the DispmanScreen is used 
> which have fixed scale 1.0 value so the app
> works in the same way.

Alexander Scherbatiy has updated the pull request incrementally with one 
additional commit since the last revision:

  Search javafx.platform.properties in jfx-runtime/lib directory

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/193/files
  - new: https://git.openjdk.java.net/jfx/pull/193/files/2551ce75..058e760a

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/193/webrev.01
 - incr: https://webrevs.openjdk.java.net/jfx/193/webrev.00-01

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/193.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/193/head:pull/193

PR: https://git.openjdk.java.net/jfx/pull/193