FontMetrics (LookupElement item, boolean bold, Key<Font> key) { Font customFont = getCustomFont(item, bold, key); if (customFont != null) { return myLookup.getTopLevelEditor().getComponent().getFontMetrics(customFont); } return bold ? myBoldMetrics : myNormalMetrics; }