A tarball containing the wxPython demo and samples . It is highly encouraged for new wxPython users, and experienced ones too, to download this file. It is a great learning resource with tons of examples showing how to use various components of the wxPython library. Look for a file named like wxPython-demo-VERSION.tar.gz .
I had the same problem which I raised in another thread:
At the time I thought I had fixed it by uninstalling the Texlive-fonts-extra package to remove an alternative set of courier fonts.
What is strange is that I re-ran the fc-list | sort | grep -i courier command just now and it shows that I currently have the texlive courier fonts installed again! However, the code is being displayed correctly in the wxPython Demo.
When I did have the problem I was running wxPython 4.1.1 on Linux Mint 20, but I am now running wxPython 4.2.0 on Linux Mint 21.1.
This is an old post but i ran into this problem today 7/6/23
and found a work around.
I am using ubuntu 20.04 LTS, python 3.8, wxpython 4. ?
downloaded via pip yesterday.
As mentioned elsewhere, the demo file StyledTextCtrl_2.py
establishes platform dependent mappings for font aliases:
times, mono, helv => Times, Courier, Helvetica.
Using the open source FontManger app, i established substitutions such that
Times == FreeSerif,
Courier==FreeMono,
Helvetica==FreeSans.
I knew these Free* fonts were installed and could view them using FontManager.
This seems to have fixed the problem after the demo was restarted. My knowledge of linux font infrastructure is deficient. So i have no explanation to offer about the root cause of the issue.