This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hejin517
Recipients hejin517
Date 2021-12-28.15:01:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640703674.26.0.944384925323.issue46189@roundup.psfhosted.org>
In-reply-to
Content
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()
History
Date User Action Args
2021-12-28 15:01:14hejin517setrecipients: + hejin517
2021-12-28 15:01:14hejin517setmessageid: <1640703674.26.0.944384925323.issue46189@roundup.psfhosted.org>
2021-12-28 15:01:14hejin517linkissue46189 messages
2021-12-28 15:01:14hejin517create