daleinen Yes, with non-monospaced fonts you need to loop through each character and use SpriteFont.CharacterWidth(char) to calculate the correct width.
Another option as R0J0 mentioned here is to use SpriteFont.TextWidth and TextHeight expressions. I believe for sprite font they are available immediately, you don't need to wait for the next tick. So you set text, read these expressions and adjust the box size accordingly.