private static void readFontSettings( @NotNull Element element, @NotNull FontPreferences preferences, boolean isDefaultScheme) { List children = element.getChildren(OPTION_ELEMENT); String fontFamily = null; int size = -1; for (Object child : children) { Element e = (Element) child; if (EDITOR_FONT_NAME.equals(e.getAttributeValue(NAME_ATTR))) { fontFamily = getValue(e); } else if (EDITOR_FONT_SIZE.equals(e.getAttributeValue(NAME_ATTR))) { try { size = Integer.parseInt(getValue(e)); if (isDefaultScheme) { size = JBUI.scale(size); } } catch (NumberFormatException ex) { // ignore } } } if (fontFamily != null && size > 1) { preferences.register(fontFamily, size); } else if (fontFamily != null) { preferences.addFontFamily(fontFamily); } }