From 5917f973ac72c24570b340ce22b41c116036cdcb Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sun, 22 May 2016 14:35:24 -0400 Subject: [PATCH] Issue #26673: Protect IDLE from Linux fonts with reported default size 0. Such fonts on Linux prevented the configuration dialog from opening. --- Lib/idlelib/configHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 531efb4b3e7..8ac1f6097a8 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')