Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8243255

Font size is large in JavaFX app with enabled Monocle on Raspberry Pi

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: openjfx14
    • Fix Version/s: openjfx15
    • Component/s: javafx
    • Labels:
    • Environment:

      Raspberry Pi 4 Model B
      OS: Raspbian GNU/Linux 10 (buster)

    • Subcomponent:
    • CPU:
      arm
    • OS:
      other

      Description

      The issue is reproduced with jdk 14.0.1 and not reproduced with jdk 13.0.1

      To reproduce the issue run the FontSizeSample JavaFX app below on Raspberry Pi with enabled Monocle:
      ---------------------------
      import javafx.application.Application;
      import javafx.scene.text.Font;
      import javafx.stage.Stage;
      import javafx.stage.Screen;
       
      public class FontSizeSample extends Application {
          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage primaryStage) {

              for(Screen screen: Screen.getScreens()) {
                  System.out.printf("screen: %s%n", screen);
              }

      double fontSize = Font.getDefault().getSize();
      System.out.printf("font size: %f%n", fontSize);
          }
      }
      ---------------------------
      The result with jdk 14.0.1:
      > java -Dglass.platform=Monocle FontSizeSample
      ----------------
      screen: javafx.stage.Screen@74d6a0fb bounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1280.0, maxY=720.0, width=1280.0, height=720.0] visualBounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1280.0, maxY=720.0, width=1280.0, height=720.0] dpi:1280.0 outputScale:(1.0,1.0)
      font size: 120.000000
      ----------------
      The screen DPI is 1280 and the default font size is 120.

      Run the same app with jdk 13.0.1:
      > java -Dglass.platform=Monocle FontSizeSample
      ----------------
      screen: javafx.stage.Screen@353aa0fb bounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1280.0, maxY=720.0, width=1280.0, height=720.0] visualBounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1280.0, maxY=720.0, width=1280.0, height=720.0] dpi:96.0 outputScale:(1.0,1.0)
      font size: 16.000000
      ----------------

      The screen DPI is 96 and the default font size is 16.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexsch Alexandr Scherbatiy
              Reporter:
              alexsch Alexandr Scherbatiy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: