Open ydirson opened 4 years ago
That's kind of weird indeed.
The default fixed font used to display the console and the program source code is "Courier". See https://github.com/bluebird75/winpdb/blob/2082b8b296a0f87b5cbf062a5a179c80ecec32ab/winpdb.py#L3000
Could you try to change that and see if there is a different result ?
The settings.cfg is saved using pickle, this is why it is a binary format. It would be a good idea indeed to move to a text format.
Sorry for the delay and inswering your bug issue by the way.
On which platform are you using winpdb ?
I found the same problem on Ubuntu 20.04 (64 bit). I used "python -m pip install winpdb-reborn" to install as a normal user.
In def set_font(self, ctrl):
in the else
branch I replaced face = "Courier"
with face = "Cousine"
. (This was the first fixed width font I found in LibreOffice Writer.) This made the console view readable, but not the source code.
After replacing another occurrence of Courier
at line 2372 in def __init__(self, *args, **kwargs):
the source code is readable as well.
I just noticed that the installation of the Microsoft fonts fixes the problem:
sudo apt-get install ttf-mscorefonts-installer
Thanks, that's greatly appreciated ! I will look into WxPython to understand how to find a reliable fixed width font.
If you feel like fixing this, that would be of great help since you can investigate the problem directly. On Windows, the problem does not show up even if I force a non existing font. I just get text with a non fixed font, so Windows probably has a bettter default mechanism for this.
Can you check with the version I just committed ? The font lookup is now more generic, it should fix the problem.
First time I try out winpdb-reborn, having used winpdb in the past. I installed using pip3 for a test, all dependencies satisfied by the system (debian testing).
The Code ans Conssole panes are just unusable, this font is suprising:
Strace revealed the use of a
.winpdb_settings.cfg
file (binary content with no particular magic, OMG!), which I moved away with no better result.Also tried with a fresh user account that never used winpdb before, and without loading a script to debug, same result.