FontMetrics () { // Disable kerning for font because of huge performance penalty // String width will increase a bit but it's OK here Font font = getFont().deriveFont( Collections.singletonMap(TextAttribute.KERNING, Integer.valueOf(0))); return getFontMetrics(font); }