• linkedin
  • twitter
  • mail
JS Hyphenation API, finally a relief for our poor user’s eyes?

JS Hyphenation API, finally a relief for our poor user’s eyes?

  • Posted on: 14/08/2011
  • By:

In the research phase for a online magazine overhaul I am doing right now, I have just checked this site. I enclose two images just to show how one of the oldest and ugliest HTML publishing side effects -proper text justification- may have seen its end.

Hyphenated HTML text

As noted in their website,

“Hyphenator.js automatically hyphenates texts on websites if either the webdeveloper has included the script on the website or you use it as a bookmarklet on any site.

-Runs on any modern browser that supports JavaScript and the soft hyphen.

-Automatically breaks URLs on any browser that supports the zero width space.

-Runs on the client in order that the HTML source of the website may be served clean and svelte and that it can respond to text resizings by the user.

-Follows the ideas of unobtrusive JavaScript.

-Has a documented API and is highly configurable to meet your needs.

-Supports a wide range of languages. <- So important!

-Relies on Franklin M. Liangs hyphenation algorithm (PDF) commonly known from LaTeX and OpenOffice.

-Is free software licensed under LGPL v3 with additional permission to distribute non-source (e.g., minimized or compacted) forms of that code (see source code header for details).

-Provides services for customizing, merging and packing script and patterns.”

It is although still a work in progress, for it will not perform several Desktop publishing traditionally does, as:

“-Give you control over how many hyphens you’ll have as endings on consecutive lines.

-Eliminate misleading hyphenation like ‘leg-ends’ (depending on the pattern quality).

-Handle special (aka non-standard) hyphenation (e.g. omaatje->oma-tje)”

HTML hyphenation, in JS or CSS3, can only mean another huge step -after CSS paragraph control and Typekit or cufon style font embedding- in order to bring quality typography -alas better user experience- to the users eyes. What will come next?