Make one log font monospaced for all platforms.

The MonoSpaceFont of the LogWindow was using a Windows native way to
specify a font name.

Now it's using wxFONTFAMILY_TELETYPE.

On Win32 it will additionally request the specific font name "Consolas",
so it doesn't use ugly "Courier New". I pilfered that specialization
from Source/Core/DolphinWX/Cheats/ARCodeAddEdit.cpp.
This commit is contained in:
Niels Boehm 2017-06-29 06:53:50 +02:00
parent c29c1f92af
commit 68198d6c32
1 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,12 @@ void CLogWindow::CreateGUIControls()
m_FontChoice->Append(_("Selected font"));
DefaultFont = GetFont();
MonoSpaceFont.SetNativeFontInfoUserDesc("lucida console windows-1252");
MonoSpaceFont.SetFamily(wxFONTFAMILY_TELETYPE);
#ifdef _WIN32
// Windows uses Courier New for monospace even though there are better fonts.
MonoSpaceFont.SetFaceName("Consolas");
#endif
MonoSpaceFont.SetPointSize(DefaultFont.GetPointSize());
LogFont.push_back(DefaultFont);
LogFont.push_back(MonoSpaceFont);
LogFont.push_back(DebuggerFont);