There is a problem with Hans' solution. It fits the boxes tightly around the
fonts as measured at runtime. This makes it impossible for a user to know
if the same patch with a different font will have overlapping objects on another user's machine. (Or the same font with a different font-rendering stack, or even
a different version of the same stack!)
Boxes should be sized based on hard-coded metrics for each font size for a
chosen reference font, and then fonts measured at runtime to fit within that box.
For some fonts/font sizes the best fit will inevitably leave some extra space at the
right of the box inside the border. But that space is visually required to keep
users from placing two boxes so close together that they overlap on a platform
that renders the same font slightly wider.
Otherwise you get users caught up in a vicious cycle of breaking/fixing each
other's object spacing in patches.
-Jonathan