Laurenz d74c9378b8 New paragraph layout 🚀
The previous paragraph layout algorithm had a couple of flaws:
- It always produced line break opportunities between runs although on
  the textual level there might have been none.
- It didn't handle trailing spacing correctly in some cases.
- It wouldn't have been easily adaptable to Knuth-Plass style optimal
  line breaking because it was fundamentally structured first-fit
  run-by-run.

The new paragraph layout algorithm fixes these flaws. It proceeds
roughly in the following stages:
1. Collect all text in the paragraph.
2. Compute BiDi embedding levels.
3. Shape all runs, layout all children and store the resulting items in
   a reusable (possibly even cacheable) `ParLayout`.
3. Iterate over all line breaks in the concatenated text.
4. Construct lightweight `LineLayout` objects for full lines instead of
   runs. These mostly borrow from the `ParLayout` and only reshape the
   first and last run if necessary. The design allows to use Harfbuzz's
   UNSAFE_TO_BREAK mechanism to make reshaping more efficient. The size
   of a `LineLayout` can be measured without building the line's frame.
5. Build only the selected line's frames and stack them.
2021-04-03 21:09:17 +02:00
2020-11-19 23:46:51 +01:00
2021-03-29 12:02:43 +02:00
2021-03-30 14:31:50 +02:00
2021-04-03 21:09:17 +02:00
2021-03-30 16:19:16 +02:00
2021-03-29 14:56:42 +02:00
2021-03-30 14:31:50 +02:00
2021-03-03 17:53:40 +01:00
2020-08-30 22:07:16 +02:00
Description
No description provided
Pixar 221 MiB
Languages
Rust 85.5%
Typst 13.9%
TypeScript 0.3%
HTML 0.2%
Nix 0.1%