working on the dlang.org website

Vladimir Panteleev vladimir at thecybershadow.net
Wed Jul 31 07:14:49 PDT 2013


On Wednesday, 31 July 2013 at 07:35:34 UTC, Jeff Nowakowski wrote:
> By the way, the worst idea I've seen is to do hyphenation 
> statically on the server side. How does the server know in 
> advance how wide my browser window is or the text size? It 
> can't. It's the client's job to flow the text.

Both hyphenate.js and hyphenate.d statically insert shy hyphens, 
which indicate potential line breaks to browsers. They are 
invisible except when the line is wrapped at their position.

Of course, this still doesn't work correctly in some browsers - 
very old browsers render all shy hyphens as regular hyphens, and 
some browsers include the invisible shy hyphen characters when 
you select and copy text.


More information about the Digitalmars-d mailing list