New submission from hejin517 <[email protected]>:
When the app runs it first shows a black character "f" in Times New Roman.
By clicking the button, I expect that the color of the whole character will be
changed to red, but actually only part is changed.
In FontForge (a font editor), I find the character "f" in Times New Roman is
wider than its "width".
Please look into this problem. Thanks.
Code to reproduce:
----------------------
import tkinter
def change_color():
canvas.itemconfig(text, fill="red")
root = tkinter.Tk()
canvas = tkinter.Canvas(root, width=500, height=500)
canvas.pack()
text = canvas.create_text((200, 200), text="f", font=("Times New Roman", 200),
fill="black")
button = tkinter.Button(text="Change Color", command=change_color)
button.pack()
root.mainloop()
----------
components: Tkinter
messages: 409258
nosy: hejin517
priority: normal
severity: normal
status: open
title: Text containing "wide" character not correctly refreshed
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46189>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com