@@ -44,13 +44,32 @@ def theme_color( thing, theme=None ):
4444 theme = sg .CURRENT_LOOK_AND_FEEL
4545 return sg .LOOK_AND_FEEL_TABLE [theme ][thing ]
4646
47+ # Try to pick a font; Use something like this to see what's available (ya, this sucks):
48+ #
49+ # from tkinter import Tk, font
50+ # root = Tk()
51+ # font_tuple = font.families()
52+ # #Creates a Empty list to hold font names
53+ # FontList=[]
54+ # fonts = [font.Font(family=f) for f in font.families()]
55+ # monospace = [f for f in fonts if f.metrics("fixed")]
56+ # for font in monospace:
57+ # FontList.append(font.actual('family'))
58+ # root.destroy()
59+ # print( '\n'.join( FontList ))
60+ if sys .platform == 'darwin' :
61+ font_name = 'Source Code Pro'
62+ elif sys .platform == 'win32' :
63+ font_name = 'Consolas'
64+ else : # assume linux
65+ font_name = 'DejaVu Sans Mono'
4766
4867font_points = 14
49- font = ('Courier' , font_points + 0 )
50- font_dense = ('Courier' , font_points - 2 )
51- font_small = ('Courier' , font_points - 4 )
52- font_big = ('Courier' , font_points + 2 )
53- font_bold = ('Courier' , font_points + 2 , 'bold italic' )
68+ font = (font_name , font_points + 0 )
69+ font_dense = (font_name , font_points - 2 )
70+ font_small = (font_name , font_points - 4 )
71+ font_big = (font_name , font_points + 2 )
72+ font_bold = (font_name , font_points + 2 , 'bold italic' )
5473
5574I_kwds = dict (
5675 change_submits = True ,
@@ -1018,7 +1037,7 @@ def app(
10181037
10191038 group_threshold = int ( threshold ) if threshold else math .ceil ( len ( groups ) * GROUP_THRESHOLD_RATIO )
10201039
1021- sg .CURRENT_LOOK_AND_FEEL = sg .theme ( THEME ) # Why? This module global should have updated...
1040+ sg .CURRENT_LOOK_AND_FEEL = sg .theme ( THEME ) # Why? This module global should have updated...
10221041
10231042 # Try to set a sane initial CWD (for saving generated files). If we start up in the standard
10241043 # macOS App's "Container" directory for this App, ie.:
0 commit comments