title: How to get system DPI in JavaFX?
body: <p>Since Java 8u60, JavaFX seems to implicitly scale all coordinates based on current system DPI. </p>
  
  <p>For example if Windows DPI settings are changed from 100% (96 DPI) to 200% (192 DPI) JavaFX makes all components twice as large, as expected. This is true whether or not coordinates are given in em units or pixels.</p>
  
  <p>However, <code>Screen.getPrimary().getDpi()</code> still returns 96, probably because DPI of the screen hasn't actually changed, only system DPI settings.</p>
  
  <p>How to get that system DPI value which is used by JavaFX to scale components?</p>