Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: Auto measure font fixed pitch characteristics #79949

Open
terryjreedy opened this issue Jan 18, 2019 · 1 comment
Open

IDLE: Auto measure font fixed pitch characteristics #79949

terryjreedy opened this issue Jan 18, 2019 · 1 comment
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 35768
Nosy @terryjreedy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/terryjreedy'
closed_at = None
created_at = <Date 2019-01-18.04:51:19.920>
labels = ['3.8', 'expert-IDLE', 'type-feature', '3.7']
title = 'IDLE: Auto measure font fixed pitch characteristics'
updated_at = <Date 2019-01-18.04:51:19.920>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2019-01-18.04:51:19.920>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2019-01-18.04:51:19.920>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 35768
keywords = []
message_count = 1.0
messages = ['333939']
nosy_count = 1.0
nosy_names = ['terry.reedy']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue35768'
versions = ['Python 3.7', 'Python 3.8']

@terryjreedy
Copy link
Member Author

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 bpo-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.

@terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 only security fixes labels Jan 18, 2019
@terryjreedy terryjreedy self-assigned this Jan 18, 2019
@terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement labels Jan 18, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

1 participant