On 2013-09-06 19:52:20 +0000, "Brad Anderson" <[email protected]> said:

hyphenate.js uses a big language lookup table to insert thousands of &shy; into all of the words on the entire page so that the browser can hyphenate the words. It seems the author has spent a lot of time trying to make it run fast but it's going to be slow just by the nature of what it has to do. A proper hyphenation algorithm is faster because it takes place during the layout stage so it doesn't need to consider every word for hyphenation (and also would be written in native code) but that option isn't available to javascript as far as I know.

Not Javascript, but try CSS.
https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens

--
Michel Fortin
[email protected]
http://michelf.ca

Reply via email to