From: Christian W. <Chr...@t-...> - 2025-04-05 11:53:24
|
On 04/02/2025 08:56 PM, Christian Werner wrote: > … > Meanwhile the patch evolved to work on Windows and MacOS, too, see > > https://www.androwish.org/home/info/b8894bb57964415f Some more iterations later the patch is now in a branch in the Tk repo thanks to Harald, who followed it closely and tested especially on Win32. From my point of view, the block cursor now is working, although the code of the patch is still debatable and possibly could be improved and/or simplified. However, some concerns regarding Tk came up, which can be read in the comments to ticket https://core.tcl-lang.org/tk/info/5d0bc3cf My conclusions so far: * Most likely, the block cursor is fine on MacOS, so please test. No actions needed on this platform, hopefully. * On X11 and Win32 TIP#621 is in the way: it implements run-time linking of ICU for determining bounds of glyph clusters among other features. And Tk 9.x uses these functions for navigating e.g. by cursor keys through the chars in a text widget. However, since both, X11 and Win32 font rendering isn't glyph cluster aware at all, this leads to rather ugly behavior which Harald documented in the ticket. Action required: it must be decided, if tk::startOfCluster and tk::endOfCluster with ICU backing is to be used in Tk's text widget or not. If not, the block cursor will be fine. If it shall be used, the whole complexity of char measurement in the guts of Tk must be improved to take glyph clustering into account when measuring the pixel widths of char sequences. Cheers, Christian |