News for hackers. Stuff that matters.
Re:A guide to rhythm in web typography by mcguire on Wednesday October 17, 2018 @03:16PM (#18242693)
"Web browsers render justified text very poorly. They don’t have the necessary algorithms to properly set the spacing between words and even individual letters (which is what proper text editors do). That’s why justified texts come with patches of space between the words: rivers of white between the black of text. This makes it very hard to read so justifying text on the web should be avoided at all costs. Web browsers are getting better in supporting hyphenation, though. If you do use justified text, complement it with hyphenation. For now, I recommend not using justified alignment at all."

It's not like a good algorithm hasn't been around since the '70s.

Re:A guide to rhythm in web typography by munificent on Wednesday October 17, 2018 @03:21PM (#18242752)
Sure, but that algorithm is O(n^2) which is fine for an offline program that spends a minute turning a TeX file into a PDF, but not OK for a 90s web browser that needs to reflow text in milliseconds while the user is resizing the window or a script is changing the DOM.
Re:A guide to rhythm in web typography by bbleciel on Wednesday October 17, 2018 @04:14PM (#18243320)
What's the algorithm you're referring to here? Just curious
Re:A guide to rhythm in web typography by a_e_k on Wednesday October 17, 2018 @06:19PM (#18244339)
I expect the commenter was referring to the Knuth-Plass line breaking algorithm.
Re:A guide to rhythm in web typography by bbleciel on Friday October 19, 2018 @02:40PM (#18258923)
Thanks!