classification
Title: IDLE: Auto measure font fixed pitch characteristics
Type: enhancement Stage: test needed
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords:

Created on 2019-01-18 04:51 by terry.reedy, last changed 2019-01-18 04:51 by terry.reedy.

Messages (1)
msg333939 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-18 04:51
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.
History
Date User Action Args
2019-01-18 04:51:19terry.reedycreate