Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Regardless of hyphenation browsers could also do a much better job at implementing line breaking (affecting ragged left, right, centered, and justified text.) I've done some experiments with implementing the Knuth & Plass line breaking algorithm (as used in TeX) in JavaScript, and it seems to outperform the browser line breaking algorithm on quality. I guess browsers use a simple line breaking algorithm for performance, but I hope that choice is revisited some day because a good line breaking algorithm makes text much easier to read.

If you're interested you can find my experiments at: http://www.bramstein.com/projects/typeset/myfit.html




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: