[issue45103] IDLE: make configdialog font page survive font failures

Terry J. Reedy report at bugs.python.org
Sat Sep 4 17:16:59 EDT 2021


New submission from Terry J. Reedy <tjreedy at udel.edu>:

There were reports on a previous issue that attempting to display some characters from some linux fonts in some distributions resulted in crashing Python.  The crash reports mentioned XWindows errors about particular characters being too complex or something.  I did not open an issue for this because it seemed beyond the ability of tkinter/IDLE to predict and handle.

https://stackoverflow.com/questions/68996159/idle-settings-window-wont-appear reported that requesting the IDLE settings window resulting in IDLE hanging.  The user used my print debug suggestion to determine that the problem was in configdialog.py at
    self.fontpage = FontPage(note, self.highpage)

The user first thought the issue was with a chess font, and then determined that the problem font was the phaistos font from https://ctan.org/pkg/phaistos?lang=en.  The font has the symbols from the Cretan Linear A script on the Disk of Phaistos. This issue is about

1. Try to reproduce the issue by downloading and installing Phaistos.otf (right click on the file and click Install).

2. If successful, trace the problem to a specific line within the FontPage class.

3. Determine whether Python code can prevent the hang or if it is completely in other code.  (Either way, perhaps report to tcl/tk.)

... To remove, "open Control Panel -> Fonts then locate and select Phaistos Regular font then proceed with clicking Delete button."

I did not select 'test needed' because we cannot routinely install new fonts and I am not sure of how to do an automated test if we could.
However, I would add a note as to how to do a manual test.

font.otf = OpenTypeFont, used on Windows, Linux, macOS.
https://fileinfo.com/extension/otf
It might be good test on other systems after Windows.

----------
messages: 401062
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: make configdialog font page survive font failures
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________


More information about the Python-bugs-list mailing list