diff options
author | Nick White <git@njw.me.uk> | 2011-06-13 23:37:09 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-06-13 23:37:09 +0100 |
commit | 0306460893735e8e65de70f3034e1202de77a6e1 (patch) | |
tree | ebacc7d60af2ad05f7dc6de8cd70ba4c486a0bd1 | |
parent | 60d63b164c929aa3f308477d04a3be221d4470f9 (diff) |
Add CSS hyphenation (not well supported). Note that previous commit also included ligatures, which is neat
-rw-r--r-- | TODO | 3 | ||||
-rwxr-xr-x | simplyread.js | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -1,6 +1,3 @@ -core: - it would be nice to do hyphenation. http://code.google.com/p/hyphenator/ is nice, but heavyish (around 2000 LOC). most of that is just unneeded config options etc, though, the core looks reasonable; see hyphenate and hyphenateWord functions. note that it's lgpl. - gecko: test with firefox 4.0, and update version info http://blog.mozilla.com/addons/2010/11/11/making-add-on-compatible-firefox-4/ diff --git a/simplyread.js b/simplyread.js index d841e0a..4aa85c8 100755 --- a/simplyread.js +++ b/simplyread.js @@ -65,7 +65,7 @@ function simplyread() doc.body.innerHTML = "<div style=\"width:38em; margin:auto;" + " text-align:justify; font-family:sans;" + - " text-rendering:optimizeLegibility;\">" + + " text-rendering:optimizeLegibility; hyphens:auto;\">" + "<h1 style=\"text-align: center\">"+doc.title+"</h1>" + fresh.innerHTML + "</div>"; |