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 8d5271faee51..9f9c392fc530 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 @@ -31,7 +31,8 @@ public interface FontPreferences { float DEFAULT_LINE_SPACING = 1.0f; String MAC_OS_DEFAULT_FONT_FAMILY = "Menlo"; String LINUX_DEFAULT_FONT_FAMILY = "DejaVu Sans Mono"; - String WINDOWS_DEFAULT_FONT_FAMILY = "Monospaced"; + String WINDOWS_DEFAULT_FONT_FAMILY = "Consolas"; + String FALLBACK_FONT_FAMILY = "Monospaced"; @NotNull List getEffectiveFontFamilies(); @@ -84,6 +85,7 @@ public interface FontPreferences { return font.getFontName(); } } + return FALLBACK_FONT_FAMILY; } return WINDOWS_DEFAULT_FONT_FAMILY; } diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java index e61c542cde33..e0c3c0622f4e 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImplTest.java @@ -67,11 +67,11 @@ public class EditorColorsSchemeImplTest extends EditorColorSchemeTestCase { /** * TODO FIX PROPERLY * This is a hack: since font name is taken from default scheme (why?) where it is explicitly defined as "Dejavu Sans", font names - * do not match because default font name on linux in headless environment falls back to WINDOWS_DEFAULT_FONT_FAMILY (why?) + * do not match because default font name on linux in headless environment falls back to FALLBACK_FONT_FAMILY */ private static String substLinuxFontName(@NotNull String fontName) { return SystemInfo.isLinux && GraphicsEnvironment.isHeadless() && FontPreferences.LINUX_DEFAULT_FONT_FAMILY.equals(fontName)? - FontPreferences.WINDOWS_DEFAULT_FONT_FAMILY : + FontPreferences.FALLBACK_FONT_FAMILY : fontName; }