36 Commits

Author SHA1 Message Date
Laurenz
db820ae9aa Repeat function 2022-04-17 12:11:00 +02:00
Laurenz
4bb6240b40 Make Relative generic 2022-04-07 18:04:29 +02:00
Laurenz
91e45458e3 Make values hashable 2022-02-17 12:50:54 +01:00
Laurenz
c7a9bac992 Better debug implementations for numeric types 2022-02-17 12:14:50 +01:00
Laurenz
3739ab7720 Export into rendered images 2022-01-24 17:39:49 +01:00
Laurenz
02f114d072 Remove decorum 2021-11-22 15:50:35 +01:00
Laurenz
9a800daa82 Image fit modes 2021-11-16 21:32:29 +01:00
Laurenz
564cb7e989 Fix panic in pad node 2021-10-31 13:51:28 +01:00
Laurenz
7f48e8fe66 Make user-facing "debug" representation use Debug instead of Display 2021-08-31 16:25:12 +02:00
Laurenz
ee84bf7408 Add abs() function 2021-08-30 16:59:09 +02:00
Laurenz
0806af4aec Kerned PDF output 2021-08-23 13:21:44 +02:00
Laurenz
0dd4ae0a7a Prune derives 2021-08-21 17:30:21 +02:00
Laurenz
9462fb17b3 Convert single-field structs to tuple structs 2021-08-16 19:15:03 +02:00
Martin
57bd3e23c7
Apply suggestions from code review
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2021-06-27 17:08:40 +02:00
Martin Haug
6b6cdae7ce Testing for incremental
Also, constraint bugfixes.
2021-06-27 12:31:27 +02:00
Laurenz
e2cdda67dc Refactor grid row layout 2021-06-15 16:34:41 +02:00
Martin
fec1f41106
Allow grid cells to span multiple regions. (#30) 2021-06-12 18:19:18 +02:00
Laurenz
b886ced408 Switch to N64 type alias 2021-05-27 14:48:45 +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
c975d0d5e9 Tidy up layouting code 2021-05-17 22:55:31 +02:00
Laurenz
72478946c2 Make frames serializable 📚
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
2021-04-21 21:17:25 +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
898728f260 Square, circle and ellipse 🔵 2021-03-20 20:19:30 +01:00
Laurenz
898dc38ec1 Better debug representations 💻 2021-03-19 21:23:03 +01:00
Laurenz
45abcf6b2b Remove dependencies on itoa and ryu ⬇️ 2021-03-02 15:45:01 +01:00
Laurenz
790dc9e667 Cleaning 🧹 2021-02-12 22:55:26 +01:00
Laurenz
ac788f2082 Many more expressions 🥗
Boolean, equality, comparison and assignment expression parsing and evaluation.
2021-01-22 17:16:42 +01:00
Laurenz
51efb0f4d6 Port remaining parser tests 🚚 2021-01-16 15:08:03 +01:00
Laurenz
0f0416054f Move value tests + smarter number formatting 🔢 2021-01-15 15:43:59 +01:00
Laurenz
272a4c2289 Unbounded pages 🌌 2021-01-13 23:19:44 +01:00
Laurenz
1b53e27f27 Some minor improvements ♻ 2021-01-13 21:33:22 +01:00
Laurenz
3b2a28ca8e Add angle data type 📐 2021-01-09 21:35:36 +01:00
Laurenz
2e77b1c836 Better value representations, type function 🌐 2021-01-04 21:29:15 +01:00
Laurenz
1c40dc42e7 Dynamic values, Types, Arrays, and Dictionaries 🚀
- Identifiers are now evaluated as variables instead of being plain values
- Constants like `left` or `bold` are stored as dynamic values containing the respective rust types
- We now distinguish between arrays and dictionaries to make things more intuitive (at the cost of a bit more complex parsing)
- Spans were removed from collections (arrays, dictionaries), function arguments still have spans for the top-level values to enable good diagnostics
2021-01-02 19:37:10 +01:00
Laurenz
f105663037 Basic image support 🖼
- [image] function
- Image rendering in tests
- Supports JPEG and PNG
- No PDF export so far
2020-11-20 16:36:22 +01:00
Laurenz
92c01da360 Switch back to custom geometry types, unified with layout primitives 🏞 2020-10-10 22:19:36 +02:00