From: Terry Jan Reedy Date: Sun, 22 May 2016 18:35:24 +0000 (-0400) Subject: Issue #26673: Protect IDLE from Linux fonts with reported default size 0. X-Git-Tag: v3.5.2rc1~123 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5917f973ac72c24570b340ce22b41c116036cdcb;p=thirdparty%2FPython%2Fcpython.git Issue #26673: Protect IDLE from Linux fonts with reported default size 0. Such fonts on Linux prevented the configuration dialog from opening. --- diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 531efb4b3e7b..8ac1f6097a84 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')