For all your long-line typsetting needs there's U+200B, the Unicode "Zero Width Space". It tells the renderer that if it needs to put in a line break here's a good place to do it. Great for when you have a really long line with no spaces in it and don't want to just hack in a <br>.

Only it doesn't work so well in HTML. HTML 4.0's entities don't define &zwsp;. IE recognizes it but Mozilla doesn't. So you need to use &#8203; instead. And then IE screws it up when you paste it into ASCII. And while IE6 on WinXP renders it correctly, on Win2K it renders a box. Totally broken.

There's a good page on line breaking in the Web, detailing all the problems where lines are broken where they shouldn't be and vice-versa. What kills me is these typsetting algorithms were all solved almost twenty years in TeX, at least for English. Why do the people who do HTML and web browsers hate design so much?

  2003-08-17 18:49 Z