It would probably help if you can use CSS or the HTML FONT tag to force the font used in the HTML menu to be monospaced (Courier?) and of a specified font size. But that would only work for ASCII.
Trying to figure out variable width fonts is a real pain.
Perhaps you can use some Javascript / CSS trick to write some sample text in the desired language, and get Javascript to find out how much space it takes in the current browser settings, then send this information back to the server.
For this kind of experimentation, I really LOVE

the FireFox browser because you can use the DOM inspector tool to look at the real HTML DOM. Note that it helps
alot if you use CSS to specify styles.
As Layne said - the HTML and Javascript forum is where you can get expert help on this.
Bill