Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python EasyGUI module: how to change the font

How can you change the font settings for the input boxes and message text in EasyGUI? I know you have to edit a file somewhere, but that's about it. Exactly how to do it and what to edit would be appreciated.

Thanks in advance.

like image 681
Aristides Avatar asked Mar 24 '23 09:03

Aristides


2 Answers

Go to your python folder\Lib\site-packages\easygui and then open the easygui.py file in your text editor. If you scroll through that file it's very close to the top. You should see this in the code and you can just change it accordingly.

PROPORTIONAL_FONT_FAMILY = ("MS", "Sans", "Serif")
MONOSPACE_FONT_FAMILY    = ("Courier")

PROPORTIONAL_FONT_SIZE  = 10
MONOSPACE_FONT_SIZE     =  9 
TEXT_ENTRY_FONT_SIZE    = 12  
like image 94
Benjooster Avatar answered Apr 26 '23 20:04

Benjooster


In addition to what @Benjooster answered previously: Apparently sometimes the font settings are not in easygui.py, but rather in Python27\Lib\site-packages\easygui\boxes\state.py

like image 28
TVogt Avatar answered Apr 26 '23 18:04

TVogt