private static void updateScaleFactor() {
		if( !isUserScalingEnabled() )
			return;

		// apply custom scale factor specified in system property "flatlaf.uiScale"
		float customScaleFactor = getCustomScaleFactor();
		if( customScaleFactor > 0 ) {
			setUserScaleFactor( customScaleFactor, false );
			return;
		}

		// use font size to calculate scale factor (instead of DPI)
		// because even if we are on a HiDPI display it is not sure
		// that a larger font size is set by the current LaF
		// (e.g. can avoid large icons with small text)
		Font font = null;
		if( UIManager.getLookAndFeel() instanceof FlatLaf )
			font = UIManager.getFont( "defaultFont" );
		if( font == null )
			font = UIManager.getFont( "Label.font" );

		setUserScaleFactor( computeFontScaleFactor( font ), true );
	}
Returns the system scale factor for the given graphics configuration.
flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java