Well, not really.
At some point, you loose control anyway. Different browsers use different font-sizes. Same browser on different operating systems use different font-sizes. Some people use text-only browsers, and are limited to 80x25 chars. You probably can't help them all.
However, if you assume javascript is enabled (wich you shouldn't), you can get the browsers resolution, and from there on calculate how long the text will be. (I.e. make an array with all letters as key, and a corresponding number of width-pixels for this char,.). Then, calculate how long it's allowed to be, and chop it (of course, you can use stylesheets to make sure some of the users get a certain font-type and size).. This, obviously, fails if the user resizes his browser window. (I assume you can use javascript to control this as well, but you definitly should not.)
And, there are ofcourse another option wich will (most likely) help you if you assume your users are not using text-only browsers. Take the text and create an image of it. You then have full control of the font-type etc, and as long as the browser supports graphics, it'll be okay (apart from longer download than text, plus requires more resources on your server).
Hope it helped 🙂