This can be done in javascript but it's a little complex.
Here's the complete working example : http://jsfiddle.net/dystroy/kdrrA/
The HTML :
<table><tr><td id=txtcell nowrap><span id=txt>My long text is long. My long text.</span></td></tr></table>
<br>Font Size : <span id=mes></span>
The CSS :
#txtcell{ max-width:200px;}
The javascript :
var fontSize = 20;
var reduce = function() {
while ($('#txt').width() > 200) {
fontSize -= 1;
$('#txt').css('font-size', fontSize);
}
$('#mes').html(fontSize); // this line is only for demonstration, remove it in "production"
};
reduce();
Note that I had to add a span in the cell because TD width computation by jquery doesn't work very well.