Implement text-wrap-style
Hi, I am trying to understand WeasyPrint in more detail. As far as I know, there are two families of line-breaking algorithms: fast-and-ugly, typically implemented by web browsers, and expensive-but-nice (e.g. Knuth-Plass) that are used in more serious typography. What kind of line breaking algorithm is implemented in WeasyPrint, please?
Hi!
What kind of line breaking algorithm is implemented in WeasyPrint, please?
We’re a browser, we implement the ugly one. :smile:
But happily for you, things will change, even in browsers: the new text-wrap-style provides new ways to break lines, including a pretty value that is not specified but is a great opportunity to implement something close to the Knuth-Plass algorithm.
Interested in turning this issue into a feature request like "Support text-wrap-style"? (Note that it may take a lot of work to implement.)
Interested in turning this issue into a feature request like "Support text-wrap-style"? (Note that it may take a lot of work to implement.)
Yeah! Interested a lot -- because I am typesetting a book with WeasyPrint and the line-breaking algorithm is an important part. Unfortunately, I am afraid that this feature, due to its complexity, will not make it in time (the book needs to be published in 1-2 months).
Related to line breaking -- I just submitted https://github.com/Kozea/WeasyPrint/issues/2267
Unfortunately, I am afraid that this feature, due to its complexity, will not make it in time (the book needs to be published in 1-2 months).
Probably not. It may be part of a bigger change, like #1840.