设置物质标题栏字体

Setting Substance Titlebar Font

我正在尝试更改我的 Substance 小程序的字体。

Substance look and feel - dark skins 的文档中,标题栏有自定义字体。我已经通读了有关设置字体的文档,但没有任何结果。

我的标题现在是这样的:

如何更改 Substance/JFrame 标题栏字体?

来自 OP 的编辑:

SubstanceLookAndFeel.setFontPolicy(new FontPolicy() {
    public FontSet getFontSet(String arg0, UIDefaults arg1) {
        FontSet fontSet = new FontSet() {
            public FontUIResource getWindowTitleFont() {
                return new FontUIResource(new Font("Serif", Font.PLAIN, 12)); //this is where the title font changes
            }

            public FontUIResource getTitleFont() {
                return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
            }

            public FontUIResource getSmallFont() {
                return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
            }

            public FontUIResource getMessageFont() {
                return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
            }

            public FontUIResource getMenuFont() {
                return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
            }

            public FontUIResource getControlFont() {
                return new FontUIResource(new Font("Arial", Font.PLAIN, 12));
            }
        };
        return fontSet;
    }
});