summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MultiMC.cpp23
-rw-r--r--gui/pages/global/MultiMCPage.ui5
2 files changed, 18 insertions, 10 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp
index b7a68eea..c1af23e0 100644
--- a/MultiMC.cpp
+++ b/MultiMC.cpp
@@ -380,21 +380,32 @@ void MultiMC::initGlobalSettings(bool test_mode)
// Remembered state
m_settings->registerSetting("LastUsedGroupForNewInstance", QString());
- // in test mode, we don't have UI.
+ QString defaultMonospace;
+#ifdef Q_OS_WIN32
+ defaultMonospace = "Lucida Console";
+#elif Q_OS_MAC
+ defaultMonospace = "Menlo";
+#else
+ defaultMonospace = "Monospace";
+#endif
if(!test_mode)
{
- // Console settings
+ // resolve the font so the default actually matches
QFont consoleFont;
- consoleFont.setFamily("");
+ consoleFont.setFamily(defaultMonospace);
consoleFont.setStyleHint(QFont::Monospace);
consoleFont.setFixedPitch(true);
QFontInfo consoleFontInfo(consoleFont);
- QString consoleFontFamily = consoleFontInfo.family();
- m_settings->registerSetting("ConsoleFont", consoleFontFamily);
+ QString resolvedDefaultMonospace = consoleFontInfo.family();
+ QFont resolvedFont(resolvedDefaultMonospace);
+ QLOG_DEBUG() << "Detected default console font:" << resolvedDefaultMonospace
+ << ", substitutions:" << resolvedFont.substitutions().join(',');
+ m_settings->registerSetting("ConsoleFont", resolvedDefaultMonospace);
}
else
{
- m_settings->registerSetting("ConsoleFont", "Courier");
+ // in test mode, we don't have UI, so we don't do any font resolving
+ m_settings->registerSetting("ConsoleFont", defaultMonospace);
}
// FTB
diff --git a/gui/pages/global/MultiMCPage.ui b/gui/pages/global/MultiMCPage.ui
index 81c21558..78e92592 100644
--- a/gui/pages/global/MultiMCPage.ui
+++ b/gui/pages/global/MultiMCPage.ui
@@ -42,7 +42,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="featuresTab">
<attribute name="title">
@@ -383,9 +383,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="fontFilters">
- <set>QFontComboBox::MonospacedFonts</set>
- </property>
</widget>
</item>
</layout>