[New-bugs-announce] [issue35768] IDLE: Auto measure font fixed pitch characteristics

Terry J. Reedy report at bugs.python.org
Thu Jan 17 23:51:19 EST 2019

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

The greatly expanded configdialog Font tab multi-alphabet sample reveals to some degree how well tk fills in BMP Unicode characters on a particular machine.  It also lets users extend the sample.

The sample has 2 lines of 20 ascii characters each and lines of 20 non-Latin1, IPA, Greek, Cyrillic, Hebrew, and Arabic characters.  The intention is to let one see if a font (as extended) is fixed-pitch for Ascii and if that property extends to any of those other European and Near East alphabets. On my machine, the number of fixed alphabets varies from 0, 1 (ascii), 2 (rest of Latin1) up to 7 (for Courier) (and some in between).

On #35196, Raymond Hettinger asked whether fixed-pitch fonts could be detected.  With the caveat that this property is not binary unless we restrict attention to Ascii, yes.  Without measuring each character, we could check the ascii lines and then the others. We could then highlight the lines in the sample that pass.

Before coding, we need to experiment a bit with the Font measuring method.  Should we cache results in .idlerc?

For all the fonts on my machine, the East Asian CJK characters are filled in with a fixed-pitch that is about 1.6 to 1.8 (not 2.0) times the Ascii fixed or average pitch.

Raymond also suggested limiting the font list to those with fixed ascii.  I think at least segregating fixed Ascii pitch fonts to make them easy to find is a great idea.  Some detail need to be thought about.

assignee: terry.reedy
components: IDLE
messages: 333939
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Auto measure font fixed pitch characteristics
type: enhancement
versions: Python 3.7, Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list