summaryrefslogtreecommitdiff
path: root/Lib/idlelib/configHandler.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-05-22 14:35:24 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2016-05-22 14:35:24 -0400
commit5917f973ac72c24570b340ce22b41c116036cdcb (patch)
tree668df95227dc93ac45ecdb018dff90d44fd0221c /Lib/idlelib/configHandler.py
parent0a91e43820d68155997bb236c23f9090a722189d (diff)
downloadcpython-git-5917f973ac72c24570b340ce22b41c116036cdcb.tar.gz
Issue #26673: Protect IDLE from Linux fonts with reported default size 0.
Such fonts on Linux prevented the configuration dialog from opening.
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r--Lib/idlelib/configHandler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 531efb4b3e..8ac1f6097a 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -720,7 +720,7 @@ class IdleConf:
actualFont = Font.actual(f)
family = actualFont['family']
size = actualFont['size']
- if size < 0:
+ if size <= 0:
size = 10 # if font in pixels, ignore actual size
bold = actualFont['weight']=='bold'
return (family, size, 'bold' if bold else 'normal')