Skip to content

Commit 2f97b7d

Browse files
committed
Issue #26673: Protect IDLE from Linux fonts with reported default size 0.
Such fonts on Linux prevented the configuration dialog from opening.
1 parent a11295d commit 2f97b7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/idlelib/configHandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def GetFont(self, root, configType, section):
720720
actualFont = Font.actual(f)
721721
family = actualFont['family']
722722
size = actualFont['size']
723-
if size < 0:
723+
if size <= 0:
724724
size = 10 # if font in pixels, ignore actual size
725725
bold = actualFont['weight']=='bold'
726726
return (family, size, 'bold' if bold else 'normal')

0 commit comments

Comments
 (0)