@Override
 public void setEditorFontName(String fontName) {
   int editorFontSize = getEditorFontSize();
   myFontPreferences.clear();
   myFontPreferences.register(fontName, editorFontSize);
   initFonts();
 }
  private void readScheme(Element node) {
    myDeprecatedBackgroundColor = null;
    if (!SCHEME_ELEMENT.equals(node.getName())) {
      return;
    }

    setName(node.getAttributeValue(NAME_ATTR));
    int readVersion = Integer.parseInt(node.getAttributeValue(VERSION_ATTR, "0"));
    if (readVersion > CURR_VERSION) {
      throw new IllegalStateException("Unsupported color scheme version: " + readVersion);
    }

    myVersion = readVersion;
    String isDefaultScheme = node.getAttributeValue(DEFAULT_SCHEME_ATTR);
    boolean isDefault = isDefaultScheme != null && Boolean.parseBoolean(isDefaultScheme);
    if (!isDefault) {
      myParentScheme =
          DefaultColorSchemesManager.getInstance()
              .getScheme(node.getAttributeValue(PARENT_SCHEME_ATTR, DEFAULT_SCHEME_NAME));
    }

    for (final Object o : node.getChildren()) {
      Element childNode = (Element) o;
      String childName = childNode.getName();
      if (OPTION_ELEMENT.equals(childName)) {
        readSettings(childNode, isDefault);
      } else if (EDITOR_FONT.equals(childName)) {
        readFontSettings(childNode, myFontPreferences, isDefault);
      } else if (CONSOLE_FONT.equals(childName)) {
        readFontSettings(childNode, myConsoleFontPreferences, isDefault);
      } else if (COLORS_ELEMENT.equals(childName)) {
        readColors(childNode);
      } else if (ATTRIBUTES_ELEMENT.equals(childName)) {
        readAttributes(childNode);
      }
    }

    if (myDeprecatedBackgroundColor != null) {
      TextAttributes textAttributes = myAttributesMap.get(HighlighterColors.TEXT);
      if (textAttributes == null) {
        textAttributes =
            new TextAttributes(
                Color.black, myDeprecatedBackgroundColor, null, EffectType.BOXED, Font.PLAIN);
        myAttributesMap.put(HighlighterColors.TEXT, textAttributes);
      } else {
        textAttributes.setBackgroundColor(myDeprecatedBackgroundColor);
      }
    }

    if (myConsoleFontPreferences.getEffectiveFontFamilies().isEmpty()) {
      myFontPreferences.copyTo(myConsoleFontPreferences);
    }

    initFonts();
  }
 public void readExternal(Element parentNode) {
   if (SCHEME_ELEMENT.equals(parentNode.getName())) {
     readScheme(parentNode);
   } else {
     for (Element element : parentNode.getChildren(SCHEME_ELEMENT)) {
       readScheme(element);
     }
   }
   initFonts();
   myVersion = CURR_VERSION;
 }
 @Override
 public void setConsoleFontSize(int fontSize) {
   myConsoleFontPreferences.register(getConsoleFontName(), fontSize);
   initFonts();
 }
 @Override
 public void setConsoleFontPreferences(@NotNull FontPreferences preferences) {
   preferences.copyTo(myConsoleFontPreferences);
   initFonts();
 }
 @Override
 public void setEditorFontSize(int fontSize) {
   myFontPreferences.register(getEditorFontName(), fontSize);
   initFonts();
 }