Details
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.
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
- relates to
-
JDK-8236448 Remove unused and repair broken Android/Dalvik code
-
- Resolved
-