Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.15] gh-90304: Fix IDLE startup failure with a broken font (GH-152419) - #157395

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-8a2db99-3.15
Open

[3.15] gh-90304: Fix IDLE startup failure with a broken font (GH-152419)#157395
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-8a2db99-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

On some systems a font reports a zero width for the '0' character (seen with a broken font on openSUSE). EditorWindow.set_width() divides the Text widget's pixel width by that value, so the ZeroDivisionError prevented IDLE from starting at all.

set_width() now falls back to the configured width when the measured width is zero. self.width is consumed by the === RESTART === separator in the shell and by the squeezer's line wrapping.
(cherry picked from commit 8a2db99)

Co-authored-by: Serhiy Storchaka [email protected]
Co-authored-by: Claude Opus 4.8 [email protected]

…-152419)

On some systems a font reports a zero width for the '0' character (seen with a broken font on openSUSE). EditorWindow.set_width() divides the Text widget's pixel width by that value, so the ZeroDivisionError prevented IDLE from starting at all.

set_width() now falls back to the configured width when the measured width is zero. self.width is consumed by the === RESTART === separator in the shell and by the squeezer's line wrapping.
(cherry picked from commit 8a2db99)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants