From a29aae25fcd458109dbdc2e5e62994ba0ab6ce64 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 31 May 2020 23:44:52 +0200 Subject: [PATCH] Use a different font for the MinimalEditor in the STC example wxSYS_ANSI_FIXED_FONT uses 'Courier' font, which is rendered small on high DPI displays. Use wxFONTFAMILY_TELETYPE instead, which will use font 'Courier New'. --- samples/stc/stctest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 300470883b..d7aef83b25 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -758,7 +758,7 @@ public: } virtual bool SetFont(const wxFont& font) wxOVERRIDE { - StyleSetFont(wxSTC_STYLE_DEFAULT, (wxFont&)font); + StyleSetFont(wxSTC_STYLE_DEFAULT, font); return wxStyledTextCtrl::SetFont(font); } void SetLexerXml() @@ -818,7 +818,7 @@ public: MinimalEditorFrame() : wxFrame(NULL, wxID_ANY, _("Minimal Editor")) { MinimalEditor* editor = new MinimalEditor(this); - editor->SetFont(wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT)); + editor->SetFont(wxFontInfo().Family(wxFONTFAMILY_TELETYPE)); wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(editor, 1, wxEXPAND); SetSizer(sizer);