Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

The position of the caret assumes that every character in the string takes up 
the same width, measured in pixels. That is only true for monospaced fonts like 
Courier.

The only way to position the caret precisely with a proportional-width font is 
to compute the number of pixels for each character and then line up the caret 
at a position based on pixels rather than character columns. Unless Tkinter has 
functions to do both, it will probably be complicated and expensive, and I 
doubt anyone would care enough to do it.

----------
nosy: +steven.daprano -1051371

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42623>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to