2 ms·
Knuth and Plass line-breaking revisited (2007)
- dang 3y agoRelated: Knuth-Plass Thoughts - https://news.ycombinator.com/item?id=34689213 https://news.ycombinator.com/item?id=34689213 - Feb 2023 (10 comments) Knuth and Plass line-breaking Revisited - https://news.ycombinator.com/item?id=28537923 https://news.ycombinator.com/item?id=28537923 - Sept 2021 (17 comments) Description and implementation of the core Knuth-Plass line-wrapping algorithm - https://news.ycombinator.com/item?id=18099027 https://news.ycombinator.com/item?id=18099027 - Sept 2018 (16 comments) Knuth and Plass line-breaking Revisited - https://news.ycombinator.com/item?id=10096116 https://news.ycombinator.com/item?id=10096116 - Aug 2015 (18 comments) Knuth and Plass line breaking algorithm in JavaScript - https://news.ycombinator.com/item?id=1974963 https://news.ycombinator.com/item?id=1974963 - Dec 2010 (42 comments)
- gwern 3y agoOne immediately wonders about using it in browsers, but I looked into this a fair bit and concluded that there doesn't seem to be any viable approach still if you have real web content (rather than short toy blog posts), care about performance, and want Knuth-Plass: https://gwern.net/design-graveyard#knuth-plass-line-breaking https://gwern.net/design-graveyard#knuth-plass-line-breaking But props to https://mpetroff.net/2020/05/pre-calculated-line-breaks-for-html-css/ https://mpetroff.net/2020/05/pre-calculated-line-breaks-for-... for a cool hack bypassing all the JS issues entirely. :)