private void initDefaultFont( UIDefaults defaults ) {
		FontUIResource uiFont = null;

		// determine UI font based on operating system
		if( SystemInfo.isWindows ) {
			Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
			if( winFont != null ) {
				if( SystemInfo.isWinPE ) {
					// on WinPE use "win.defaultGUI.font", which is usually Tahoma,
					// because Segoe UI font is not available on WinPE
					Font winPEFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.defaultGUI.font" );
					if( winPEFont != null )
						uiFont = createCompositeFont( winPEFont.getFamily(), winPEFont.getStyle(), winFont.getSize() );
				} else
					uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
			}

		} else if( SystemInfo.isMacOS ) {
			String fontName;
			if( SystemInfo.isMacOS_10_15_Catalina_orLater ) {
				if (SystemInfo.isJetBrainsJVM_11_orLater) {
					// See https://youtrack.jetbrains.com/issue/JBR-1915
					fontName = ".AppleSystemUIFont";
				} else {
					// use Helvetica Neue font
					fontName = "Helvetica Neue";
				}
			} else if( SystemInfo.isMacOS_10_11_ElCapitan_orLater ) {
				// use San Francisco Text font
				fontName = ".SF NS Text";
			} else {
				// default font on older systems (see com.apple.laf.AquaFonts)
				fontName = "Lucida Grande";
			}

			uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );

		} else if( SystemInfo.isLinux ) {
			Font font = LinuxFontPolicy.getFont();
			uiFont = (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
		}

		// fallback
		if( uiFont == null )
			uiFont = createCompositeFont( Font.SANS_SERIF, Font.PLAIN, 12 );

		// use preferred font family (if specified)
		if( preferredFontFamily != null ) {
			FontUIResource preferredFont = createCompositeFont( preferredFontFamily, uiFont.getStyle(), uiFont.getSize() );
			if( !ActiveFont.isFallbackFont( preferredFont ) || ActiveFont.isDialogFamily( preferredFontFamily ) )
				uiFont = preferredFont;
		}

		// get/remove "defaultFont" from defaults if set in properties files
		// (use remove() to avoid that ActiveFont.createValue() gets invoked)
		Object defaultFont = defaults.remove( "defaultFont" );

		// use font from OS as base font and derive the UI font from it
		if( defaultFont instanceof ActiveFont ) {
			Font baseFont = uiFont;
			uiFont = ((ActiveFont)defaultFont).derive( baseFont, fontSize -> {
				return Math.round( fontSize * UIScale.computeFontScaleFactor( baseFont ) );
			} );
		}

		// increase font size if system property "flatlaf.uiScale" is set
		uiFont = UIScale.applyCustomScaleFactor( uiFont );

		// set default font
		defaults.put( "defaultFont", uiFont );
	}
Initialize Aqua LaF on macOS, which is required for using Mac screen menubar.
(at least on Java 8, since 9 it seems to work without it)
<p>
This loads the native library "osxui" and initializes JRSUI.
Because both are not unloaded/uninitialized, Aqua LaF is initialized only once.
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java