From 07e34c2b11b384739d30b60ad8ecec05a74717b9 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Wed, 13 Nov 2019 12:33:42 +0100 Subject: [PATCH] make JetBrains Mono 13/1.2 default font configuration for the editor GitOrigin-RevId: e056c81fc7fa4f391f9a4f358a826b970cdc3eb3 --- .../com/intellij/openapi/editor/colors/FontPreferences.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java index 3bc8e723972b..90865819bbcd 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java @@ -14,7 +14,8 @@ import java.util.List; public class FontPreferences { public final static @NonNls @NotNull String DEFAULT_FONT_NAME = getDefaultFontName(); - public final static int DEFAULT_FONT_SIZE = SystemInfo.isWindows ? 13 : FontSize.SMALL.getSize(); + public static final String JETBRAINS_MONO = "JetBrains Mono"; + public final static int DEFAULT_FONT_SIZE = SystemInfo.isWindows || JETBRAINS_MONO.equalsIgnoreCase(DEFAULT_FONT_NAME) ? 13 : FontSize.SMALL.getSize(); public final static float DEFAULT_LINE_SPACING = 1.2f; public final static String FALLBACK_FONT_FAMILY = "Monospaced"; @@ -79,6 +80,9 @@ public class FontPreferences { } public static String getDefaultFontName() { + if (SystemInfo.isJetBrainsJvm && SystemInfo.isJavaVersionAtLeast(11)) { + return JETBRAINS_MONO; + } if (SystemInfo.isWindows) return WINDOWS_DEFAULT_FONT_FAMILY; if (SystemInfo.isMacOSSnowLeopard) return MAC_OS_DEFAULT_FONT_FAMILY; if (SystemInfo.isXWindow && !GraphicsEnvironment.isHeadless() && !ApplicationManager.getApplication().isCommandLine()) {