diff --git a/src/gd_sophia_editor.erl b/src/gd_sophia_editor.erl index dff5e3e..99f73a7 100644 --- a/src/gd_sophia_editor.erl +++ b/src/gd_sophia_editor.erl @@ -9,7 +9,18 @@ new(Parent, Id, Opts) -> %% Set up the container lexer wxStyledTextCtrl:setLexer(STC, ?wxSTC_LEX_CONTAINER), - + + FontSize = 13, + Mono = wxFont:new(FontSize, ?wxFONTFAMILY_TELETYPE, ?wxFONTSTYLE_NORMAL, + ?wxFONTWEIGHT_NORMAL, [{face, "Monospace"}]), + lists:foreach( + fun(Style) -> + wxStyledTextCtrl:styleSetFont(STC, Style, Mono) + end, + lists:seq(0, 6) + ), + %% + wxStyledTextCtrl:styleSetFont(STC, ?wxSTC_STYLE_DEFAULT, Mono), %% Define styles set_colors(STC), %% Connect the styling event