IDEA-133649: reuse secondary fonts in color scheme delegate

This commit is contained in:
Sergey Savenko
2014-12-01 21:25:17 +03:00
parent 31e8b2e590
commit 8a37ce62ba
@@ -6039,6 +6039,16 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
myFontPreferences.clear();
myFontPreferences.register(editorFontName, editorFontSize);
EditorColorsScheme delegate = getDelegate();
List<String> secondaryFonts = delegate != null ? delegate.getFontPreferences().getRealFontFamilies() : ContainerUtil.<String>emptyList();
boolean first = true; //skip delegate's primary font
for (String font : secondaryFonts) {
if (!first) {
myFontPreferences.register(font, editorFontSize);
}
first = false;
}
myFontsMap = new EnumMap<EditorFontType, Font>(EditorFontType.class);
Font plainFont = new Font(editorFontName, Font.PLAIN, editorFontSize);