我正在向 JLabel 添加一种有点奇怪的字体,它没有按应有的方式显示

I am adding a font that is a little bit odd to a JLabel and it's not displaying as it should

所以我正在使用 Swing 开发一个小项目,我正在尝试将字体添加到 JLabel,字体有点奇怪,它叫做 you murderer bb,我已经在使用我添加的一种字体,它工作正常,但是当我对这个很好地做同样的事情时......它只显示一种常规字体。

private Font font;
File fontFile = new File("resources\fonts\Nunito-Regular.ttf");

try {
    font = Font.createFont(Font.TRUETYPE_FONT, fontFile);
    font = font.deriveFont(14f);
} catch (FontFormatException | IOException e) {
    e.printStackTrace();
}

private Font titleFont;
fontFile = new File("resources\fonts\youmurdererbb_reg.ttf");

try {
    titleFont = Font.createFont(Font.TRUETYPE_FONT, fontFile);
    titleFont = font.deriveFont(40f);
} catch (FontFormatException | IOException e) {
    e.printStackTrace();
}

private JLabel title;
title = new JLabel("Welcom To Eureka");
title.setFont(titleFont);
title.setHorizontalAlignment(SwingConstants.CENTER);
title.setForeground(Color.decode("#FFFFFF"));
title.setBounds(228, 125, 354, 50);

private JLabel username;
username = new JLabel("Log In");
username.setFont(font);
username.setHorizontalAlignment(SwingConstants.CENTER);
username.setForeground(Color.decode("#BB86FC"));
username.setBounds(682, 80, 48, 20);
username.addMouseListener(new AppControler());

所以 username 工作正常并显示正确的字体但是 title 只是显示更大的字体(我将它的大小设置为 40)但字体不是那个我正在使用

titleFont = Font.createFont(Font.TRUETYPE_FONT, fontFile);
titleFont = font.deriveFont(40f);

应该是:

titleFont = Font.createFont(Font.TRUETYPE_FONT, fontFile);
titleFont = titleFont.deriveFont(40f); // <- use the font just created!

结果(一旦第一个单词拼写改变):