Skip to content

Commit

Permalink
make JetBrains Mono 13/1.2 default font configuration for the editor
Browse files Browse the repository at this point in the history
GitOrigin-RevId: e056c81fc7fa4f391f9a4f358a826b970cdc3eb3
  • Loading branch information
bulenkov authored and intellij-monorepo-bot committed Nov 13, 2019
1 parent 84cbc40 commit 07e34c2
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -14,7 +14,8 @@

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";
Expand Down Expand Up @@ -79,6 +80,9 @@ public static String getFallbackName(@NotNull String fontName, int fontSize, @Nu
}

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()) {
Expand Down

0 comments on commit 07e34c2

Please sign in to comment.