Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source and Console panes use unusable and not-obviously-changeable font #32

Open
ydirson opened this issue Apr 27, 2020 · 6 comments
Open

Comments

@ydirson
Copy link

ydirson commented Apr 27, 2020

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:

Screenshot_2020-04-27_21-03-28

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.

@bluebird75
Copy link
Owner

That's kind of weird indeed.

The default fixed font used to display the console and the program source code is "Courier". See

winpdb/winpdb.py

Line 3000 in 2082b8b

def set_font(self, ctrl):

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.

@bluebird75
Copy link
Owner

On which platform are you using winpdb ?

@bomm
Copy link

bomm commented Jul 13, 2020

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

@bluebird75
Copy link
Owner

Thanks, that's greatly appreciated ! I will look into WxPython to understand how to find a reliable fixed width font.

@bluebird75
Copy link
Owner

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.

@bluebird75
Copy link
Owner

Can you check with the version I just committed ? The font lookup is now more generic, it should fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants