From 8a37ce62ba357f9c7b5f53082d62a4be7f6548a7 Mon Sep 17 00:00:00 2001 From: Sergey Savenko Date: Mon, 1 Dec 2014 19:31:01 +0300 Subject: [PATCH] IDEA-133649: reuse secondary fonts in color scheme delegate --- .../com/intellij/openapi/editor/impl/EditorImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index 40eb995f1dbd..c8833a28f49f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -6039,6 +6039,16 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi myFontPreferences.clear(); myFontPreferences.register(editorFontName, editorFontSize); + EditorColorsScheme delegate = getDelegate(); + List secondaryFonts = delegate != null ? delegate.getFontPreferences().getRealFontFamilies() : ContainerUtil.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.class); Font plainFont = new Font(editorFontName, Font.PLAIN, editorFontSize);