OK, a little geek talk. I'm thrilled when more people start to dig into the source code and see how this thing (mostly) works.
the bug. It turned out that the wxFont used to calculate the bounding box was not exactly
the same font as was used to draw the text. Close, but not close enough. I think it was a simple typo error on my part.
Have a look at chcanv.cpp RolloverWin::SetBestPosition() and RolloverWin::SetBitmap(). Two slightly different font specifications.
Solution: determine the font in SetBestPosition(), use it there to calculate box size, save it as a class member
, and then use it later in SetBitmap() to draw the text.
My solution will be in github shortly.