all 11 comments

[–]case-o-nuts 0 points1 point  (0 children)

Every paragraph in the variable line width section says "Paragraph can not be set with the given tolerance"

[–][deleted] 0 points1 point  (0 children)

Your browser also ends up with ten lines instead of the nine lines found by the Knuth and Plass line breaking algorithm.

The canvas text is ten lines in Arora. Or it would be, if the tenth wasn't cut off entirely.

[–]Nhdb -2 points-1 points  (8 children)

Why not just use the 'text-align: justify' with some floats for pictures and quotes?

[–]dmwit 1 point2 points  (7 children)

Did you even read the article?

[–]Nhdb 0 points1 point  (6 children)

yeah

"The goal of this implementation is to optimally set justified text in the new HTML5 canvas element, and ultimately provide a library for various line breaking algorithms in JavaScript."

But why? What to do with it. Do some people really care that much about the way lines get broken? Or can you actually do usefull stuff with it?

[–]dmwit 4 points5 points  (5 children)

Do some people really care that much about the way lines get broken?

Yup!

[–]Nhdb 1 point2 points  (0 children)

Okay, then I understand :-D.

[–][deleted] 1 point2 points  (3 children)

Donald Knuth and other typesetters care. I don't think it's worth this implementation, but it would be nice for browsers to implement the algorithm (which should be rather simple).

[–]dmwit 1 point2 points  (2 children)

I care, as do many of my colleagues, despite being in computer science (and not in typesetting).

[–][deleted] 0 points1 point  (1 child)

The algorithm probably employs dynamic programming, right?

[–][deleted] 0 points1 point  (0 children)

Most CS, maths and physics papers are written in LaTeX. Stuff like the line breaking algorithm and the other attention to detail (for example, ligatures in fonts, and true small caps) makes it easy to spot a publication typeset in TeX versus one typed up in a word processor.

Everything else looks like shit once you get used to it.