2 ms·
One 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 y
by gwern 3y ago
One 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. :)