Vincent Bernat: Steering browser line breaks with invisible characters
Good typography is difficult to achieve on the web. Compared to typesetting engines like LaTeX or Typst, the web still lacks a good line-breaking algorithm. The CSS directive text-wrap: pretty tries to improve the situation but is still not implemented in Firefox and produces eerie narrower paragraphs with Safari. Various good implementations of the Knuth-Plass algorithm exist in JavaScript, but they either reflow the text or delay its display. Instead, I taught my static site generator to manually insert soft…
Quelle: Originalartikel öffnen
