JBFont (@NotNull Font font, boolean tryToScale) { if (font instanceof JBFont) { return ((JBFont)font); } Font scaled = font; if (tryToScale) { scaled = font.deriveFont(font.getSize() * JBUIScale.scale(1f)); } return new JBFont(scaled); }