[New-bugs-announce] [issue41851] tkinter: add font neg and equal methods
E. Paine
report at bugs.python.org
Thu Sep 24 07:27:19 EDT 2020
New submission from E. Paine <paineelisha at gmail.com>:
I think it would be helpful to add these methods to the tkinter font class.
Starting with the equal method, I have found it very useful to be able to compare tkinter fonts based on their value rather than just name. I used this, for example, in #28694 to ensure the -font attribute had been changed correctly (though there I compared each of the attributes explicitly rather than using `.actual()` as I have in this patch).
The neg method, I think, would be very useful to allow easy conversion between points and pixels. For example:
points = Font(size=16)
pixels = -points
----------
components: Tkinter
messages: 377446
nosy: epaine, gpolo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: tkinter: add font neg and equal methods
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41851>
_______________________________________
More information about the New-bugs-announce
mailing list