21 Commits

Author SHA1 Message Date
Laurenz
312197b276 Counters 2023-03-17 11:45:57 +01:00
Laurenz
25b5bd1175 Fully untyped model 2023-03-07 15:17:13 +01:00
Laurenz
815ee3254c Formatting fixes 2023-01-22 13:18:30 +01:00
Laurenz
37a7afddfa Split crates 2022-11-03 13:35:39 +01:00
Laurenz
95e9134a3c Refactor geom module 2022-10-28 16:43:38 +02:00
Laurenz
977ac77e6a Start & end alignment 2022-04-08 15:01:55 +02:00
Laurenz
50bd863471 More independent placed node 2021-11-26 23:51:18 +01:00
Laurenz
c77c5a0f0a Simpler alignment resolving 2021-11-23 14:25:50 +01:00
Laurenz
d3f6040ced Horizon alignment 2021-11-23 11:58:16 +01:00
Laurenz
02f114d072 Remove decorum 2021-11-22 15:50:35 +01:00
Laurenz
89f2e71852 Align node 2021-11-17 17:09:19 +01:00
Laurenz
7f48e8fe66 Make user-facing "debug" representation use Debug instead of Display 2021-08-31 16:25:12 +02:00
Laurenz
7d15dc634b Move font family and refactor alignment 2021-07-29 12:28:54 +02:00
Martin Haug
e27f6c1014 Add hash impls for all nodes
This prepares the incremental PR.

Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-05-26 22:57:29 +02:00
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
Laurenz
76fc4cca62 Refactor alignments & directions 📐
- Adds lang function
- Refactors execution context
- Adds StackChild and ParChild enums
2021-03-25 21:32:33 +01:00
Laurenz
584a43277d Rename ChildAlign to LayoutAligns ✏ 2021-03-12 14:12:30 +01:00
Laurenz
aae67bd572 Move and rename many things 🚛 2021-01-03 00:12:09 +01:00
Laurenz
91e5120693 BoxAlign and Flow aliases ✏ 2020-10-13 13:51:58 +02:00
Laurenz
8680fcd490 Rename geometric eval and apply to resolve ✏ 2020-10-13 13:24:33 +02:00
Laurenz
92c01da360 Switch back to custom geometry types, unified with layout primitives 🏞 2020-10-10 22:19:36 +02:00