Alright, so I lied about the article coming "this week" but hey, I have a good excuse: I was very busy working on a project for college and then there were a few exams that had to be written. Things are a little more relaxed now giving me more time to work on my book project. The article that I promised will be released soon though (this time for real). Before that happens though, allow me to give some meaning to the headline.
A few years ago, I was working on a little app that was supposed to make reading long texts on your computer screen less painful. Part of the idea was to use really large fonts and anti-aliasing to keep your eyes from getting tired too quickly. Back then, I was playing around with the idea of using hyphenation to make things more "book like" and therefore read up on the topic and also wrote a functional prototype. I was using the TeX-hyphenation algorithm developed by Donald Knuth and Frank Liang (the algorithm is quite simple yet totally ingenious) and was quite pleased with the results. What's funny though is that hyphens placed by the algorithm which may even be correct grammar wise may seem odd to a human reader. An example often mentioned in this context is the word "therapist" which can become "the-rapist" with hyphenation applied to it. Quite a change in meaning. A similar thing can also happen with corporate domain names when read in a certain way.
Why am I mentioning this? Well, hyphenation is very common in the print world but you don't usually find it on websites. Why? Because browsers don't support it. Of course that's understandable because there's websites in so many different languages, you couldn't possibly ship hyphenation dictionaries for each of them with a web browser. Alright, so no hyphenation. End of story. Well, not quite. There are these rare occasions where you have a word that just won't wrap nicely. In those cases, like me you might have manually hyphenated a word to get it to look right. And then you do your cross-browser check and things look fine in one browser but not so good in another. This is when you usually come across the HTML-entity "­" which is sort of like a suggestion to the browser that if necessary, it may throw in a hyphen at that position. Works in some browsers, doesn't work in others (see Soft hyphen - a hard problem?). This is where you usually have to accept that the web unlike print media is made up of dynamic content. A graphic designer can tweak a piece of text any way he wants. He can manually add hyphens, line breaks... he can even manually adjust the kerning of each pair of characters if that makes him happy. On the web, text might be stored in a database. It might be created from chunks of text that are somehow combined automatically. Things just are a lot less predictable than they are "offline". So my message is: take the web as what it is and don't try and make it more like paper because that doesn't do it justice. If a word doesn't wrap nicely, just accept it. If your content's good, nobody will care about that.
-
About me
My name is Kai Jäger and I'm a web application developer working for a web agency in Germany.
Read more -
Ajax in der Praxis
My book on Ajax. Available online and from your local bookstore - provided that you live in Germany.
-
Tags
-
Articles
- Some advice on how to give a presentation that doesn't suck – part two
- Some advice on how to give a presentation that doesn't suck – part one
- The Monte Carlo method for cross-browser CSS
- Introducing BISON - Binary Interchange Standard and Object Notation
- The singleton design pattern in JavaScript
- More articles
-
Archive
-
Websites and blogs
Write a new comment
<strong>,<em>,<cite>and<code>. Links, email addresses and line breaks are parsed automatically.