Set monospace font

This commit is contained in:
Ulf Wiger 2025-03-30 22:15:02 +02:00
parent 27b78f8623
commit d4f2b3f2b0

View File

@ -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