Calibri Font when in <html> text moves to the bottom part of the component
问题 There is not a lot to explain. Just see the MCVE/image below: public class FontExample extends JFrame { private static final Font FONT = new Font("Calibri", Font.PLAIN, 14); public FontExample() { super(""); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout()); JLabel withoutHtml = new JLabel("hello stackoverflow"); withoutHtml.setFont(FONT); withoutHtml.setBorder(BorderFactory.createLineBorder(Color.red)); add(withoutHtml); JLabel withHtml = new JLabel("<html><body