Cocoa Tk 8.6 Jan 8, 2010 cvs source code sometimes draws text wrapping the last letter of the text line and drawing the wrapped text outside the bounds of the Tk widget. It appears that the Mac Cocoa text drawing is doing the wrapping rather than Tk code since the Tk widget specifies no wrapping (wrap = 0) and the drawn wrapped single letter appears outside the bounds of the widget.
I have only observed this using Tix 8.4.3, not native Tk widgets so it is possible it is a Tix bug. But this bug does not occur with Tix 8.4.3 and Tk 8.5.8 on Mac Carbon Tk, Linux Tk or WIndows Tk. So it looks more likely to be a bug in the new Tk Cocoa implementation.
If the Tix widget text width is increased by one pixel from what is returned by Tk_ComputeTextLayout() then the wrapping bug does not occur. (Tested this with a patch to Tix generic/tixUtils.c). The reported text size from Tk_ComputeTextLayout() however is the same between Tk 8.5.8 Carbon which does not exhibit the wrapping bug and Tk 8.6 Cocoa cvs which does exhibit the bug (77 pixels for "icosahedron" in helvetica font). So the wrapping appears to be caused by the Tk Cocoa text drawing code, and is not due to a miscomputation of the text width.
The following Tcl script produces the bug with the result showed in the attached image. The text widget is given a red background and the image shows the wrapped letter "n" at the end of icosahedron below the red box where Tk believes the text should be drawn.
tixHList .h
tixDisplayStyle text -stylename s -background red
.h add i -itemtype text -text icosahedron -style s
pack .h
Sorry I do not have a native Tk widget demonstration of the bug.
Incorrect text wrapping in Tk Cocoa 8.6
The same text wrapping bug occurs in the backported Tk Cocoa 8.5.8.
This bug effects dialogs in the UCSF Chimera molecular graphics program which we are porting to Tk Cocoa from the current Tk Aqua. The above tests were with 32-bit builds on Mac OS 10.5.8.